473,406 Members | 2,378 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

SOAP Server with WSDL?

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

Dec 7 '06 #1
7 4981
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
Dec 7 '06 #2
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

Dec 7 '06 #3
On 7 dic, 18:52, tobiah <s...@tobiah.orgwrote:
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

Dec 7 '06 #4
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
Dec 7 '06 #5
>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
Dec 7 '06 #6

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.

Dec 8 '06 #7

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.
Dec 8 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: burdeen | last post by:
I've been trying to return an array with PHP5 soap. Is this not supported? or am i doing it wrong? Seems to return on the last element in the array. In my WSDL i've defined my return type as a...
0
by: David | last post by:
Hi everyone, I wonder how is it possible to make PHP SOAP extension convert the returned complex type to an instance of one of my classes. Here I give you a short example: complexTest.wsdl:...
16
by: MR | last post by:
my soap messages to a remote site are failing. as far as i can tell the only differences between what my SOAP message looks liek and what they want are in the SOAP envelope SInce they don't have a...
0
by: Jigar.Patel | last post by:
I have simple remoting server exposing following simple method. When I try to add webreference to this server in another project by serveraddresss?wsdl, it gives me following error: Custom tool...
0
by: Jigar.Patel | last post by:
I have simple remoting server exposing following simple method. When I try to add webreference to this server in another project, it gives me following error: Custom tool error: Unable to import...
0
by: kencana | last post by:
hi All, I got problem in passing data (more than one) from soap client to the soap server. but if i only passing one data at a time, it works successfully.. The following is the error message i...
1
by: Florian Grousset | last post by:
Hi, I'm trying to code a simple C# SOAP client wich query an Axis2 Java SOAP Server. Server side code has been generated from a WSDL file. SOAP requests and responses must both contain a simple...
7
by: beachdog | last post by:
I'm using Visual Studio 2005/C# to build a web client. The web server is something I've written in a different framework, which does not support generating wsdl, so I have hand-built a wsdl file,...
4
by: gcharbon | last post by:
Hi community, I have a problem with a Soap client written in php. I have a local server (coded in c and a client in c too, it works fine), but i want to test client in php, and i have an error...
0
by: Default User | last post by:
I work on creating test cases for a SOAP-based set of servers, using soapUI. I received and updated set of WSDL and schema files, and when I made new tests and mock server operations, all of the...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.