Hello,

I am new to implementing and consuming web services with Python.  I
have had
some success setting up a simple SOAPServer and connecting to it and
also using
some of the simpler (one parameter) web services available from
xmethods.org.
I
am currently stuck trying to use a simple hashing service that requires
more
than one parameter to be passed.  I have done a lot of searching and
tried
passing the parameters in many ways.  I think I am stuck on what type
of data
structure to pass the service.

here's the xmethod service profile
http://www.xmethods.net/ve2/ViewListing.po;jsessionid=zbLKBgtAiSjIS-KAclxRipnP(QHyMHiRM)?key=uuid:FD460436-81BF-86BD-F252-2AB6C00B624C

Below is an example attempt.  Thanks in advance for any suggestions.

Python 2.3.3 (#1, May  7 2004, 10:31:40)
[GCC 3.3.3 20040412 (Red Hat Linux 3.3.3-7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import SOAPpy
>>> wsdlFile = 'http://www.bs-byg.dk/hashclass.wsdl'
>>> server.soapproxy.config.dumpSOAPOut =1
>>> server.soapproxy.config.dumpSOAPIn =1
>>> server.debug = 1
>>> server.HashString({'Str':'test','HashType':'MD5'})
*** Outgoing SOAP
******************************************************
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";
  xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance";
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
  xmlns:xsd="http://www.w3.org/1999/XMLSchema";
>
<SOAP-ENV:Body>
<HashString SOAP-ENC:root="1">
<v1>
<HashType xsi:type="xsd:string">MD5</HashType>
<Str xsi:type="xsd:string">test</Str>
</v1>
</HashString>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
************************************************************************
*** Incoming SOAP
******************************************************
<?xml version="1.0" encoding="utf-8"?><soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";><soap:Body><HashStringResponse
xmlns="http://tempuri.org/HashService/HashClass";
/></soap:Body></soap:Envelope>
************************************************************************
<SOAPpy.Types.structType HashStringResponse at -1213191124>: {}

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to