<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>I'm using the factory to create a request object, then setting an attribute property and sending the request. I get an error saying that the attribute (which is required) is missing. Looking at the logs, I see that the attribute isn't in the same namespace as its element.</div><div><br></div><div>Here's a snippet of the code:</div><div><br></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div>ns = settings.WORKDAY_NAMESPACE</div><div><br></div><div>security = Security()<br>security.tokens.append(UsernameToken(settings.WORKDAY_USER, settings.WORKDAY_PASSWORD))<br><br>client = Client(settings.WORKDAY_URL, retxml=True, wsse=security)<br><br></div><div>request = client.factory.create("{%s}Worker_Request_ReferencesType"&nbsp;% ns)</div><div><br></div><div>worker = client.factory.create("{%s}WorkerObjectType"&nbsp;% ns)</div><div>worker_id = client.factory.create("{%s}WorkerObjectIDType"&nbsp;% ns)</div><div><br></div><div>worker_id.value = Property("BLAH BLAH BLAH") # working around bug in ticket #323</div><div>worker_id['_type'] =&nbsp;"Employee_ID"</div><div><br></div><div>worker.ID.append(worker_id)</div><div><br></div><div>request.Worker_Reference.append(worker)</div><div><br></div><div>result = client.service.Get_Workers(Request_References = request)</div></blockquote><div><br></div><div>Here's the body of the request it generates:</div><div><br></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div>&lt;ns0:Get_Workers_Request&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>&lt;ns0:Request_References&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>&lt;ns0:Worker_Reference&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>&lt;ns0:ID type="Employee_ID"&gt;BLAH BLAH BLAH&lt;/ns0:ID&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>&lt;/ns0:Worker_Reference&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>&lt;/ns0:Request_References&gt;</div><div>&lt;/ns0:Get_Workers_Request&gt;</div></blockquote><div><br></div><div>As you can see, the "type" attribute of the ID element is missing the ns0 namespace.</div><div><br></div><div><div>I'm certain it's not a problem with the WSDL since soapUI works as expected.</div></div><div><br></div><div>What am I missing?</div><br><div>
<div style="font-size: 12px; ">--&nbsp;</div><div style="font-size: 12px; ">Rob Speed</div>
</div>
<br></body></html>