Overwrite the Soap Envelope in Suds python

Posted by chrissygormley on Stack Overflow See other posts from Stack Overflow or by chrissygormley
Published on 2010-03-30T10:09:20Z Indexed on 2010/03/30 10:13 UTC
Read the original article Hit count: 656

Filed under:
|
|
|

Hello,

I have a camera and I am trying to connect to it vis suds. I have tried to send raw xml and have found that the only thing stopping the xml suds from working is an incorrect Soap envelope namespace.

The envelope namespace is:

xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"

and I want to rewrite it to:

xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope"

In order to add a namespace in python I try this code:

message = Element('Element_name').addPrefix(p='SOAP-ENC', u='www.w3.org/ENC')

But when I add the SOAP-ENV to the namespace it doesn't write as it is hardcoded into the suds bindings. Is there a way to overwrite this in suds?

Thanks for any help.

© Stack Overflow or respective owner

Related posts about python

Related posts about suds