469,282 Members | 1,944 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,282 developers. It's quick & easy.

ZSI, SOAP and .NET web services - problem

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_drive r
#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.

--
Jarosław Zabiełło
http://blog.zabiello.com
Mar 22 '07 #1
9 2655
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/noninters...ds-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

Mar 22 '07 #2
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/noninters...ds-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?

--
Jaroslaw Zabiello
http://blog.zabiello.com
Mar 22 '07 #3
Jaroslaw Zabiello 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.
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.

--
Jarek Zgoda
http://jpa.berlios.de/
Mar 22 '07 #4
Jaroslaw Zabiello wrote:
>
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

Mar 22 '07 #5
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.

--
Jaroslaw Zabiello
http://blog.zabiello.com
Mar 22 '07 #6
Jaroslaw Zabiello <hi**********@gmail.comwrote:
Why nobody wants to add SOAP to standard Python library? XML-RPC was added
and it works without any problems.
I think because SOAP is kinda crappy :-)

Did you try soaplib? <http://trac.optio.webfactional.com/>

I've never used it (nor SOAP in a while) but seems promising

--
Lawrence, oluyede.org - neropercaso.it
"It is difficult to get a man to understand
something when his salary depends on not
understanding it" - Upton Sinclair
Mar 23 '07 #7
On 2007-03-22, Jaroslaw Zabiello <hi**********@gmail.comwrote:
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.
Mar 26 '07 #8
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
Mar 26 '07 #9
On Mar 26, 3:47 pm, Jaroslaw Zabiello <hipertrac...@gmail.comwrote:
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 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.

Mar 27 '07 #10

This discussion thread is closed

Replies have been disabled for this discussion.

By using this site, you agree to our Privacy Policy and Terms of Use.