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

My SOAP::Lite faults won't work under mod_perl/Apache::Registry

Expand Messages
  • Fran Fabrizio
    Hello all, I ran into a problem this morning regarding using the SOAP fault system with SOAP::Lite from a script that is under Apache::Registry. This is
    Message 1 of 2 , Oct 4, 2001
    • 0 Attachment
      Hello all,

      I ran into a problem this morning regarding using the SOAP fault system
      with SOAP::Lite from a script that is under Apache::Registry. This is
      actually an XMLRPC script using the XMLRPC support in SOAP::Lite;

      While running as a normal CGI script, this:

      ----------------------------------------------------------------
      #!/usr/bin/perl
      use XMLRPC::Transport::HTTP;

      XMLRPC::Transport::HTTP::CGI
      -> dispatch_to('TestPackage')
      -> handle;

      package TestPackage;

      sub getFault {
      die "Something bad happened.\n";
      }
      ----------------------------------------------------------------

      returns:
      bash-2.04$ ./faultclient.pl
      Server, Something bad happened.

      However, when I then run this exact script under Apache::Registry,
      I get:

      bash-2.04$ ./faultclient.pl
      500 Internal Server Error at ./faultclient.pl line 6

      The code for my client is:

      ------------------------------------------------------------------------------------------------------

      #!/usr/bin/perl
      use XMLRPC::Lite;

      my $lite = XMLRPC::Lite->proxy('http://myserver/perl/faultserver.pl');

      #my $lite =
      XMLRPC::Lite->proxy('http://myserver/cgi-bin/faultserver.pl');
      my $result = $lite->call('TestPackage.getFault');

      unless ($result->fault) {
      $response = $result->result();
      } else {
      print join ', ',
      $result->faultcode,
      $result->faultstring;
      }
      -------------------------------------------------------------------------------------------------------

      My guess is that the Apache::Registry is trapping the die and it never
      gets propagated to SOAP::Lite. How does one handle this scenario? Is
      it possible to use faults in a mod_perl/Apache::Registry environment?
      The section in the SOAP::Lite web docs regarding handling errors
      does not cover this scenario.

      Thanks,
      Fran
    • Paul Kulchenko
      Hi, Fran! I already answered this question on DM s SOAP list [http://discuss.develop.com/archives/wa.exe?A2=ind0110&L=soap&F=&S=&P=991], but we may continue
      Message 2 of 2 , Oct 4, 2001
      • 0 Attachment
        Hi, Fran!

        I already answered this question on DM's SOAP list
        [http://discuss.develop.com/archives/wa.exe?A2=ind0110&L=soap&F=&S=&P=991],
        but we may continue here if you have more information or still have
        the same problem. Thanks.

        Best wishes, Paul.

        --- Fran Fabrizio <ffabrizio@...> wrote:
        > Hello all,
        >
        > I ran into a problem this morning regarding using the SOAP fault
        > system
        > with SOAP::Lite from a script that is under Apache::Registry. This
        > is
        > actually an XMLRPC script using the XMLRPC support in SOAP::Lite;
        >
        > While running as a normal CGI script, this:
        >
        > ----------------------------------------------------------------
        > #!/usr/bin/perl
        > use XMLRPC::Transport::HTTP;
        >
        > XMLRPC::Transport::HTTP::CGI
        > -> dispatch_to('TestPackage')
        > -> handle;
        >
        > package TestPackage;
        >
        > sub getFault {
        > die "Something bad happened.\n";
        > }
        > ----------------------------------------------------------------
        >
        > returns:
        > bash-2.04$ ./faultclient.pl
        > Server, Something bad happened.
        >
        > However, when I then run this exact script under Apache::Registry,
        > I get:
        >
        > bash-2.04$ ./faultclient.pl
        > 500 Internal Server Error at ./faultclient.pl line 6
        >
        > The code for my client is:
        >
        >
        ------------------------------------------------------------------------------------------------------
        >
        > #!/usr/bin/perl
        > use XMLRPC::Lite;
        >
        > my $lite =
        > XMLRPC::Lite->proxy('http://myserver/perl/faultserver.pl');
        >
        > #my $lite =
        > XMLRPC::Lite->proxy('http://myserver/cgi-bin/faultserver.pl');
        > my $result = $lite->call('TestPackage.getFault');
        >
        > unless ($result->fault) {
        > $response = $result->result();
        > } else {
        > print join ', ',
        > $result->faultcode,
        > $result->faultstring;
        > }
        >
        -------------------------------------------------------------------------------------------------------
        >
        > My guess is that the Apache::Registry is trapping the die and it
        > never
        > gets propagated to SOAP::Lite. How does one handle this scenario?
        > Is
        > it possible to use faults in a mod_perl/Apache::Registry
        > environment?
        > The section in the SOAP::Lite web docs regarding handling errors
        > does not cover this scenario.
        >
        > Thanks,
        > Fran
        >
        >
        > ------------------------ 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!?
        NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
        http://geocities.yahoo.com/ps/info1
      Your message has been successfully submitted and would be delivered to recipients shortly.