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

Re: 'trace' on server side?

Expand Messages
  • kgoess
    ... Thanks for figuring that out, that is incredibly helpful. Here s a performance improvement on it, instead of sending the entire request and response into
    Message 1 of 7 , May 23, 2003
    • 0 Attachment
      --- In soaplite@yahoogroups.com, Tilman Koschnick <til@b...> wrote:
      > Hello & thanks for your replies. A combination of them did the trick for
      > me; a quick summary for future reference:
      >
      > I added two lines to SOAP/Transport/HTTP.pm,

      Thanks for figuring that out, that is incredibly helpful. Here's a performance
      improvement on it, instead of sending the entire request and response into
      the bit bucket when you turn off tracing, only get the string when it's
      needed:

      --- SOAP/Transport/HTTP.pm.bak Fri May 23 10:51:13 2003
      +++ SOAP/Transport/HTTP.pm Fri May 23 11:10:16 2003
      @@ -225,6 +225,8 @@
      sub handle {
      my $self = shift->new;

      + SOAP::Trace::transport(sub {$self->request->as_string} );
      +
      if ($self->request->method eq 'POST') {
      $self->action($self->request->header('SOAPAction') || undef);
      } elsif ($self->request->method eq 'M-POST') {
      @@ -294,6 +296,9 @@
      'Content-Length' => SOAP::Utils::bytelength $response),
      $response,
      ));
      +
      + SOAP::Trace::transport( sub {$self->response->as_string} );
      +
      }


      Enable it like this:

      use SOAP::Lite trace =>
      [transport =>
      sub { print STDERR (ref $_[0] eq 'CODE' ? &{$_[0]} : $_[0]) }
      ];
    Your message has been successfully submitted and would be delivered to recipients shortly.