By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,965 Members | 1,631 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,965 IT Pros & Developers. It's quick & easy.

SOAPpy and callback

P: n/a
Hello,

I'm trying to find how to use a callback in a SOAP client using SOAPpy.
Does SOAPpy have to manage it, or does Python include some API to do
it?

Thanks a lot.
Fabien

Oct 12 '06 #1
Share this Question
Share on Google+
9 Replies


P: n/a
fa***********@gmail.com schrieb:
Hello,

I'm trying to find how to use a callback in a SOAP client using SOAPpy.
Does SOAPpy have to manage it, or does Python include some API to do
it?
I've never seen any callback mentioned in SOAP. Are you sure this is
possible with any SOAP implementation, at least standard-wise?

Diez
Oct 13 '06 #2

P: n/a
SOAP standard doesn't provide any callback, and it looks like SOAPpy
doesn't too.
I remember using callbacks with Javascript and SOAP in Web pages. I was
just wondering if there could be the same with Python.

Thanks for your answer.

Oct 13 '06 #3

P: n/a
fa***********@gmail.com schrieb:
SOAP standard doesn't provide any callback, and it looks like SOAPpy
doesn't too.
I remember using callbacks with Javascript and SOAP in Web pages. I was
just wondering if there could be the same with Python.
How that? I seriously doubt that, it would mean that the server would be
able to issue an request on its own to the browser - a technical
impossibility in current browser implementations.

Just because you used a callback inside a js-soap-implementation that
works with deferreds or something similar doesn't mean that the soap
itself knew callbacks.

Diez
Oct 13 '06 #4

P: n/a
"Diez B. Roggisch" <de***@nospam.web.dewrote in message
news:4p************@uni-berlin.de...
fa***********@gmail.com schrieb:
>Hello,

I'm trying to find how to use a callback in a SOAP client using SOAPpy.
Does SOAPpy have to manage it, or does Python include some API to do
it?

I've never seen any callback mentioned in SOAP. Are you sure this is
possible with any SOAP implementation, at least standard-wise?

Diez
This is most definitely possible, in fact it is the basis for a new
asynchronous data collection standard for semiconductor equipment, Interface
A (replacing the ancient SECS/GEM interface, originally designed to work
over RS-232). However, it is a major pain to implement.

As you suggest, you cannot do this from a simple browser or pure SOAP
client. To support SOAP callbacks, the client must also itself be a SOAP
server. The client sends its own callback server's URL to the primary
server, and when callbacks are needed, they are sent to that callback URL.
This really does get quite tricky, though. For one thing, the vagaries of
network identification make it unsure whether the URL composed by the client
for its callback is meaningful/accessible to the server.

In addition, if you are considering implementing this over the untrusted
internet, you should use SSL authentication both ways (although this further
complicates your client).

-- Paul
Oct 13 '06 #5

P: n/a
Paul McGuire schrieb:
"Diez B. Roggisch" <de***@nospam.web.dewrote in message
news:4p************@uni-berlin.de...
>fa***********@gmail.com schrieb:
>>Hello,

I'm trying to find how to use a callback in a SOAP client using SOAPpy.
Does SOAPpy have to manage it, or does Python include some API to do
it?
I've never seen any callback mentioned in SOAP. Are you sure this is
possible with any SOAP implementation, at least standard-wise?
This is most definitely possible, in fact it is the basis for a new
asynchronous data collection standard for semiconductor equipment, Interface
A (replacing the ancient SECS/GEM interface, originally designed to work
over RS-232). However, it is a major pain to implement.

I don't call 'you can do that on your own' as standard-wise.

Certainly you can run two servers, make sure they are mutually
reachable, and client and server share the same process space.

But that is not a callback - it is, as you say, a PITA. And a massive
lack in the SOAP standard.

Regards,

Diez
Oct 13 '06 #6

P: n/a
"Diez B. Roggisch" <de***@nospam.web.dewrote in message
news:4p************@uni-berlin.de...
Paul McGuire schrieb:
>"Diez B. Roggisch" <de***@nospam.web.dewrote in message
news:4p************@uni-berlin.de...
>>fa***********@gmail.com schrieb:
Hello,

I'm trying to find how to use a callback in a SOAP client using SOAPpy.
Does SOAPpy have to manage it, or does Python include some API to do
it?
I've never seen any callback mentioned in SOAP. Are you sure this is
possible with any SOAP implementation, at least standard-wise?
This is most definitely possible, in fact it is the basis for a new
asynchronous data collection standard for semiconductor equipment,
Interface A (replacing the ancient SECS/GEM interface, originally
designed to work over RS-232). However, it is a major pain to implement.


I don't call 'you can do that on your own' as standard-wise.

Certainly you can run two servers, make sure they are mutually reachable,
and client and server share the same process space.

But that is not a callback - it is, as you say, a PITA. And a massive lack
in the SOAP standard.

Regards,

Diez
I like your term "standard-wise". Although there is nothing in the SOAP
"standard" that prevents this architecture, it is probably open for
discussion whether it is "wise."

As it happens, the client and server *don't* share the same process space -
they don't even share the same computer.

And it *does* work, I'm running the software on a couple of systems in my
office right now.

-- Paul
Oct 13 '06 #7

P: n/a
I like your term "standard-wise". Although there is nothing in the SOAP
"standard" that prevents this architecture, it is probably open for
discussion whether it is "wise."
Might stem from "standardweise", the german word for something that is
part of a standard, or e.g. something always having this or that feature.
As it happens, the client and server *don't* share the same process space -
they don't even share the same computer.

And it *does* work, I'm running the software on a couple of systems in my
office right now.
Maybe we have a misunderstanding here. I'm not a native speaker, so bear
with me.

In CORBA or RMI, there is a notion of an object/interface reference
passed around, which allows for callbacks in a natural way. Which is
AFAIK not the case in SOAP. Hell, they don't even know objects and
stateful connections...

That you obviously can define a system that needs several SOAP servers
to interact with each other - well, you could also perform inter process
communication using printed documents, some horses and either OCR or
data typists. But this isn't exactly inter process communication in my
book, albeit there certainly _are_ processes, _and_ communication :)

Diez
Oct 14 '06 #8

P: n/a
"Diez B. Roggisch" <de***@nospam.web.dewrote in message
news:4p************@uni-berlin.de...
Maybe we have a misunderstanding here. I'm not a native speaker, so bear
with me.
That's okay, I'll type very, very slowly. :)
In CORBA or RMI, there is a notion of an object/interface reference passed
around, which allows for callbacks in a natural way. Which is AFAIK not
the case in SOAP. Hell, they don't even know objects and stateful
connections...
Are you confusing SOAP with REST? The standard I refer to defines a set of
WSDL files that can be crunched to build implementation bindings for C#,
Boo, Java, etc. (Unfortunately, not Python - there is some issue with SOAPpy
that will not handle the input WSDL.) These bindings do model the remote
interface bindings as objects, and stateful connections and sessions are
very much part of the standard. If you like, you can download the WSDL
files at http://dom.semi.org/web/wstandards.nsf/supmaterials.

It is true, the implementation of the callback in SOAP is quite crude, as it
exposes the callback as an endpoint wrapped around a URL string. Not very
object-y at all - but then think back to CORBA again, and many systems did
something similar by passing around names bound to objects in a nameserver,
or just cut to the chase and shipped IOR's around directly.
That you obviously can define a system that needs several SOAP servers to
interact with each other - well, you could also perform inter process
communication using printed documents, some horses and either OCR or data
typists. But this isn't exactly inter process communication in my book,
albeit there certainly _are_ processes, _and_ communication :)
About 10 years ago, the standards body for semiconductor process integration
*was* using IDL to define process interfaces, and defining CORBA
implementation bindings. Unfortunately, the CORBA learning curve was too
much, and the implementations were too expensive (at the time; today ACE and
omniOrb are reasonable platforms). The group today went with SOAP, defining
a set of WSDL files to serve as the standard interface definition, in place
of the CORBA IDL of yore.

And what you describe might still be a step up from the RS-232-based system
in place today (instituted in the 70's, upgraded to ethernet in the late
80's, but still limited to encoded ASCII and point-to-point connections).

I would definitely agree that working with callbacks in SOAP sometimes feels
like an unnatural act. But it is clearly an interprocess communication, and
it does have an object model to its language bindings. Any Rube Goldberg
aspects to SOAP are neatly buried in the code generated from the WSDL.

-- Paul


Oct 14 '06 #9

P: n/a
Ok guys, thanks for the lesson! I'm probably not going to try to
implement this solution. However, I've learned a lot!

Oct 15 '06 #10

This discussion thread is closed

Replies have been disabled for this discussion.