Home » Category » Python

Python: ZSI, SOAP and .NET web services - problem

200| Sun, 18 May 2008 21:21:00 GMT| jaroslaw_zabiello| Comments (3)
I try to connect to web services (written in C#/.NET) with latest ZSI
2.0rc3 library. It just does not work.

from ZSI.ServiceProxy import ServiceProxy
wsdl = 'http://192.168.0.103/NewWebServices/TemplateInsert.asmx?wsdl'
print ServiceProxy(wsdl, tracefile=sys.stdout)

"C:\opt\Python25\lib\site-packages\zsi-2.0_rc3-py2.5.egg\ZSI\wstools\WSDLToo
ls.py",
line 1116, in getAddressBinding
WSDLError: No address binding found in port.

This pythonic library must be stupid, because I have no problem to connect
with... Ruby:

require 'soap/wsdlDriver'
require 'rexml/document'
wsdl = 'http://192.168.0.103/NewWebServices/TemplateInsert.asmx?wsdl'
soap = SOAP::WSDLDriverFactory.new(wsdl).create_rpc_driver
#soap.wiredump_file_base = 'soapresult'
p soap.templateInsert('')

It is a shame why Python still has so poor SOAP implementation. Ruby has
SOAP in *standard library*, Python - not. Even PHP5 has very good SOAP
library built in.

I tried to use different library - SOAPpy, but I couldn't. It requires
fpconst library which cannot be installed because its server does not
respond at all. What a shit...

Why nobody wants to add SOAP to standard Python library? XML-RPC was added
and it works without any problems.
Jarosaw Zabieo
http://blog.zabiello.com

Keywords & Tags: zsi, soap, .net, web, services, python, dotnet

URL: http://programming.itags.org/python/103909/
 
«« Prev - Next »» 3 helpful answers below.

> I tried to use different library - SOAPpy, but I couldn't. It requires
> fpconst library which cannot be installed because its server does not
> respond at all. What a shit...
>

I concur! When I tried to use ZSI the first time, it turned out it has
no support for attachments. Next time I it turned out that it requires
PyXML, which has no support and cannot be installed for Window + Python
2.5. Then I needed to use WSSE login, and then I wanted to authenticate
with x509. Too many problems. SOAP support for Python is bad indeed.

> Why nobody wants to add SOAP to standard Python library? XML-RPC was added
> and it works without any problems


Unfortunately, cursing won't help. It would be the best to join the ZSI
group - it is where we can help. However, it is an interesting question.
Ruby has smaller community, how could they implement a standard SOAP lib?

My personal opinion is that SOAP is a piece of shit itself. It is
hampered from the beginning. If you are interested why, read this:

[url]http://wanderingbarque.com/nonintersecting/2006/11/15/the-s-stands-for-simple/[/ur
l]

XML-RPC is a fantastic, often undervalued protocol. You can create a
new, secure XML-RPC server in Python within 5 minutes. You can write a
client for it within one minue. It is REALLY simple. I'm using it
continuously.

In contrast, SOAP is overcomplicated and anything but simple. No one
should create new web services using SOAP. We have enough problems with
the existing ones. :-(

Despite SOAP is even not a finished standard, big software companies are
pushing the technology, can someone explain why? Is it because it only
works correctly with Java and .NET? I guess the reasons are quite
financial. :-(

Laszlo

laszlonagy | Sun, 18 May 2008 21:22:00 GMT |

Dnia Mon, 26 Mar 2007 20:06:28 +0000 (UTC), David E. Konerding DSD staff
napisa(a):

> Try fixing your WSDL, then try again.


The problem is I see no errors in my WSDL. Pythonic implementation of SOAP
is just crapy.
Jaroslaw Zabiello
http://blog.zabiello.com

jaroslaw_zabiello | Sun, 18 May 2008 21:23:00 GMT |

On Mar 26, 3:47 pm, Jaroslaw Zabiello <hipertrac......gmail.com> wrote:
> Dnia Mon, 26 Mar 2007 20:06:28 +0000 (UTC), David E. Konerding DSD staff
> napisa=B3(a):
>
> The problem is I see no errors in my WSDL. Pythonic implementation of SOAP
> is just crapy.
> --
> Jaroslaw Zabiellohttp://blog.zabiello.com


As Lawrence suggested, did you try soaplib? It is a newer project. Try
the more recent svn version
svn co https://svn.optio.webfactional.com/soaplib/trunk soaplib

In my experience, it is more compliant than ZSI, although I mainly
used it as a server than a client.

Ravi Teja.

raviteja | Sun, 18 May 2008 21:24:00 GMT |

Python Hot Answers

Python New questions

Python Related Categories