I've created a simple SOAP web service using soaplib and run into an issue in which SOAP parameters sent including ampersands or angle brackets are ignored, even when escaped.
Whether the method is set up to accept a primitive string or a primitive of type 'any', any of those characters introduced result in a webfault (using suds) of this type:
suds.WebFault: Server raised fault: 'my_method() takes exactly 2 arguments (1 given)'
For now, here's the method, having removing addition code used to store the result:
@soapmethod(soap_types.String, _returns=soap_types.Boolean)
def my_method_(self, sample):
return True
Calling this method with any simple string works just fine, e.g. in suds,
suds_object.service.my_method('Hello World')
results in "true". But add in any ampersand or angle bracket, e.g.
suds_object.service.my_method('Hello & World')
and the exception is raised. With logging turned on I can see that suds is escaping these characters. So far I've been able to figure out that the problem is not down at the primitive level and I can't figure out where or what the problem is. It makes it rather difficult to send XML payloads through the service.
The class used is a subclass of SimpleWSGISoapApp, and the method is served as a Django view. I noticed that when attempting to use the Hello World example using the soaplib client library that it worked just fine.