J
John Gordon
I'm developing a program that will use web services, which I have never
used before.
There are several tutorials out there that advise you to get the WSDL
and then call a method (such as wsdl2py) that inspects the wsdl and
automagically generates the python classes and methods you need for
interacting with that web service.
I've tried this, and have run into a number of roadblocks that have left
me frustrated.
For example I tried wsdl2py() from the ZSI package, and got this error:
Error loading services.xml:
namespace of schema and import match
I tried WSDL.Proxy() from the SOAPpy package and eventually end up
with this error:
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 1, column 6
I tried Client() from the suds package, and got this error:
File "/usr/lib/python2.3/site-packages/suds/client.py", line 59
@classmethod
^
SyntaxError: invalid syntax
I'm not an expert; I have no idea what any of these errors mean, and I
have no idea how to go about resolving them.
So I decided to take a step back and see if I could bypass all the fancy
automagic methods and just create my own SOAP xml message from scratch
and then send it to the web server. That would work, surely.
But I'm having a tough time finding some good examples of that, because
all the tutorials I've found just tell you to use the aforementioned
magic methods, which unfortunately don;t seem to be working for me.
Does anyone have some good examples of code that builds a "raw" xml SOAP
message and sends it to a webserver, then reads the response? I think
that would be a good place for me to start.
Thanks for any replies.
used before.
There are several tutorials out there that advise you to get the WSDL
and then call a method (such as wsdl2py) that inspects the wsdl and
automagically generates the python classes and methods you need for
interacting with that web service.
I've tried this, and have run into a number of roadblocks that have left
me frustrated.
For example I tried wsdl2py() from the ZSI package, and got this error:
Error loading services.xml:
namespace of schema and import match
I tried WSDL.Proxy() from the SOAPpy package and eventually end up
with this error:
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 1, column 6
I tried Client() from the suds package, and got this error:
File "/usr/lib/python2.3/site-packages/suds/client.py", line 59
@classmethod
^
SyntaxError: invalid syntax
I'm not an expert; I have no idea what any of these errors mean, and I
have no idea how to go about resolving them.
So I decided to take a step back and see if I could bypass all the fancy
automagic methods and just create my own SOAP xml message from scratch
and then send it to the web server. That would work, surely.
But I'm having a tough time finding some good examples of that, because
all the tutorials I've found just tell you to use the aforementioned
magic methods, which unfortunately don;t seem to be working for me.
Does anyone have some good examples of code that builds a "raw" xml SOAP
message and sends it to a webserver, then reads the response? I think
that would be a good place for me to start.
Thanks for any replies.