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

RE: [soaplite] Handling timeouts

Expand Messages
  • Sean.Meisner@VerizonWireless.com
    Hi David, die may be used as Perl s equivalent to Java s throw . To catch the exception, use the block form of eval . The block form of eval is roughly
    Message 1 of 2 , Apr 8, 2002
      Hi David,

      "die" may be used as Perl's equivalent to Java's "throw".
      To catch the exception, use the block form of "eval". The
      block form of "eval" is roughly equivalent to Java's "try".
      Then, to see if an exception occurred in the eval block,
      check to see if the special variable $@ is defined. You'll
      find that the conditional expression "if ($@)" is roughly
      equivalent to Java's "catch".

      So, you would wrap the section of code which may die like

      # code which may die; in your case, the SOAP::Lite stuff
      if ($@)
      # Oops, the code in the above eval block died!

      Hope it helps,


      > -----Original Message-----
      > From: kafka.rm [mailto:kafka@...]
      > Sent: Monday, April 08, 2002 9:59 AM
      > To: soaplite@yahoogroups.com
      > Subject: [soaplite] Handling timeouts
      > Hi everybody!
      > Perhaps a simple question, but I've tried and can't find any clues
      > really..
      > I'm running a SOAP::Lite client from within an perl-based
      > application server (Intershop 4). What I would like to do is to
      > detect when the SOAP-server dosen't answer and react to that.
      > I know you can use the timeout-property ( $soap->proxy
      > ('http://localhost/', timeout => 5); )to set the time-out but as far
      > as I understand, what happens when this time-out occures is just
      > that the module does a "die" or something.
      > I would like to have code executed instead, something I would
      > acomplish by catching an exception in java for example.
      > Does anybody have any suggestions? I'd be really greatfull!
      > Best regards,
      > David Backman, Web Trade Systems
      > ------------------------ Yahoo! Groups Sponsor
      > ---------------------~-->
      > SALE --> Wireless Video Cameras
      > for Home Surveillance! VERY TINY! PRICE BREAKTHROUGH - $79.99!
      > http://us.click.yahoo.com/W0toNC/7o6DAA/yigFAA/W6uqlB/TM
      > --------------------------------------------------------------
      > -------~->
      > 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/
    Your message has been successfully submitted and would be delivered to recipients shortly.