On Fri, Jan 27, 2012 at 3:54 AM, Kristian Rink <[email protected]> wrote:

> Folks;
>
> I'm about to connect to a remote SOAP service that provides a rather
> verbose WSDL. According to both the service reference documentation and
> to the stubs my Java SOAP framework managed to generate, there is a
> "session header" information that needs to be added to the soap-header
> section of any outbound message more or less like this:
>
> <soap:Header>
>        <SessionHeader xmlns="service">
>                <Key>ae6e822bc85c1c182f29bac9bb99f8e5</Key>
>        </SessionHeader>
> </soap:Header>
>
> In the Java client classes, this happens in a rather straightforward
> way (by having an additional "sessionHeader" parameter in each of the
> remote function calls in the stub classes), but I am unsure how to
> achieve this effect with any of the Python frameworks out there. So to
> ask: Inspirations on that, anyone? Any input, and be that just pointers
> to things worth reading, highly appreciated! :)
>
>
>
With latest versions of PySimpleSoap, you can send the headers as python
dicts (if using wsdl):
http://code.google.com/p/pysimplesoap/wiki/SoapClient#WSDL_SOAP_Headers_Example


You can send also raw xml using SimpleXMLElement (no need of wsdl, much
like your sessionHeader example parameter in each remote call):
http://code.google.com/p/pysimplesoap/wiki/SoapClient#Raw/arbitrary_SOAP_Header_Example

Best regards,

Mariano Reingart
http://www.sistemasagiles.com.ar
http://reingart.blogspot.com
_______________________________________________
Soap mailing list
[email protected]
http://mail.python.org/mailman/listinfo/soap

Reply via email to