Not able to successfully call a webservice created in c# in python.

pratibha.kachi at gmail.com pratibha.kachi at gmail.com
Mon Sep 15 07:19:49 EDT 2008


I have created a webservice in C# which I am able to call in win Form
client but when I call it using python it gives http 415 error.

>>> import SOAPpy
>>> server = SOAPpy.SOAPProxy("http://localhost:8731/Design_Time_Addresses/WcfSe
rviceLibrary1/Service1/WS")
>>> print server.GetData(1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\python25\lib\xmlrpclib.py", line 1147, in __call__
    return self.__send(self.__name, args)
  File "C:\python25\lib\xmlrpclib.py", line 1437, in __request
    verbose=self.__verbose
  File "C:\python25\lib\xmlrpclib.py", line 1191, in request
    headers
xmlrpclib.ProtocolError: <ProtocolError for localhost:8731/
Design_Time_Addresses
/WcfServiceLibrary1/Service1/WS: 415 Cannot process the message
because the cont
ent type 'text/xml' was not the expected type 'application/soap+xml;
charset=utf
-8'.>




More information about the Python-list mailing list