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

3881Re: [soaplite] Incorrect error handling ?

Expand Messages
  • Rushikesh Joshi
    Aug 22, 2004
    • 0 Attachment

      I have faced same problem that you having. And this group helps me lot.
      Try out below code to work throo.
      some code.....
      my $soapresult = SOAP::Lite
                      -> service('WDSL_SERVICE_LOCATOR')
                      -> getCustomerID($id);

      my $som = $soapresult->call();
      if ($som->fault) {
          # it failed
          print $som->faultdetail;
          print $som->faultcode;
          print $som->faultstring;
      } else {
          # it worked
          print $som->$result; #This will print result
      SOM's other access methods are ....
        print "\n","Fault Details:\n",$som->faultdetail,"\n";
        print "\n","Fault Code:\n",$som->faultcode,"\n";
        print "\n","Fault String:\n",$som->faultstring,"\n";
        print "\n","Fault faultactor:\n",$som->faultactor,"\n";
        print "\n","Fault Body:\n",$som->body,"\n"; #Dumper($som->body) 
        print "\n","Fault header:\n",$som->header,"\n"; #Dumper($som->body)
        print "\n","Fault headers:\n",$som->headers,"\n"; #Dumper($som->body)
        print "\n","Fault envelope:\n",$som->envelope,"\n"; #Dumper($som->body)
        body and envelop are returning HASH so u need do Data Dumper view it. 
        use Data::Dumper; to initialize Dumper Class 
       Helps to others, see others will help you.

      doevincent <doevincent@...> wrote:

      I have a SOAP-client that looks like this :

      #!/usr/bin/perl -w
      use SOAP::Lite +trace => [qw(method trace fault)];
      sub SOAP::Transport::HTTP::Client::get_basic_credentials {
         return 'myid' => 'youdwannaknowdontyou?';

      my $id = "SOMEID";

      my $soapresult = SOAP::Lite
                      -> service('WDSL_SERVICE_LOCATOR')
                      -> getCustomerID($id);

      if ($soapresult->fault)
              print "\n\n\n\n\n\n\n";
              print "FAULT!!!!!!!";
      } else

      However, in returning, the SOAP-server sends a response that is
      indicating an error :



      Do you Yahoo!?
      New and Improved Yahoo! Mail - Send 10MB messages!

    • Show all 2 messages in this topic