Problems getting Python client (SOAPpy) to consume .NET web services

Benjamin Niemann b.niemann at betternet.de
Tue Sep 14 10:39:05 CEST 2004


Michael Hatmaker wrote:

> I have begun experimenting with web services, and I created some
> simple web services in C# and was able to install them with IIS and
> create an equally simple C# client to consume them.
> 
> My next experiment was to use Python to consume these same web
> services, and even though I am able to get Python to consume web
> services from a variety of sources (Apache SOAP, Glue, AXIS), I cannot
> get web services created with MS.NET to work. Actually, methods with
> no arguments work fine, but any methods that take arguments do not
> work. There is no error, it is simply that an incorrect result is
> returned (i.e. my simple Add(int a, int b) web service always returns
> zero).
> 
> I tried playing around with the
> [SoapDocumentService(Use=SoapBindingUse.Literal,
> ParameterStyle=SoapParameterStyle.Wrapped)] arguments in .NET, but I
> have had no success as of yet. I don't think it's just me since I
> cannot consume any of the web services on webmethods.net that are
> created using MS.NET.
> 
> My Python code looks something like this:
> 
> from SOAPpy import WSDL
> server = WSDL.Proxy('http://localhost/MyWebServices/FirstService.asmx?WSDL')
> server.SayHello()    # works correctly - just prints a hello message
> server.Add(3, 4)     # does not work - returns zero
> 
> Any tip that would point me in the right direction would be greatly
> appreciated!
I tried this some time before, too. Actually cannot remember, if I finally 
succeeded. I think using keyword arguments in Python got me one step further, e.g.:
server.Add(a=3, b=4)



More information about the Python-list mailing list