Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Using Perl's SOAP::Lite to talk to Python

by mitd (Curate)
on Jul 18, 2002 at 00:10 UTC ( [id://182658]=note: print w/replies, xml ) Need Help??


in reply to Using Perl's SOAP::Lite to talk to Python

The problem is you are asking SOAP to do more than it is capable of. SOAP is not a distributed object framework it is Simply an Object Access Protocol :).

Think of your methods on the service (server) side as services or helpers for a remote client object.

So with this in mind have your Python friend create a class on his client side that uses your services/methods to help his class fulfil its needs.

The idea of Object/Class Services is a powerful one. and takes a little getting use too but as a guy who has spent the last 3 months in Java Enterprise Bean hell I really have come to appreciate the simplicity of SOAP and the idea of services vs full blown distribute objects.

Hope this helps.

BTW, on a technical note the reason your code did not work as expected is you tried to pass what in reality was a reference to an object which SOAP just can't do.

mitd-Made in the Dark
'Interactive! Paper tape is interactive!
If you don't believe me I can show you my paper cut scars!'

  • Comment on Re: Using Perl's SOAP::Lite to talk to Python

Replies are listed 'Best First'.
Re: Re: Using Perl's SOAP::Lite to talk to Python
by Matts (Deacon) on Jul 18, 2002 at 07:46 UTC
    Well you can actually do this, but the client needs to support using the object as a Flyweight object. This is exactly why the Perl client worked, as it does support flyweights directly - most (maybe all) other SOAP implementations don't, so you have to implement that yourself.

    Basically all a flyweight does in this case is holds an object ID, and on the server end the SOAP server holds a list of pre-constructed objects matched to IDs. When your client wants to call a method on that object-id, AUTOLOAD kicks in and asks the remote end for the right method on the object matching that id value.

    Then there's some stuff about Object reaping that you don't need to worry too much about.

    Hope that helps - the soaplite list is a really good place to ask these sorts of questions.

      The fact that Ovid's app broke as soon as a non-SOAP::Lite client was used is proof to me that using these SOAP::Lite specific features is only a good idea in closed environments.

      Its inevitable that folks will use SOAP to build' yet another distributed object framework'. Eric Raymond points out in this open letter why this probably not a good idea.

      mitd-Made in the Dark
      'Interactive! Paper tape is interactive!
      If you don't believe me I can show you my paper cut scars!'

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://182658]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2024-04-23 18:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found