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

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

Expand Messages
  • Scott Bolte
    May 1, 2002
      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;


      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;

      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.