Which is the most mature Soap module?
Mickel Grönroos
mickel at csc.fi
Tue Jun 8 06:54:00 EDT 2004
On Tue, 8 Jun 2004, Mickel Grönroos wrote:
> [...]
> 2. Run an upload function with two parameters (string "fullpath" and
> base64 encoded "filecontent") on another SOAP server adding the cookie to
> the HTTP header being sent with the SOAP message
> [...]
> >>> import base64
> >>> data = base64.encodestring("the crap to upload")
> >>> uploadservice.upload("/tmp/crap.txt", data)
> Traceback (most recent call last):
> [...]
I got this working by using Send() for sending the SOAP message calling
the upload command instead of using upload() directly:
>>> uploadservice.Send(None, 'ns1:upload',
... ("/tmp/crap.txt", data),
... nsdict={'ns1':'urn:Files'})
>>>
The success of the command can be tested like this:
>>> try: uploadservice.Receive()
... except: print "failed"
...
1
>>>
The clue that solved the mystery was found here:
<http://www-106.ibm.com/developerworks/webservices/library/ws-pyth8.html>
/Mickel (over and out)
More information about the Python-list
mailing list