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

question on SOAP::Transport::HTTP::Daemon syntax

Expand Messages
  • vivek_ramaswamy
    Greetings! I ve been playing with SOAP::LITE for a couple of days and have not been able to get my code to work. I m able to connect to the server but am not
    Message 1 of 3 , Oct 21, 2002
      Greetings!

      I've been playing with SOAP::LITE for a couple of days and have not
      been able to get my code to work. I'm able to connect to the server
      but am not able to call my subroutine successfully. The below code
      does not work and I'm not sure why. I'd be grateful if anyone can
      tell me what I'm doing wrong...it's got to be some dumb syntax issue
      that's just not obvious to me.

      Vivek

      Server:
      #####################################################################
      #!/usr/bin/perl -w
      use SOAP::Transport::HTTP;
      my $daemon = SOAP::Transport::HTTP::Daemon-> new (LocalAddr =>
      'localhost', LocalPort => 18084)
      -> dispatch_to('test');
      print "Contact to SOAP server at ", $daemon->url, "\n";
      $daemon->handle;

      package test;
      sub hi{
      return "hello";
      }

      ###################################################################


      Client:
      ####################################################################
      #!/usr/bin/perl -w
      use SOAP::Lite;
      print SOAP::Lite-> uri('http://outgroup:18084/perlSoap.pl')->
      proxy('http://outgroup:18084/perlSoap.pl')->hi()->result;

      ######################################################################
    • Paul Kulchenko
      Hi Vivek, ... There is a correlation between uri and package name used on a server side: PATH component of the uri should be the same as the package name
      Message 2 of 3 , Oct 21, 2002
        Hi Vivek,

        > tell me what I'm doing wrong...it's got to be some dumb syntax
        > issue that's just not obvious to me.

        > package test;

        > print SOAP::Lite-> uri('http://outgroup:18084/perlSoap.pl')->

        There is a correlation between uri and package name used on a server
        side: PATH component of the uri should be the same as the package
        name unless you use dispatch_with method to link uri/SOAPAction to
        specific class/object.

        try ->uri('http://outgroup/test')

        In general, printing fault information may help diagnose the problem:

        my $s = SOAP::Lite
        ->uri('http://outgroup:18084/perlSoap.pl')
        ->proxy('http://outgroup:18084/perlSoap.pl')
        ->hi();

        die $s->faultstring if $s->fault;
        print $s->result;

        Best wishes, Paul.

        --- vivek_ramaswamy <vivek_ramaswamy@...> wrote:
        > Greetings!
        >
        > I've been playing with SOAP::LITE for a couple of days and have not
        > been able to get my code to work. I'm able to connect to the server
        > but am not able to call my subroutine successfully. The below code
        > does not work and I'm not sure why. I'd be grateful if anyone can
        > tell me what I'm doing wrong...it's got to be some dumb syntax
        > issue
        > that's just not obvious to me.
        >
        > Vivek
        >
        > Server:
        >
        #####################################################################
        > #!/usr/bin/perl -w
        > use SOAP::Transport::HTTP;
        > my $daemon = SOAP::Transport::HTTP::Daemon-> new (LocalAddr =>
        > 'localhost', LocalPort => 18084)
        > -> dispatch_to('test');
        > print "Contact to SOAP server at ", $daemon->url, "
        ";
        > $daemon->handle;
        >
        > package test;
        > sub hi{
        > return "hello";
        > }
        >
        > ###################################################################
        >
        >
        > Client:
        >
        ####################################################################
        > #!/usr/bin/perl -w
        > use SOAP::Lite;
        > print SOAP::Lite-> uri('http://outgroup:18084/perlSoap.pl')->
        > proxy('http://outgroup:18084/perlSoap.pl')->hi()->result;
        >
        >
        ######################################################################
        >
        >
        >
        >
        >
        > ------------------------ Yahoo! Groups Sponsor
        >
        > 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!?
        Y! Web Hosting - Let the expert host your web site
        http://webhosting.yahoo.com/
      • Vivek Ramaswamy
        Paul, Thank you...this was exactly my problem. Best wishes, Vivek ... proxy( http://outgroup:18084/perlSoap.pl )- hi()- result; ...
        Message 3 of 3 , Oct 21, 2002
          Paul,

          Thank you...this was exactly my problem.

          Best wishes,

          Vivek
          --- Paul Kulchenko <paulclinger@...> wrote:
          > Hi Vivek,
          >
          > > tell me what I'm doing wrong...it's got to be some
          > dumb syntax
          > > issue that's just not obvious to me.
          >
          > > package test;
          >
          > > print SOAP::Lite->
          > uri('http://outgroup:18084/perlSoap.pl')->
          >
          > There is a correlation between uri and package name
          > used on a server
          > side: PATH component of the uri should be the same
          > as the package
          > name unless you use dispatch_with method to link
          > uri/SOAPAction to
          > specific class/object.
          >
          > try ->uri('http://outgroup/test')
          >
          > In general, printing fault information may help
          > diagnose the problem:
          >
          > my $s = SOAP::Lite
          > ->uri('http://outgroup:18084/perlSoap.pl')
          > ->proxy('http://outgroup:18084/perlSoap.pl')
          > ->hi();
          >
          > die $s->faultstring if $s->fault;
          > print $s->result;
          >
          > Best wishes, Paul.
          >
          > --- vivek_ramaswamy <vivek_ramaswamy@...>
          > wrote:
          > > Greetings!
          > >
          > > I've been playing with SOAP::LITE for a couple of
          > days and have not
          > > been able to get my code to work. I'm able to
          > connect to the server
          > > but am not able to call my subroutine
          > successfully. The below code
          > > does not work and I'm not sure why. I'd be
          > grateful if anyone can
          > > tell me what I'm doing wrong...it's got to be some
          > dumb syntax
          > > issue
          > > that's just not obvious to me.
          > >
          > > Vivek
          > >
          > > Server:
          > >
          >
          #####################################################################
          > > #!/usr/bin/perl -w
          > > use SOAP::Transport::HTTP;
          > > my $daemon = SOAP::Transport::HTTP::Daemon-> new
          > (LocalAddr =>
          > > 'localhost', LocalPort => 18084)
          > > -> dispatch_to('test');
          > > print "Contact to SOAP server at ", $daemon->url,
          > "
          > ";
          > > $daemon->handle;
          > >
          > > package test;
          > > sub hi{
          > > return "hello";
          > > }
          > >
          > >
          >
          ###################################################################
          > >
          > >
          > > Client:
          > >
          >
          ####################################################################
          > > #!/usr/bin/perl -w
          > > use SOAP::Lite;
          > > print SOAP::Lite->
          > uri('http://outgroup:18084/perlSoap.pl')->
          > >
          >
          proxy('http://outgroup:18084/perlSoap.pl')->hi()->result;
          > >
          > >
          >
          ######################################################################
          > >
          > >
          > >
          > >
          > >
          > > ------------------------ Yahoo! Groups Sponsor
          > >
          > > 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!?
          > Y! Web Hosting - Let the expert host your web site
          > http://webhosting.yahoo.com/


          __________________________________________________
          Do you Yahoo!?
          Y! Web Hosting - Let the expert host your web site
          http://webhosting.yahoo.com/
        Your message has been successfully submitted and would be delivered to recipients shortly.