Loading ...
Sorry, an error occurred while loading the content.

Re: [soaplite] Successfully Calling Stateful EJB w/ SOAP::Lite and Apache SOAP

Expand Messages
  • Paul Kulchenko
    Hi, Tony! ... No, that s not in spec. It s basically the way to work with non-serializable objects without changes on client side. For example you want to
    Message 1 of 5 , Mar 25, 2002
    • 0 Attachment
      Hi, Tony!

      --- Tony Payne <anthonyp@...> wrote:
      > Anyplace I can go to figure out why I need to do that/how remote
      > references work? Is that in the SOAP spec?
      No, that's not in spec. It's basically the way to work with
      non-serializable objects without changes on client side.

      For example you want to return object that is serializable:

      server:
      ....
      ->dispatch_to('MyClass')

      client:
      use SOAP::Lite +autodispatch =>
      ....;

      $object = MyClass->new('foo'); # << here's real object
      $object->bar;

      Now you have some object that has filehandles, dbhandles, globs or
      references to big chunks of data that you don't want to put on wire:

      server:
      ....
      ->dispatch_to('MyClass')
      ->objects_by_reference('MyClass')

      client:
      use SOAP::Lite +autodispatch =>
      ....;

      $object = MyClass->new('foo'); # << here's dummy object
      $object->bar;

      As you see code is exactly the same on client side. You won't be able
      to access DATA from that object (they aren't there), but all methods
      will work and if you do ref() you'll get 'MyClass', but internal
      structure is different.

      On server side you just say that you want objects of this class to
      keep on server side and SOAP::Lite should do the rest for you (it
      works only on top levels for now; if you include references to those
      objects inside other object, it won't work. No magic in this case,
      though I have plans to make it work across entire serialization
      tree). There are examples about garbage collection in this case (some
      of them were discussed on this list AFAIR). Let me know if you need
      more information on something.

      I'm cc-ing SOAP::Lite list, it may be helpful for others.

      Best wishes, Paul.

      __________________________________________________
      Do You Yahoo!?
      Yahoo! Movies - coverage of the 74th Academy Awards´┐Ż
      http://movies.yahoo.com/
    Your message has been successfully submitted and would be delivered to recipients shortly.