ZSI, SOAP and .NET web services - problem

J

Jaroslaw Zabiello

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\WSDLTools.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.
 
L

Laszlo Nagy

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:

http://wanderingbarque.com/nonintersecting/2006/11/15/the-s-stands-for-simple/


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
 
J

Jaroslaw Zabiello

Dnia Thu, 22 Mar 2007 18:44:31 +0100, Laszlo Nagy napisa³(a):
However, it is an interesting question. Ruby has smaller community,
how could they implement a standard SOAP lib?

Yes. It is interesting why it is so difficult to make it working for
Python.
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:

http://wanderingbarque.com/nonintersecting/2006/11/15/the-s-stands-for-simple/

Hehe, it was good. :)

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. :-(

I agree. The problem is, I have to live with this stupid, poor implemented
M$ technology. Ruby and with its standard SOAP library is able to live. Why
Python cannnot?
 
J

Jarek Zgoda

Jaroslaw Zabiello napisa³(a):
Yes. It is interesting why it is so difficult to make it working for
Python.

It is not difficult to write in .NET a client for the service
implemented on .NET platform. This is interoperability as understood by
Microsoft. BEA, IBM Oracle and others aren't any better.

If you really must write client for this service, go and do it in Ruby,
if it works.
 
P

Paul Boddie

Jaroslaw said:
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.

Locating fpconst has been quite a challenge in the past, but a search
for "fpconst" on Google yielded the Python Package Index entry pretty
quickly:

http://cheeseshop.python.org/pypi/fpconst/0.7.2

I believe the package archive is available directly from the above
location, but you can also find source packages for various GNU/Linux
distributions, BSDs, and so on. On the first search results page there
were links to such details for Fedora, FreeBSD, Darwin and Debian.

Paul
 
J

Jaroslaw Zabiello

Dnia Thu, 22 Mar 2007 22:48:26 +0100, Jarek Zgoda napisa³(a):
If you really must write client for this service, go and do it in Ruby,
if it works.

I cannot. I am using Pylons framework so I have to use Python. Ruby solves
this problem but not others, like its low speed.
 
D

David E. Konerding DSD staff

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\WSDLTools.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:

Actually, it's likely just more tolerant of an error in your WSDL
(leaving out your address binding).

Many of the WSDL toolkits ignore leaving out the address binding in the port type.

The java tooling seems to work that way and apparently ruby is the same way.

Try fixing your WSDL, then try again.
 
J

Jaroslaw Zabiello

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.
 
R

Ravi Teja

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


The problem is I see no errors in my WSDL. Pythonic implementation of SOAP
is just crapy.

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top