Hi all,

For those using pysimplesoap, I'm in need of help in understanding how to
set header vars.  I'm new to SOAP in Python, maybe it's simple. I have to
place the session id in the header on each client call.  Using this same
WSDL (https://api.clarizen.com/v1.0/Clarizen.svc) in PHP SoapClient, I
would do the following:

$header[] = new SoapHeader("http://clarizen.com/api";, 'Session', array
("ID" => $sessionId));
$client->__setSoapHeaders($header);

This generates:
<SOAP-ENV:Header><ns1:Session><ns1:ID>some
guid</ns1:ID></ns1:Session></SOAP-ENV:Header>

ns1="http://clarizen.com/api";, btw.

In pysimplesoap, I can successfully login and get the session id. Reading
some examples, it seems that the header can be added as a normal dict
entry. But I'm not having luck.

session = response['LoginResult']['SessionId']
client['Session'] = { 'ID' : session }

This does not work and leaves me with an empty <soap:Header/>.  There is
obviously something wrong and I didn't use the namespace anywhere which
seems wrong.

Any help would be appreciated.

take care,

jpc
_______________________________________________
Soap mailing list
[email protected]
http://mail.python.org/mailman/listinfo/soap

Reply via email to