grahamd at dscpl.com.au
Mon Jun 30 02:03:21 CEST 2003
Nick Vargish <nav at adams.patriot.net> wrote in message news:<yyybrwj8lpq.fsf at adams.patriot.net>...
> Glauco <glauco at sferacarta.com> writes:
> > I'm going crazy because function are not documented .
> > Exist another solution for di a SOAP CLient ??
> There's ZSI, which has been called "more mature" by some people, but I
> can't see much of a difference in approachability. Neither seems to be
> very well documented. What I could really use are some more
> Here's one of the Perl scripts I'm trying to translate:
> use SOAP::Lite;
> print SOAP::Lite
> -> uri('urn:Temperatures')
> -> proxy('http://clerkcap.house.gov/scripts/temper.pl')
> -> f2c($ARGV)
> -> result;
> It's just one call. What's the Pythonic equivalent, using either
> SOAP.py or the ZSI package?
> Obviously, I need a better understanding of how SOAP is supposed to
> work, but even that basic documentation is surprisingly hard to find
> on the Web.
One of the issues with ZSI is it is more setup for use in calling
methods use named parameters. The above example, which actually
uncontactable, uses positional parameters and not named parameters. To
this end, the simplest mechanism provided by ZSI to make calls, isn't
to work properly for various reasons.
If you are indeed only interested in servers where methods have
parameters, you might have a look at the "zsirpc" module for Python.
module is a simple wrapper around ZSI providing a kindler interface in
style of the "xmlrpclib" module specifically for calling servers with
using positional parameters only.
If you want to try this out without having to download the package, go
This is a web based front end around the SOAP client code which the
module provides. It will allow you to make calls against services
over the Internet to gauge whether the ZSI package is going to work
in the manner that the "zsirpc" interface uses it.
The equivalent Python code using the "zsirpc" module to make the same
call as you list is:
url = 'http://clerkcap.house.gov/scripts/temper.pl'
uri = 'urn:Temperatures'
action = ''
#service = zsirpc.RemoteService(url,ns=uri,soapaction=action)
service = zsirpc.RemoteService(url,ns=uri)
Unfortunately I can't verify that this works since the call times out
As the interface provided by "zsirpc" is simpler in that it is a much
restrictive interface doing one specific thing, the documentation
cover it isn't much. For that go to:
and then go into the chapter title "Remote Access" and look for the
on the "SOAP Gateway" to see how the client is configurable. Frankly
though, the "ns"
and "soapaction" attributes above are about as far as it goes. Do note
that "zsirpc" is a subset of what is described in all that
documentation and is provided
as a separate package as a convenience. Where the documentation says
read it is meaning "zsirpc" and if something refers to just "netrpc",
again in code using
just "zsirpc", use "zsirpc" instead of "netrpc".
The only other bit of extensibility built in is that it has the
ability to automatically manage
types for Boolean, Binary (as BASE64), Date, DateTime, Time and
about these types is described in the "Message Encoding" chapter of
You should ignore the bits about adding in new types as that only
applies to the framework
that "zsirpc" has been extracted from. If you did want to add news
types with "zsirpc"
you would need to drop down and use the ZSI packages way of defining
might have to override an encoding method in the "zsirpc" package as
well, but can't
remember right now.
One warning, and I believe this still also applies to ZSI as well.
That is, that ZSI seems
to only interpret its own type of error response as returned by
servers. Thus, it will
work fine against a ZSI server, but use it against another server
which uses its own
means of encoding the detail associated with an error response, and
you might not
be able to do too much with it. The "zsripc" package understands the
ZSI error response
and one other which is particular to the framework it has been
extracted from, so it
doesn't do too much more to help you in that respect.
As to where you can get "zsirpc" from, go to the downloads section of:
You might also be interested in getting down the "netrpc" package.
This contains both
a SOAP client and XML-RPC client where the interface is basically the
same with type
objects interchangeable between both. Use "netrpc" instead of "zsirpc"
and you will not
need to translate names when applying what the documentation says.
More information about the Python-list