Hi all,
I've hit what appears to be a bug in suds version 0.3.4. My app was working fine with version 0.3.3 but after upgrading to 0.3.4 it suddenly stopped working. I've attached a sample app that reproduces the problem (it has comments which hopefully explain what's happening).
Below is a diff of the request that's created by suds version 0.3.3 and 0.3.4. The actual problem is that ns0:request xsi:type="GetEventsReq" is incorrect, it should include the namespace as did version 0.3.3.
--- suds-0.3.3 2009-03-06 06:11:41.000000000 +0000 +++ suds-0.3.4 2009-03-06 06:11:30.000000000 +0000 @@ -1,19 +1,18 @@ <SOAP-ENV:Envelope xmlns:ns0="http://www.betfair.com/publicapi/v3/BFGlobalService/" -xmlns:ns1="http://www.betfair.com/publicapi/types/global/v3/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/%22%3E SOAP-ENV:Header/ SOAP-ENV:Body ns0:getEvents - <ns0:request xsi:type="ns1:GetEventsReq"> - <header xmlns="http://www.betfair.com/publicapi/types/global/v3/"> + <ns0:request xsi:type="GetEventsReq"> + <header> <clientStamp>0</clientStamp> <sessionToken>blah</sessionToken> </header> - <eventParentId xmlns="http://www.betfair.com/publicapi/types/global/v3/">7</eventParentId> - <locale xmlns="http://www.betfair.com/publicapi/types/global/v3/" xsi:nil="true"/> + <eventParentId>7</eventParentId> + <locale xsi:nil="true"/> </ns0:request> </ns0:getEvents> </SOAP-ENV:Body>
--Dave
Thanks for reporting this. I'm looking into it.
David Robinson wrote:
Hi all,
I've hit what appears to be a bug in suds version 0.3.4. My app was working fine with version 0.3.3 but after upgrading to 0.3.4 it suddenly stopped working. I've attached a sample app that reproduces the problem (it has comments which hopefully explain what's happening).
Below is a diff of the request that's created by suds version 0.3.3 and 0.3.4. The actual problem is that ns0:request xsi:type="GetEventsReq" is incorrect, it should include the namespace as did version 0.3.3.
--- suds-0.3.3 2009-03-06 06:11:41.000000000 +0000 +++ suds-0.3.4 2009-03-06 06:11:30.000000000 +0000 @@ -1,19 +1,18 @@ <SOAP-ENV:Envelope xmlns:ns0="http://www.betfair.com/publicapi/v3/BFGlobalService/" -xmlns:ns1="http://www.betfair.com/publicapi/types/global/v3/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/%22%3E SOAP-ENV:Header/ SOAP-ENV:Body ns0:getEvents
<ns0:request xsi:type="ns1:GetEventsReq">
<header xmlns="http://www.betfair.com/publicapi/types/global/v3/">
<ns0:request xsi:type="GetEventsReq">
<header> <clientStamp>0</clientStamp> <sessionToken>blah</sessionToken> </header>
<eventParentId
xmlns="http://www.betfair.com/publicapi/types/global/v3/%22%3E7</eventParentId>
<locale
xmlns="http://www.betfair.com/publicapi/types/global/v3/" xsi:nil="true"/>
<eventParentId>7</eventParentId>
</SOAP-ENV:Body><locale xsi:nil="true"/> </ns0:request> </ns0:getEvents>
--Dave
fedora-suds-list mailing list fedora-suds-list@redhat.com https://www.redhat.com/mailman/listinfo/fedora-suds-list
The rules around when the name referenced by xsi:type="" needs to be qualified by namespace are unclear. My jboss server will not accept xsi:type="" for eleemnts of types derived by extension in the document/literal message style when the element and the type referenced by xsi:type="" are in the same namespace.
So, after much surfing of specifications, I'm concluding for now that for the /literal/ soap styles, the xsi:type="" contains a namespace qualified reference only when it is in a different namespace. The rpc/encoded remains the same (always qualified).
I committed as r463. Can you try from svn?
-jeff
David Robinson wrote:
Hi all,
I've hit what appears to be a bug in suds version 0.3.4. My app was working fine with version 0.3.3 but after upgrading to 0.3.4 it suddenly stopped working. I've attached a sample app that reproduces the problem (it has comments which hopefully explain what's happening).
Below is a diff of the request that's created by suds version 0.3.3 and 0.3.4. The actual problem is that ns0:request xsi:type="GetEventsReq" is incorrect, it should include the namespace as did version 0.3.3.
--- suds-0.3.3 2009-03-06 06:11:41.000000000 +0000 +++ suds-0.3.4 2009-03-06 06:11:30.000000000 +0000 @@ -1,19 +1,18 @@ <SOAP-ENV:Envelope xmlns:ns0="http://www.betfair.com/publicapi/v3/BFGlobalService/" -xmlns:ns1="http://www.betfair.com/publicapi/types/global/v3/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/%22%3E SOAP-ENV:Header/ SOAP-ENV:Body ns0:getEvents
<ns0:request xsi:type="ns1:GetEventsReq">
<header xmlns="http://www.betfair.com/publicapi/types/global/v3/">
<ns0:request xsi:type="GetEventsReq">
<header> <clientStamp>0</clientStamp> <sessionToken>blah</sessionToken> </header>
<eventParentId
xmlns="http://www.betfair.com/publicapi/types/global/v3/%22%3E7</eventParentId>
<locale
xmlns="http://www.betfair.com/publicapi/types/global/v3/" xsi:nil="true"/>
<eventParentId>7</eventParentId>
</SOAP-ENV:Body><locale xsi:nil="true"/> </ns0:request> </ns0:getEvents>
--Dave
fedora-suds-list mailing list fedora-suds-list@redhat.com https://www.redhat.com/mailman/listinfo/fedora-suds-list
On Fri, Mar 6, 2009 at 4:25 PM, Jeff Ortel jortel@redhat.com wrote:
The rules around when the name referenced by xsi:type="" needs to be qualified by namespace are unclear. My jboss server will not accept xsi:type="" for eleemnts of types derived by extension in the document/literal message style when the element and the type referenced by xsi:type="" are in the same namespace.
So, after much surfing of specifications, I'm concluding for now that for the /literal/ soap styles, the xsi:type="" contains a namespace qualified reference only when it is in a different namespace. The rpc/encoded remains the same (always qualified).
I committed as r463. Can you try from svn?
Yep, that's fixed it. The request now looks like this:
SOAP-ENV:Envelope xmlns:ns0="http://www.betfair.com/publicapi/v3/BFGlobalService/" xmlns:ns1="http://www.betfair.com/publicapi/types/global/v3/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:Header/ SOAP-ENV:Body ns0:getEvents <ns0:request xsi:type="ns1:GetEventsReq"> <header> <clientStamp>0</clientStamp> <sessionToken>blah</sessionToken> </header> <eventParentId>1</eventParentId> <locale xsi:nil="true"/> </ns0:request> </ns0:getEvents> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
The wsdl is here, incase you still need it: https://api.betfair.com/global/v3/BFGlobalService.wsdl
Thanks heaps!
--Dave