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

Newbie Questions

Expand Messages
  • Greg Zoller
    Hello. Here are a couple of newbie SOAP::Lite questions I hope someone can help me with. ==================================================================
    Message 1 of 6 , Apr 27, 2001
    • 0 Attachment
      Hello. Here are a couple of newbie SOAP::Lite questions I hope
      someone can help me with.

      ==================================================================

      Q1) This is a basic protocol question. When SOAP::Lite invokes
      a remote method call on some server, does the server create a new
      local object instance? If so, how/when does that get cleaned up,
      or does the server just keep growing in size? Maybe this is a
      general SOAP question regardless of the client.

      ==================================================================

      Q2) I'm calling methods on remote objects (running on GLUE).
      Here's my code:

      #!/opt/perl/bin/perl
      use SOAP::Lite +autodispatch =>
      uri => 'urn:silver',
      proxy => 'http://localhost:8004/glue'
      ;
      my $result = pulse(); # pulse() is a remote method call

      If I add the on_fault clause I see that this is indeed giving
      me an error but I don't know how decipher the $soap and $res
      objects in the error subroutine to tell me anything meaningful.
      I know for a fact that the server is alive and well.

      IN FACT... the following code (wihtout autodispatch) works great:

      #!/opt/perl/bin/perl
      use SOAP::Lite;
      $s = SOAP::Lite
      -> uri('urn:silver')
      -> proxy('http://localhost:8004/glue')
      ;
      $result = $s->pulse(); # returns int takes no params
      print "PULSE: " . $result->result . "\n";

      Anyone have an idea why my autodispatch version doesn't work?

      ==================================================================

      Q3) On the client side, is there any way I can dump out the incoming
      and outgoing SOAP XML? I'm curious to see what's in there.

      ==================================================================

      Thanks in advance for any replies.
      Greg
      _________________________________________________________________
      Get your FREE download of MSN Explorer at http://explorer.msn.com
    • Paul Kulchenko
      Hi, Greg! ... By default if server creates object it returns it on client side with response, and DO NOT keep copy on server side. You MAY store copy on server
      Message 2 of 6 , Apr 28, 2001
      • 0 Attachment
        Hi, Greg!

        --- Greg Zoller <gzoller@...> wrote:
        > Q1) This is a basic protocol question. When SOAP::Lite invokes
        > a remote method call on some server, does the server create a new
        > local object instance? If so, how/when does that get cleaned up,
        > or does the server just keep growing in size? Maybe this is a
        > general SOAP question regardless of the client.
        By default if server creates object it returns it on client side with
        response, and DO NOT keep copy on server side. You MAY store copy on
        server side or with static variables (like in
        My/PersistentIterator.pm) or with object-by-reference interface, or
        somehow else (I'm working on other mechanisms, using
        Apache::Sessions). In general, object is returned and client can send
        it back with other calls if required.

        > Q2) I'm calling methods on remote objects (running on GLUE).
        > Here's my code:
        >
        > #!/opt/perl/bin/perl
        > use SOAP::Lite +autodispatch =>
        > uri => 'urn:silver',
        > proxy => 'http://localhost:8004/glue'
        > ;
        > my $result = pulse(); # pulse() is a remote method call
        >
        > If I add the on_fault clause I see that this is indeed giving
        > me an error but I don't know how decipher the $soap and $res
        > objects in the error subroutine to tell me anything meaningful.
        > I know for a fact that the server is alive and well.
        you may take a look in Quick Start Guide
        (http://guide.soaplite.com/)where described how to work with
        on_fault.

        > IN FACT... the following code (wihtout autodispatch) works great:
        >
        > #!/opt/perl/bin/perl
        > use SOAP::Lite;
        > $s = SOAP::Lite
        > -> uri('urn:silver')
        > -> proxy('http://localhost:8004/glue')
        > ;
        > $result = $s->pulse(); # returns int takes no params
        > print "PULSE: " . $result->result . "\n";
        >
        > Anyone have an idea why my autodispatch version doesn't work?
        Difficult to say without seeing wiredump. See the next questions and
        send request/response wiredumpt to me (paulclinger@...) if it
        won't help you to fing an answer.

        > Q3) On the client side, is there any way I can dump out the
        > incoming
        > and outgoing SOAP XML? I'm curious to see what's in there.
        use on_debug(sub{print@_}) to get response/request information.

        use SOAP::Lite +autodispatch =>
        uri => 'urn:silver',
        proxy => 'http://localhost:8004/glue',
        on_debug => sub{print@_},
        ;

        -- or --

        $s = SOAP::Lite
        -> uri('urn:silver')
        -> proxy('http://localhost:8004/glue')
        -> on_debug(sub{print@_})
        ;

        Best wishes, Paul.

        __________________________________________________
        Do You Yahoo!?
        Yahoo! Auctions - buy the things you want at great prices
        http://auctions.yahoo.com/
      • Craig Kelley
        Can I do autodispatch with XMLRPC? If I attempt to use the same method that I use with SOAP::Lite, I always get this error: $ ./client.pl Can t call method
        Message 3 of 6 , Apr 29, 2001
        • 0 Attachment
          Can I do autodispatch with XMLRPC? If I attempt to use the same method
          that I use with SOAP::Lite, I always get this error:

          $ ./client.pl
          Can't call method "send_receive" on an undefined value at /usr/lib/perl5/site_perl/5.6.0/SOAP/Lite.pm line 143.

          Thanks,

          Craig
        • Paul Kulchenko
          Hi, Craig! Yes, autodispatch wasn t addressed in the first version (I didn t think anybody will use it for XML-RPC. There is no package/object analogies as far
          Message 4 of 6 , Apr 29, 2001
          • 0 Attachment
            Hi, Craig!

            Yes, autodispatch wasn't addressed in the first version (I didn't
            think anybody will use it for XML-RPC. There is no package/object
            analogies as far as I can see). I have a patch for it, you may use it
            and next version will include this functionality:

            update new() method in XMLRPC::Lite package with:

            sub new {
            my $self = shift;

            unless (ref $self) {
            my $class = ref($self) || $self;
            $self = $class->SUPER::new(
            serializer => XMLRPC::Serializer->new,
            deserializer => XMLRPC::Deserializer->new,
            on_action => sub {return},
            @_
            );
            } else {
            $self->SUPER::new(@_);
            }
            return $self;
            }

            There is no XMLRPC:: prefix yet (as you have SOAP:: prefix in
            SOAP::Lite), and it will be included for your convenience in the next
            version.

            Hope it helps and let me know if you have any other questions.

            Best wishes, Paul.

            --- Craig Kelley <kellcrai@...> wrote:
            >
            > Can I do autodispatch with XMLRPC? If I attempt to use the same
            > method
            > that I use with SOAP::Lite, I always get this error:
            >
            > $ ./client.pl
            > Can't call method "send_receive" on an undefined value at
            > /usr/lib/perl5/site_perl/5.6.0/SOAP/Lite.pm line 143.
            >
            > Thanks,
            >
            > Craig
            >
            >
            >
            > To unsubscribe from this group, send an email to:
            > soaplite-unsubscribe@yahoogroups.com
            >
            >
            >
            > Your use of Yahoo! Groups is subject to
            > http://docs.yahoo.com/info/terms/
            >
            >


            __________________________________________________
            Do You Yahoo!?
            Yahoo! Auctions - buy the things you want at great prices
            http://auctions.yahoo.com/
          • Craig Kelley
            Hey Paul, Thanks for the patch, but all it seems to do is gobble up all my free memory and start swapping the system. :) If I comment out the serializer line
            Message 5 of 6 , Apr 29, 2001
            • 0 Attachment
              Hey Paul,

              Thanks for the patch, but all it seems to do is gobble up all my free
              memory and start swapping the system. :) If I comment out the serializer
              line then all is fine, but autodispatch doesn't seem to work. I'm using
              SOAP::Lite 0.50

              Thanks again for this great module!

              -Craig

              On Sun, 29 Apr 2001, Paul Kulchenko wrote:

              > Hi, Craig!
              >
              > Yes, autodispatch wasn't addressed in the first version (I didn't
              > think anybody will use it for XML-RPC. There is no package/object
              > analogies as far as I can see). I have a patch for it, you may use it
              > and next version will include this functionality:
              >
              > update new() method in XMLRPC::Lite package with:
              >
              > sub new {
              > my $self = shift;
              >
              > unless (ref $self) {
              > my $class = ref($self) || $self;
              > $self = $class->SUPER::new(
              > serializer => XMLRPC::Serializer->new,
              > deserializer => XMLRPC::Deserializer->new,
              > on_action => sub {return},
              > @_
              > );
              > } else {
              > $self->SUPER::new(@_);
              > }
              > return $self;
              > }
              >
              > There is no XMLRPC:: prefix yet (as you have SOAP:: prefix in
              > SOAP::Lite), and it will be included for your convenience in the next
              > version.
              >
              > Hope it helps and let me know if you have any other questions.
              >
              > Best wishes, Paul.
              >
              > --- Craig Kelley <kellcrai@...> wrote:
              > >
              > > Can I do autodispatch with XMLRPC? If I attempt to use the same
              > > method
              > > that I use with SOAP::Lite, I always get this error:
              > >
              > > $ ./client.pl
              > > Can't call method "send_receive" on an undefined value at
              > > /usr/lib/perl5/site_perl/5.6.0/SOAP/Lite.pm line 143.
              > >
              > > Thanks,
              > >
              > > Craig
              > >
              > >
              > >
              > > To unsubscribe from this group, send an email to:
              > > soaplite-unsubscribe@yahoogroups.com
              > >
              > >
              > >
              > > Your use of Yahoo! Groups is subject to
              > > http://docs.yahoo.com/info/terms/
              > >
              > >
              >
              >
              > __________________________________________________
              > Do You Yahoo!?
              > Yahoo! Auctions - buy the things you want at great prices
              > http://auctions.yahoo.com/
              >
              > To unsubscribe from this group, send an email to:
              > soaplite-unsubscribe@yahoogroups.com
              >
              >
              >
              > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
              >
              >

              --
              It won't be long before the CPU is a card in a slot on your ATX videoboard
              Craig Kelley -- kellcrai@...
              http://www.isu.edu/~kellcrai finger ink@... for PGP block
            • Paul Kulchenko
              Hi, Craig! Hm, that s strange. Only two lines were added: } else { $self- SUPER::new(@_); and this example works for me (with patched version): use
              Message 6 of 6 , Apr 29, 2001
              • 0 Attachment
                Hi, Craig!

                Hm, that's strange. Only two lines were added:

                } else {
                $self->SUPER::new(@_);

                and this example works for me (with patched version):

                use XMLRPC::Lite +autodispatch =>
                proxy => 'http://soaplite.com/xmlrpc/echo.cgi',
                ;

                print echo('hello!');

                Could something else cause swapping? :))

                Best wishes, Paul.

                --- Craig Kelley <kellcrai@...> wrote:
                >
                > Hey Paul,
                >
                > Thanks for the patch, but all it seems to do is gobble up all my
                > free
                > memory and start swapping the system. :) If I comment out the
                > serializer
                > line then all is fine, but autodispatch doesn't seem to work. I'm
                > using
                > SOAP::Lite 0.50
                >
                > Thanks again for this great module!
                >
                > -Craig
                >
                > On Sun, 29 Apr 2001, Paul Kulchenko wrote:
                >
                > > Hi, Craig!
                > >
                > > Yes, autodispatch wasn't addressed in the first version (I didn't
                > > think anybody will use it for XML-RPC. There is no package/object
                > > analogies as far as I can see). I have a patch for it, you may
                > use it
                > > and next version will include this functionality:
                > >
                > > update new() method in XMLRPC::Lite package with:
                > >
                > > sub new {
                > > my $self = shift;
                > >
                > > unless (ref $self) {
                > > my $class = ref($self) || $self;
                > > $self = $class->SUPER::new(
                > > serializer => XMLRPC::Serializer->new,
                > > deserializer => XMLRPC::Deserializer->new,
                > > on_action => sub {return},
                > > @_
                > > );
                > > } else {
                > > $self->SUPER::new(@_);
                > > }
                > > return $self;
                > > }
                > >
                > > There is no XMLRPC:: prefix yet (as you have SOAP:: prefix in
                > > SOAP::Lite), and it will be included for your convenience in the
                > next
                > > version.
                > >
                > > Hope it helps and let me know if you have any other questions.
                > >
                > > Best wishes, Paul.
                > >
                > > --- Craig Kelley <kellcrai@...> wrote:
                > > >
                > > > Can I do autodispatch with XMLRPC? If I attempt to use the
                > same
                > > > method
                > > > that I use with SOAP::Lite, I always get this error:
                > > >
                > > > $ ./client.pl
                > > > Can't call method "send_receive" on an undefined value at
                > > > /usr/lib/perl5/site_perl/5.6.0/SOAP/Lite.pm line 143.
                > > >
                > > > Thanks,
                > > >
                > > > Craig
                > > >
                > > >
                > > >
                > > > To unsubscribe from this group, send an email to:
                > > > soaplite-unsubscribe@yahoogroups.com
                > > >
                > > >
                > > >
                > > > Your use of Yahoo! Groups is subject to
                > > > http://docs.yahoo.com/info/terms/
                > > >
                > > >
                > >
                > >
                > > __________________________________________________
                > > Do You Yahoo!?
                > > Yahoo! Auctions - buy the things you want at great prices
                > > http://auctions.yahoo.com/
                > >
                > > To unsubscribe from this group, send an email to:
                > > soaplite-unsubscribe@yahoogroups.com
                > >
                > >
                > >
                > > Your use of Yahoo! Groups is subject to
                > http://docs.yahoo.com/info/terms/
                > >
                > >
                >
                > --
                > It won't be long before the CPU is a card in a slot on your ATX
                > videoboard
                > Craig Kelley -- kellcrai@...
                > http://www.isu.edu/~kellcrai finger ink@... for PGP
                > block
                >
                >
                >
                > To unsubscribe from this group, send an email to:
                > soaplite-unsubscribe@yahoogroups.com
                >
                >
                >
                > Your use of Yahoo! Groups is subject to
                > http://docs.yahoo.com/info/terms/
                >
                >


                __________________________________________________
                Do You Yahoo!?
                Yahoo! Auctions - buy the things you want at great prices
                http://auctions.yahoo.com/
              Your message has been successfully submitted and would be delivered to recipients shortly.