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

3867Re: [soaplite] how to trace a error those generated at runtime by server in soap::Lite

Expand Messages
  • Mark Fuller
    Aug 19, 2004
    • 0 Attachment
      --- Rushikesh Joshi <rushi_asi@...> wrote:
      > I have really no any idea how can i trace the error
      > that are generated at runtime.

      Are you saying trace/trap errors the server has with
      the client's parms (or other processing using those
      parms), and trace/trap them on the server? Or,
      trap/trace errors the server returns to the client,
      and trap/trace them on the client?

      In the first case, everywhere you would generate a
      soapfault message in your server you'd have to write
      custom log messages to a file.

      In the second case, the server would do something like

      die SOAP::Fault->faultcode('Server.Custom') # will be
      ->faultstring('Died in server method')
      ->faultdetail(bless {code => 1} => 'BadError')

      And the client
      if ($result->fault) {
      print 'faultcode: ' . $result->faultcode . "\n";
      print 'faultstring: ' . $result->faultstring . "\n";
      print 'faultdetail: ' . $result->faultdetail . "\n";
      # returns the value of faultdetail'
      element as string or object
      print '... access into nested hash (key \'code\'
      within key \'BadError\'): '
      ${${$result->faultdetail}{BadError}}{code} . "\n";

      print 'faultactor: ' . $result->faultactor . "\n";


      Does that help?

      Do you Yahoo!?
      Win 1 of 4,000 free domain names from Yahoo! Enter now.
    • Show all 8 messages in this topic