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

Re: [soapbuilders] SOAP::fault problem

Expand Messages
  • Byrne Reese
    Hmm. Shouldn t it be as simple as: my $client = SOAP::Lite - uri( http://x.y.com/XYZ ) - proxy( http://x.y.com/location/xyz.cgi ); my $response =
    Message 1 of 3 , Mar 5, 2003
    • 0 Attachment
      Hmm. Shouldn't it be as simple as:

      my $client = SOAP::Lite
      ->uri('http://x.y.com/XYZ')
      ->proxy('http://x.y.com/location/xyz.cgi');

      my $response = $client->processRequest($var);

      if ($response->fault) {
      print $response->faultstring;
      } else {
      print $response;
      }

      On Wed, 2003-03-05 at 11:43, raddi123 wrote:
      > I am using
      > SOAP::Lite +autodispatch =>uri=>'http://x.y.com/XYZ',
      > proxy=>'http://x.y.com/location/xyz.cgi';
      >
      > my $client=XYZ->processRequest($var);
      > print $client;
      > The above code works. But I want to add code to detect faultstring
      > since sometimes when executing the above code I get 500 Internal
      > Server Error, which is not that descriptive.
      >
      > So I added some code and the resulting code looks like following:
      > SOAP::Lite +autodispatch =>uri=>'http://x.y.com/XYZ',
      > proxy=>'http://x.y.com/location/xyz.cgi';
      >
      > my $client=XYZ->processRequest($var);
      > if($client->fault){
      > print $client->faultstring;
      > }else{
      > print $client;
      > }
      >
      > This code gives me following error:
      > Can't call method 'fault' without a package or object reference
      >
      > I dont know how to get the faultstring?
      > Thanks in advance for your help
      >
      >
      >
      >
      > -----------------------------------------------------------------
      > This group is a forum for builders of SOAP implementations to discuss implementation and interoperability issues. Please stay on-topic.
      >
      > To unsubscribe from this group, send an email to:
      > soapbuilders-unsubscribe@yahoogroups.com
      >
      >
      >
      > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    • raddi123
      Thanks. I was using the autodispatch method so that I dont have to use reference. I changed the code and now it does not give me any errors. Thanks ...
      Message 2 of 3 , Mar 5, 2003
      • 0 Attachment
        Thanks. I was using the autodispatch method so that I dont have to
        use reference. I changed the code and now it does not give me any
        errors. Thanks

        --- In soapbuilders@yahoogroups.com, Byrne Reese <breese@g...> wrote:
        > Hmm. Shouldn't it be as simple as:
        >
        > my $client = SOAP::Lite
        > ->uri('http://x.y.com/XYZ')
        > ->proxy('http://x.y.com/location/xyz.cgi');
        >
        > my $response = $client->processRequest($var);
        >
        > if ($response->fault) {
        > print $response->faultstring;
        > } else {
        > print $response;
        > }
        >
        > On Wed, 2003-03-05 at 11:43, raddi123 wrote:
        > > I am using
        > > SOAP::Lite +autodispatch =>uri=>'http://x.y.com/XYZ',
        > > proxy=>'http://x.y.com/location/xyz.cgi';
        > >
        > > my $client=XYZ->processRequest($var);
        > > print $client;
        > > The above code works. But I want to add code to detect
        faultstring
        > > since sometimes when executing the above code I get 500 Internal
        > > Server Error, which is not that descriptive.
        > >
        > > So I added some code and the resulting code looks like following:
        > > SOAP::Lite +autodispatch =>uri=>'http://x.y.com/XYZ',
        > > proxy=>'http://x.y.com/location/xyz.cgi';
        > >
        > > my $client=XYZ->processRequest($var);
        > > if($client->fault){
        > > print $client->faultstring;
        > > }else{
        > > print $client;
        > > }
        > >
        > > This code gives me following error:
        > > Can't call method 'fault' without a package or object reference
        > >
        > > I dont know how to get the faultstring?
        > > Thanks in advance for your help
        > >
        > >
        > >
        > >
        > > -----------------------------------------------------------------
        > > This group is a forum for builders of SOAP implementations to
        discuss implementation and interoperability issues. Please stay on-
        topic.
        > >
        > > To unsubscribe from this group, send an email to:
        > > soapbuilders-unsubscribe@yahoogroups.com
        > >
        > >
        > >
        > > Your use of Yahoo! Groups is subject to
        http://docs.yahoo.com/info/terms/
      Your message has been successfully submitted and would be delivered to recipients shortly.