Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > SOAP Server with WSDL?

Reply
Thread Tools

SOAP Server with WSDL?

 
 
tobiah
Guest
Posts: n/a
 
      12-07-2006
I'm having trouble finding information
about writing a SOAP server. I get the client
part. There is much information about writing
a client, but not so much about writing the server.
Are there some good tutorials?

I'm checking out:

http://pywebsvcs.sourceforge.net/

But I'm a little confused. Do I want ZSI or SOAPY?
The site says:

SOAPpy: A second web services toolkit which is getting
functionally integrated into the ZSI toolkit. In the
future, the Python Web Services Project will only support
one merged web services toolkit, under the ZSI name.

This make me think that I will use ZSI in the future,
but what about now? Do I need both now?

Thanks,

Toby

--
Posted via a free Usenet account from http://www.teranews.com

 
Reply With Quote
 
 
 
 
Chris Lambacher
Guest
Posts: n/a
 
      12-07-2006
On Thu, Dec 07, 2006 at 12:49:09PM -0800, tobiah wrote:
> I'm having trouble finding information
> about writing a SOAP server. I get the client
> part. There is much information about writing
> a client, but not so much about writing the server.
> Are there some good tutorials?
>
> I'm checking out:
>
> http://pywebsvcs.sourceforge.net/
>
> But I'm a little confused. Do I want ZSI or SOAPY?

You want ZSI. If you already have a wsdl you then use wsdl2py and
wsdl2dispatch to create your server classes. The server classes get used
with ZSI.ServiceContainer. Unfortunately there is not much documentation
about this. I figured it out by playing with the tests that ship with ZSI.

You might also want to check out ZSI the mailing list/archives which you can
get to from the above link.

> The site says:
>
> SOAPpy: A second web services toolkit which is getting
> functionally integrated into the ZSI toolkit. In the
> future, the Python Web Services Project will only support
> one merged web services toolkit, under the ZSI name.
>
> This make me think that I will use ZSI in the future,
> but what about now? Do I need both now?

You only need ZSI.
>
> Thanks,
>
> Toby
>
> --
> Posted via a free Usenet account from http://www.teranews.com
>
> --
> http://mail.python.org/mailman/listinfo/python-list

 
Reply With Quote
 
 
 
 
tobiah
Guest
Posts: n/a
 
      12-07-2006

> You want ZSI. If you already have a wsdl you then use wsdl2py and
> wsdl2dispatch to create your server classes. The server classes get used
> with ZSI.ServiceContainer. Unfortunately there is not much documentation
> about this.


Actually, do I have to make a WSDL? Do people hand write these, or
are there tools? I don't really need to publish an interface. I just
want some in house apps to communicate.

I can't figure out if I want SOAP, or CORBA, or would it just be
easier if I just starting opening sockets and firing data around
directly. Ideally, I'd like to share complex objects. That's why
I thought that I needed one of the above standards.

I'm confused by it all. Am I even looking in the right direction?

Thanks,

Toby

--
Posted via a free Usenet account from http://www.teranews.com

 
Reply With Quote
 
gagsl-py@yahoo.com.ar
Guest
Posts: n/a
 
      12-07-2006
On 7 dic, 18:52, tobiah <(E-Mail Removed)> wrote:

> Actually, do I have to make a WSDL? Do people hand write these, or
> are there tools? I don't really need to publish an interface. I just
> want some in house apps to communicate.
>
> I can't figure out if I want SOAP, or CORBA, or would it just be
> easier if I just starting opening sockets and firing data around
> directly. Ideally, I'd like to share complex objects. That's why
> I thought that I needed one of the above standards.


A few alternatives:

xml-rpc
Pros: multiplatform, multilanguage, standard, available in python std
lib, very simple to use
Cons: simple function calls only, limited argument types, no objects as
argument

Pyro <http://pyro.sourceforge.net/>
Pros: object based, multiplatform, full python language support
(argument list, keyword arguments...)
Cons: only Python supported, non standard

CORBA is a big beast and if you don't actually need it, don't use it...

--
Gabriel Genellina

 
Reply With Quote
 
Chris Lambacher
Guest
Posts: n/a
 
      12-07-2006
On Thu, Dec 07, 2006 at 01:52:59PM -0800, tobiah wrote:
>
> > You want ZSI. If you already have a wsdl you then use wsdl2py and
> > wsdl2dispatch to create your server classes. The server classes get used
> > with ZSI.ServiceContainer. Unfortunately there is not much documentation
> > about this.

>
> Actually, do I have to make a WSDL? Do people hand write these, or
> are there tools? I don't really need to publish an interface. I just
> want some in house apps to communicate.

If you can help it you don't write WSDL by hand. You don't even have to make a
WSDL, but it is convenient for describing interface and you can use things
like wsdl2py, wsdl2java, etc. to create the majority of the boiler plate parts
of the client/server code for you.
>
> I can't figure out if I want SOAP, or CORBA, or would it just be

Unless you are talking to an existing CORBA interface, don't go there.
> easier if I just starting opening sockets and firing data around
> directly. Ideally, I'd like to share complex objects. That's why
> I thought that I needed one of the above standards.
>
> I'm confused by it all. Am I even looking in the right direction?

Define complex objects. Is all your code in Python? Will it stay that way?
Are the running client and server versions always going to be in sync?

Depending on how complex, 'complex objects' are, You might be better off with
a XML-RPC, it is far less complicated, but since I don't really know what
problem you are trying to solve it is a little hard to make a definitive
recommendation.

Protocol definition is a tricky thing to get right without a lot of
experience. Picking an existing standard my help with your own sanity.
Note that to some extent you can pick and choose standards. For instance you
can use http as your transport using the URL as a method of defining where the
data goes. The data can be encoded in any one of a number of formats
including XML, JSON and pickle. If you happen to choose http and XML, you get
what is known as REST. Who/what you need to talk to and how complicated your
data is will dictate what subset of these you can use. Pick something that
will be easy to handle on both ends of the connection, i.e. if one end has to
be in C, make sure there is a library for it and take pickle out of your list
of options.

>
> Thanks,
>
> Toby
>
> --
> Posted via a free Usenet account from http://www.teranews.com
>
> --
> http://mail.python.org/mailman/listinfo/python-list

 
Reply With Quote
 
Diez B. Roggisch
Guest
Posts: n/a
 
      12-07-2006
>> I can't figure out if I want SOAP, or CORBA, or would it just be
> Unless you are talking to an existing CORBA interface, don't go there.


Can't agree to that. CORBA is by far better than SOAP. And writing an
IDL is actually a easy and straightforward thing to do - no tools
needed, as when writing WSDL. With omniORB there is a easy to use,
powerful and actively devloped ORB for python available.

The only thing that makes it complicated is life-cycle-management. You
don't get that for free. But then, it's a hard thing to do anyway in a
distributed evnvironment.

>> easier if I just starting opening sockets and firing data around
>> directly. Ideally, I'd like to share complex objects. That's why
>> I thought that I needed one of the above standards.


If all is python, use Pyro. If you need interoperability, and want
OO-style interfaces, use CORBA.

Steer clear from SOAP if you can. See

http://wanderingbarque.com/noninters...nds-for-simple

for more good reasons to avoid it at all cast than I can list here myself.

So if it must be XML, use XMLRPC. After all, you can marshal anything
over it if only you serialize dictionaries somehow - then the rest will
follow.


Diez
 
Reply With Quote
 
Ravi Teja
Guest
Posts: n/a
 
      12-08-2006

tobiah wrote:
> Actually, do I have to make a WSDL? Do people hand write these, or
> are there tools? I don't really need to publish an interface. I just
> want some in house apps to communicate.


Java and .NET based tools can auto-generate WSDL from code. Python does
not have such because function definitions do not contain the type
information required for such a tool. However , you can grab a free
Java (Netbeans with Enterprise pack) or .NET (Visual Studio Express)
IDE (or just the respective SDK if you don't mind reading through the
docs), create a stub function, mark it as a WebMethod, let it generate
the WSDL and pass it to wsdl2py that comes with ZSI. This is a twisted
approach.

But you state that you don't need to publish an interface. If that is
the case, it can be as simple as this.

import SOAPpy
def hello():
return "Hello World"

server = SOAP.SOAPServer(("localhost", 8080))
server.registerFunction(hello)
server.serve_forever()

Pasted from
http://pywebsvcs.sourceforge.net/soappy.txt

> I can't figure out if I want SOAP, or CORBA, or would it just be
> easier if I just starting opening sockets and firing data around
> directly. Ideally, I'd like to share complex objects. That's why
> I thought that I needed one of the above standards.


I posted a few days ago a simple guide to choosing a remoting
framework.
http://groups.google.com/group/comp....056c5c87279aca

For *complex* objects, you need a stateful remoting mechanism. The
choice is Pyro if both the server and all the clients are written in
Python. Else, use CORBA or ICE with DMI. All of these are simple to use
for simple remote object invocations although distributed computing in
general does have a learning curve.

Ravi Teja.

 
Reply With Quote
 
vasudevram
Guest
Posts: n/a
 
      12-08-2006

Ravi Teja wrote:
> tobiah wrote:
> > Actually, do I have to make a WSDL? Do people hand write these, or
> > are there tools? I don't really need to publish an interface. I just
> > want some in house apps to communicate.

>
> Java and .NET based tools can auto-generate WSDL from code. Python does
> not have such because function definitions do not contain the type
> information required for such a tool. However , you can grab a free
> Java (Netbeans with Enterprise pack) or .NET (Visual Studio Express)
> IDE (or just the respective SDK if you don't mind reading through the
> docs), create a stub function, mark it as a WebMethod, let it generate
> the WSDL and pass it to wsdl2py that comes with ZSI. This is a twisted
> approach.
>
> But you state that you don't need to publish an interface. If that is
> the case, it can be as simple as this.
>
> import SOAPpy
> def hello():
> return "Hello World"
>
> server = SOAP.SOAPServer(("localhost", 8080))
> server.registerFunction(hello)
> server.serve_forever()
>
> Pasted from
> http://pywebsvcs.sourceforge.net/soappy.txt
>
> > I can't figure out if I want SOAP, or CORBA, or would it just be
> > easier if I just starting opening sockets and firing data around
> > directly. Ideally, I'd like to share complex objects. That's why
> > I thought that I needed one of the above standards.

>
> I posted a few days ago a simple guide to choosing a remoting
> framework.
> http://groups.google.com/group/comp....056c5c87279aca
>
> For *complex* objects, you need a stateful remoting mechanism. The
> choice is Pyro if both the server and all the clients are written in
> Python. Else, use CORBA or ICE with DMI. All of these are simple to use
> for simple remote object invocations although distributed computing in
> general does have a learning curve.
>
> Ravi Teja.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Soap Extension problem (seems that soap request is not sent to server) Frederik Vanderhaegen ASP .Net Web Services 0 10-20-2006 09:18 AM
SOAP Request is repeated in the SOAP response. comp.text.xml XML 0 09-20-2006 08:41 AM
SOAP over JMS vs SOAP over HTTP Nagesh Java 2 08-12-2006 12:31 AM
To SOAP or Not To SOAP? mooseshoes XML 3 09-21-2003 04:38 PM
SOAP Client creation in ASP.NET using MS SOAP Toolkit Sham Ramakrishnan ASP .Net 2 07-01-2003 11:29 AM



Advertisments