Hi,
In response to a SOAP logon request, I see the following SOAP header (I hided the xmlns url):
soap:Header <Header xmlns="..."> <SessionID>b2f73922-8701-4f5c-b3e8-408df89b4564</SessionID> </Header> </soap:Header>
Now I need to include this SessionID in the next request. How can I do this? The request, of which the body seems to be correct, has an empty header now:
I have a (XML/SOAP) session trace of the service I'm trying to use from someone that is using no SOAP library at all, but is composing the XML (incl. SOAP headers) manually and that works fine (...). There the next request includes:
soap:Header <Header MyAttribute="" xmlns="..."> <SessionID>f578a208-94c2-4b16-a586-fdc24c05bd6d</SessionID> </Header> </soap:Header>
However, I'd like to achieve this using a SOAP library like suds. Any help is appreciated.
Thanks,
-- -- Jos Vos jos@xos.nl -- X/OS Experts in Open Systems BV | Phone: +31 20 6938364 -- Amsterdam, The Netherlands | Fax: +31 20 6948204
On Sun, Jun 10, 2012 at 03:42:13PM +0200, Jos Vos wrote:
In response to a SOAP logon request, I see the following SOAP header
soap:Header <Header xmlns="..."> <SessionID>b2f73922-8701-4f5c-b3e8-408df89b4564</SessionID> </Header> </soap:Header>
Now I need to include this SessionID in the next request. How can I do this?
I believe, the following Stack Overflow question just deals with the situation you described above:
http://stackoverflow.com/questions/2469988/how-to-pass-soap-headers-into-pyt...
Adding user-defined SOAP headers is part of SUDS since 0.3.4:
https://fedorahosted.org/suds/ticket/6
To extract the SessionID received in response to the first request, see the bottom part of the following blog post:
http://www.jansipke.nl/python-soap-client-with-suds/