Hi all,
I've been trying to get my sts(WS-Trust) service working with suds, but I've hit a problem when suds is trying to parse the request. The flow of the execution is
1. Create a resquest for a security token that looks like this
<SOAP-ENV:Envelope xmlns:wsse=" http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1...." xmlns:wsu=" http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1..." xmlns:ns0="http://docs.oasis-open.org/ws-sx/ws-trust/200512" xmlns:ns1=" http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV=" http://schemas.xmlsoap.org/soap/envelope/%22%3E SOAP-ENV:Header <wsse:Security mustUnderstand="true"> wsu:Timestamp wsu:Created2011-06-07T12:24:42.741387Z</wsu:Created> wsu:Expires2011-09-05T12:24:42.741387Z</wsu:Expires> </wsu:Timestamp> wsse:UsernameToken wsse:Usernameusername</wsse:Username> <wsse:Password Type="None">password</wsse:Password> wsse:Nonce2a5d2e30b318c1001bb0af853af466bf</wsse:Nonce> wsu:Created2011-06-07T12:24:42.741335Z</wsu:Created> </wsse:UsernameToken> </wsse:Security> </SOAP-ENV:Header> ns1:Body ns0:RequestSecurityToken ns0:RequestType http://docs.oasis-open.org/ws-sx/ws-trust/200512/Issue</ns0:RequestType> ns0:TokenType http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1 </ns0:TokenType> ns0:KeyType http://docs.oasis-open.org/ws-sx/ws-trust/200512/SymmetricKey</ns0:KeyType> ns0:KeySize256</ns0:KeySize> ns0:ComputedKeyAlgorithm http://schemas.xmlsoap.org/ws/2005/02/trust/CK/PSHA1 </ns0:ComputedKeyAlgorithm> </ns0:RequestSecurityToken> </ns1:Body> </SOAP-ENV:Envelope>
This works fine, and when I've got logging on I can see theat the correct response is coming back from the service. When parsing though, I get this stacktrace
xxx = client.service.IssueToken(req_type[" http://docs.oasis-open.org/ws-sx/ws-trust/200512/Issue%22%5D,tok_type,key_ty..." http://docs.oasis-open.org/ws-sx/ws-trust/200512/SymmetricKey "],key_size,key_alg) File "/scratch/hakont/python-suds-0.4/suds/client.py", line 542, in __call__ return client.invoke(args, kwargs) File "/scratch/hakont/python-suds-0.4/suds/client.py", line 602, in invoke result = self.send(soapenv) File "/scratch/hakont/python-suds-0.4/suds/client.py", line 643, in send result = self.succeeded(binding, reply.message) File "/scratch/hakont/python-suds-0.4/suds/client.py", line 678, in succeeded reply, result = binding.get_reply(self.method, reply) File "/scratch/hakont/python-suds-0.4/suds/bindings/binding.py", line 145, in get_reply replyroot = sax.parse(string=reply) File "/scratch/hakont/python-suds-0.4/suds/sax/parser.py", line 136, in parse sax.parse(source) File "/usr/lib64/python2.4/site-packages/_xmlplus/sax/expatreader.py", line 109, in parse xmlreader.IncrementalParser.parse(self, source) File "/usr/lib64/python2.4/site-packages/_xmlplus/sax/xmlreader.py", line 123, in parse self.feed(buffer) File "/usr/lib64/python2.4/site-packages/_xmlplus/sax/expatreader.py", line 220, in feed self._err_handler.fatalError(exc) File "/usr/lib64/python2.4/site-packages/_xmlplus/sax/handler.py", line 38, in fatalError raise exception xml.sax._exceptions.SAXParseException: <unknown>:1:0: syntax error
I've checked the response, using xmlwf, and it's valid. Have anybody else experinced this? A similar issue [1] was reported on the forum for 2 years ago, but not sure if it was solved.
Cheers, Håkon
[1] http://markmail.org/message/wfel6rsdyeas6lq4#query:xml.sax._exceptions.SAXPa...