soaplib newbie question
Jon Hune
jonhune at yahoo.com
Thu Jun 5 18:53:52 EDT 2008
hi everyone,
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
class YYY(SimpleWSGISoapApp):
@soapmethod(Integer, Integer, String, _returns = Array(String))
def zzz(self, a, b, c):
pass
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>
orderNumber)
File "/usr/lib/python2.5/site-packages/soaplib-0.7.1dev_r17-py2.5.egg/soaplib/
client.py", line 157, in __call__
payload, headers = from_soap(data)
File "/usr/lib/python2.5/site-packages/soaplib-0.7.1dev_r17-py2.5.egg/soaplib/
soap.py", line 96, in from_soap
if len(body.getchildren()):
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?
thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080605/b3557ab7/attachment.html>
More information about the Python-list
mailing list