[Fedora-suds-list] Question about the soap envelope namespace

Michael Sommerville msommerville at gmail.com
Fri Oct 16 16:06:26 UTC 2009


On Thu, Oct 15, 2009 at 5:32 PM, Chris Frantz <frantzcj at gmail.com> wrote:
> I got bitten by this again.  My program wants to talk to several
> different SOAP services and a couple of them are very picky about the
> SOAP-ENV.  Worse, they don't use the same SOAP-ENV.
>
> This patch allows suds to pick up the SOAP-ENV from the WSDL, iff it
> is defined as a namespace prefix in the root of the document.
>
> I'm no XML and/or WSDL expert, so this fix may or may not work for
> you.  It happens to work for me.  This patch is based on suds-0.3.7.
>>> It appears that the soap envelope namespace is hardcoded to
>>> 'http://schemas.xmlsoap.org/soap/envelope/' in binding.py.  I'm trying to
>>> talk to a gSOAP based web service that insists the envelope namespace be
>>> 'http://www.w3.org/2003/05/soap-envelope'.
>>>
>> We have the same issue with our gSOAP service.  I'm sure there are
>> other cleaner ways of achieving the same result, but what about simply
>> replacing the envns object before you make any calls to the web
>> service?  For example:

That looks far cleaner than my monkey-patching doesn't it?   That
works fine for me too.

Thanks!

-Mike




More information about the fedora-suds-list mailing list