python - soaplib problems with XML characters in string payload -
I have created a simple SOAP web service using Sosipilib and run in a problem where SOAP parameter ampersand or angles Bracket
Whether this method is set to accept a primitive string or any of the 'primitive' types, none of those characters can use this type of webfault (using suds ) The result presents:
suds.WebFault: Server mistakenly: 'my_method (2) takes exactly 2 arguments (1 given) ''
For now, here's the method, removing the extra code used to store the result:
@soapmethod (soap_types.String, _returns = soap_types.Boolean) def my_method_ (auto, sample): return True
This method can be used for any simple string Calling works well, eg in Suds,
suds_object.service.my_method ('Hello world')
In the "true" result But add to any ampersands or angle brackets, e.g.
suds_object.service.my_method ('Hello and World')
And the exception has increased. With logging on, I can see that the vengeance is escaping from these characters. So far, I have come to understand that the problem is not at the primitive level and I can not understand where the problem is or where it makes it difficult to send the XML payload through the service.
The square used is the SimpleWSGISoapApp, and the method is given as a Django view. I noticed that when trying to use the Soplib client library it worked fine
me python Had problems with "easy" soap lbs (esp suds). I had a question some time back, in exchange for which I was motivated to use soap, and for you there was a similar problem disappeared.
There was also good suggestion for using that question, such as wire strings (or Google "Soap Debugger") to see what is happening at low levels.
Comments
Post a Comment