soaplib newbie question
jonhune at yahoo.com
Fri Jun 6 00:53:52 CEST 2008
I'm totally new to SOAP.
Can anyone help with this soap question.
I'm trying to use soaplib.
I can't find many examples on using soaplib and what I have below if the standard hello world example I find online.
Say I want to call the zzz service at yyy.
I know that the service inputs are two integers and a string (say a,b,c), and the output is three strings (say d,e,f).
URL = "http://www.yyy.com/yyy.wsdl"
a = 1
b = 2
c = "3"
from soaplib.wsgi_soap import SimpleWSGISoapApp
from soaplib.service import soapmethod
from soaplib.serializers.primitive import String, Integer, Array
@soapmethod(Integer, Integer, String, _returns = Array(String))
def zzz(self, a, b, c):
from soaplib.client import make_service_client
client = make_service_client(URL, YYY())
print client.zzz(a, b, c)
I get this error:
$ python x.py
Traceback (most recent call last):
File "x.py", line 32, in <module>
client.py", line 157, in __call__
payload, headers = from_soap(data)
soap.py", line 96, in from_soap
AttributeError: 'NoneType' object has no attribute 'getchildren'
Another question I have is what happens when the output is say an integer and a string?
I can't find an example for soaplib.
In the above case, the output is 3 strings.
I used Array(String).
I'm not even sure if that's correct.
How should I for instance specify output of an integer and a string?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list