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

Re: [soaplite] Wire dump for soap::Lite server

Expand Messages
  • Scott Bolte
    ... In addition to the sniffer tools mentioned earlier, I ve found a few hooks in the Client code to help. For example: sub send () { ... _debug_msg( Sending
    Message 1 of 1 , May 1 6:00 PM
    • 0 Attachment
      On Wed, 1 May 2002 12:32:00 -0700, "Khamesra, SandeepX" wrote:
      >
      > Does any one know how to get a wiredump of messages in SOAP::Lite
      > Server..Basically I ned to find what is Request and Response coming from
      > client and server.
      > Is there any thing equivalent of tuptunnel !!!

      In addition to the sniffer tools mentioned earlier, I've
      found a few hooks in the Client code to help. For example:

      sub send () {
      ...
      _debug_msg("Sending request #%d of %d bytes.\n",
      $self->{sent}, length($serial));
      if ($debug>1) {
      open(T, "|tidy -xml") or die;
      print T $serial;
      CORE::close(T);
      }
      $self->{wfh}->print($serial);
      }

      and

      sub receive () {
      ...
      _debug_msg("Received request #%d of %d bytes.\n",
      $self->{rcvd}, length($resp));
      if ($debug>1) {
      print(STDERR "resp = }} $resp {{\n");
      open(T, "|tidy -xml") or die;
      print T $resp;
      CORE::close(T);
      }
      return(SOAP::Deserializer->deserialize($resp));
      }

      They are suitable only for development, but I found the
      hooks very educational. Great way to learn more about the
      encoding. Also handy when I'm running asynchronously and
      issue multiple requests before I handle the queued responses.

      You'll note the raw dump in the receive method. Hard lesson
      there. My server's error message, sent to stderr, was
      coming across the wire and screwing things up. Tidy discarded
      the error message and only showed the XML envelope. Devil
      of a time tracking that one down. Shouldn't be a hazard
      for most other people, unless you inadvertently capture
      'extra' info from the server, but I thought I should pass
      on the warning.

      Btw, I had to do it this way since my transport is SSH and
      sniffing the traffic wasn't an option.

      Scott
    Your message has been successfully submitted and would be delivered to recipients shortly.