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

Jeff Ortel jortel at redhat.com
Fri Oct 16 16:55:59 UTC 2009



On 10/16/2009 11:06 AM, Michael Sommerville wrote:
> 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.

I agree that the current hard coded URI for the soap envelope namespace needs to be 
addressed.  It seems to be a difference between soap 1.1 and soap 1.2.

soap 1.1 defines: http://schemas.xmlsoap.org/soap/envelope/
soap 1.2 defines: http://www.w3.org/2003/05/soap-envelope

Chris:
I like your approach (and patch) of determining the soap envelope namespace from the wsdl. 
  But your patch relies on the soap envelope namespace being mapped to a prefix in the 
WSDL and that it is mapped to the prefix "SOAP-ENV".  Neither are reliable.  But, as I 
said, I like the approach and I'm looking through the specs to find a way to determine the 
soap version by examining the wsdl.  Once determined, I can set the proper namespaces in 
the wsdl.Definitions objects to be used when generating the messages.

>
> Thanks!
>
> -Mike
>
> _______________________________________________
> fedora-suds-list mailing list
> fedora-suds-list at redhat.com
> https://www.redhat.com/mailman/listinfo/fedora-suds-list

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5260 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/fedora-suds-list/attachments/20091016/24842294/attachment.p7s>


More information about the fedora-suds-list mailing list