It looks like the latest build has lost some of it's capabilities for handling namespaces. I'm working with some yahoo apis and am really keen on using python/suds for this.
Here’s what Yahoo says I should be sending ( note the use of the wsse namespace ): --------------------------------- <?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/07/secext" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://amp.yahooapis.com/V1%22%3E soapenv:Header wsse:Security wsse:UsernameToken wsse:UsernameOBFUSCATED</wsse:Username> wsse:PasswordOBFUSCATED_PASS</wsse:Password> </wsse:UsernameToken> </wsse:Security> <license>OBFUSCATED-LICENSE</license> <accountID>OBFUSCATED-ACCOUNT</accountID> </soapenv:Header> soapenv:Body ... </soapenv:Body> </soapenv:Envelope>
--------------------
Previous versions output ( note how ns1 should have been a wsse equivalent ): ------------------------------------ $ python sudsDemo.py
Suds ( https://fedorahosted.org/suds/ ) version: 0.3.4 (beta) build: R440-20090211
Service ( LocationServiceService ) tns="http://amp.yahooapis.com/V1" Prefixes (2) ns0 = "http://amp.yahooapis.com/V1" ns1 = "http://schemas.xmlsoap.org/ws/2002/07/secext" Ports (1): (LocationService) Methods (1): getAccountLocation() Types (3): ApiFault ns1:Security ns1:UsernameToken
ERROR:suds.sudsobject:['value'] must be superset of [], ordering ignored ERROR:suds.sudsobject:['value'] must be superset of [], ordering ignored ERROR:suds.client:<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:ns0="http://amp.yahooapis.com/V1" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://amp.yahooapis.com/V1" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/%22%3E SOAP-ENV:Header <Security xmlns="http://schemas.xmlsoap.org/ws/2002/07/secext"> <UsernameToken> <Username>OBFUSCATED</Username> <Password>OBFUSCATED</Password> </UsernameToken> </Security> tns:licenseOBFUSCATED</tns:license> tns:accountIDOBFUSCATED</tns:accountID> </SOAP-ENV:Header> SOAP-ENV:Body ns0:getAccountLocation/ </SOAP-ENV:Body> </SOAP-ENV:Envelope> Server raised fault: 'Login failed for OBFUSCATED.' (u"Server raised fault: 'Login failed for OBFUSCATED.'",) ------------------------------------
Then I updated to latest trunk ( note ns1 completely dropped ):
-------------------------------------- $ python sudsDemo.py
Suds ( https://fedorahosted.org/suds/ ) version: 0.3.5 (beta) build: R466-20090311
Service ( LocationServiceService ) tns="http://amp.yahooapis.com/V1" Prefixes (2) ns0 = "http://amp.yahooapis.com/V1" ns1 = "http://schemas.xmlsoap.org/ws/2002/07/secext" Ports (1): (LocationService) Methods (1): getAccountLocation() Types (3): ApiFault ns1:Security ns1:UsernameToken
ERROR:suds.sudsobject:['value'] must be superset of [], ordering ignored ERROR:suds.sudsobject:['value'] must be superset of [], ordering ignored ERROR:suds.client:<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:ns0="http://amp.yahooapis.com/V1" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://amp.yahooapis.com/V1" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/%22%3E SOAP-ENV:Header <tns:license xsi:type="license">OBFUSCATED</tns:license> <tns:accountID xsi:type="accountID">OBFUSCATED</tns:accountID> <Security> <UsernameToken> <Username>OBFUSCATED</Username> <Password>OBFUSCATED</Password> </UsernameToken> </Security> </SOAP-ENV:Header> SOAP-ENV:Body ns0:getAccountLocation/ </SOAP-ENV:Body> </SOAP-ENV:Envelope> Server raised fault: 'Login failed for OBFUSCATED.' (u"Server raised fault: 'Login failed for OBFUSCATED.'",)
--------------------------------
The ns1 namespace is no longer even applied to the Security clause. Also, it looks like the Security extension from r452 didn't make it. Are there plans?
To my eyes, the 0.3.4 version I was using looked like it should have worked even though the wsse namespace was applied in a different manner than Yahoo's example shows. I'm wondering what tools they use.