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

on_fault() should not die

Expand Messages
  • csuresh02
    Hello All, I am trying to send a request to soap server, while do when server doesn t responds it throws a error and on_fault is being called and error message
    Message 1 of 1 , Feb 14, 2006
    • 0 Attachment
      Hello All,
      I am trying to send a request to soap server, while do when server
      doesn't responds it throws a error and on_fault is being called and
      error message display and scripts die.

      In on_fault() I like to call some other function. I tried this but
      failed.. Can some body let me know how to do this..

      Here is my code..

      $str = (q'<getRequest><REQUEST><TABLE name="TABLE_ALAD_USERSA"
      operation="fetch"><RECORD seqNo="all"><FIELD
      name="Seq_nbr"></FIELD><FIELD name="UserID"></FIELD><FIELD
      name="Description"></FIELD><FIELD name="Password"></FIELD><FIELD
      name="ProfileID"></FIELD></RECORD></TABLE></REQUEST></getRequest>');

      my $soap = SOAP::Lite
      -> uri('urn:CSSoapServer')
      -> proxy('http://172.31.201.14:6088',timeout => 10);

      $elem = SOAP::Data->type('xml'=>$str);
      my $res = $soap->getConfiguration($elem);

      unless ($res->fault)
      {
      $res = $res->result();
      print $res->Description;
      }
      else
      {
      print join ', ',
      $res->faultcode,
      $res->faultstring,
      $res->faultdetail;
      ProcessThis();
      }


      sub ProcessThis
      {
      print "Here it won't handle with SQAP Request\n";
      }
    Your message has been successfully submitted and would be delivered to recipients shortly.