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

Successfully Calling Stateful EJB w/ SOAP::Lite and Apache SOAP

Expand Messages
  • Tony Payne
    I just spent 3 days beating my head against a wall trying to figure out how to successfully call a stateful session bean using SOAP::Lite and Apache SOAP. The
    Message 1 of 5 , Mar 25 12:04 PM
    • 0 Attachment
      I just spent 3 days beating my head against a wall trying to figure out
      how to successfully call a stateful session bean using SOAP::Lite and
      Apache SOAP.

      The Apache SOAP portion is very straightforward, requiring the use of
      the standard provider:
      org.apache.soap.providers.StatefulEJBProvider.

      However, the SOAP::Lite part didn't make sense to me (and to be honest,
      it still doesn't, since I don't really know SOAP). I spent most of that
      time trying to figure out why cookie-based sessions weren't working.
      Turns out, that's not the way it's done!

      Anyway, I'm attaching the client that I was able to get working, in case
      anyone else needs a jump-start.

      ++t
    • Tony Payne
      Forgot the attachment :-)
      Message 2 of 5 , Mar 25 12:06 PM
      • 0 Attachment
        Forgot the attachment :-)
      • Byrne Reese
        Good resource. I posted it to soapenv (crediting it to you of course). FYI - soapenv is a Web services developer resource site. If you would like me to take it
        Message 3 of 5 , Mar 25 12:09 PM
        • 0 Attachment
          Good resource. I posted it to soapenv (crediting it to you of course).

          FYI - soapenv is a Web services developer resource site. If you would
          like me to take it down, let me know... ;-)

          On Mon, 2002-03-25 at 12:04, Tony Payne wrote: I just spent 3 days
          beating my head against a wall trying to figure out
          how to successfully call a stateful session bean using SOAP::Lite and
          Apache SOAP.

          The Apache SOAP portion is very straightforward, requiring the use of
          the standard provider:
          org.apache.soap.providers.StatefulEJBProvider.

          However, the SOAP::Lite part didn't make sense to me (and to be honest,
          it still doesn't, since I don't really know SOAP). I spent most of that
          time trying to figure out why cookie-based sessions weren't working.
          Turns out, that's not the way it's done!

          Anyway, I'm attaching the client that I was able to get working, in case
          anyone else needs a jump-start.

          ++t




          Yahoo! Groups Sponsor
          ADVERTISEMENT


          To unsubscribe from this group, send an email to:
          soaplite-unsubscribe@yahoogroups.com



          Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

          --
          :/ byrne

          breese@...
          (415) 544-7732
        • Byrne Reese
          I am a dork - it is posted on http://soapenv.org On Mon, 2002-03-25 at 12:04, Tony Payne wrote: I just spent 3 days beating my head against a wall trying to
          Message 4 of 5 , Mar 25 12:10 PM
          • 0 Attachment
            I am a dork - it is posted on http://soapenv.org

            On Mon, 2002-03-25 at 12:04, Tony Payne wrote: I just spent 3 days
            beating my head against a wall trying to figure out
            how to successfully call a stateful session bean using SOAP::Lite and
            Apache SOAP.

            The Apache SOAP portion is very straightforward, requiring the use of
            the standard provider:
            org.apache.soap.providers.StatefulEJBProvider.

            However, the SOAP::Lite part didn't make sense to me (and to be honest,
            it still doesn't, since I don't really know SOAP). I spent most of that
            time trying to figure out why cookie-based sessions weren't working.
            Turns out, that's not the way it's done!

            Anyway, I'm attaching the client that I was able to get working, in case
            anyone else needs a jump-start.

            ++t




            Yahoo! Groups Sponsor
            ADVERTISEMENT


            To unsubscribe from this group, send an email to:
            soaplite-unsubscribe@yahoogroups.com



            Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

            --
            :/ byrne

            breese@...
            (415) 544-7732
          • 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 5 of 5 , Mar 25 2:27 PM
            • 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.