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

'trace' on server side?

Expand Messages
  • John Ralston
    In my server, I put: use SOAP::Lite+trace= debug ; open STDERR, , error.log ; and the server dumps a debug trace into error.log. trace= all dumps
    Message 1 of 7 , May 22, 2003
    • 0 Attachment
      In my server, I put:

      use SOAP::Lite+trace=>'debug';
      open STDERR, '>', "error.log";

      and the server dumps a debug trace into error.log. trace=>'all' dumps everything.

      John
    • Tilman Koschnick
      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,
      Message 2 of 7 , May 23, 2003
      • 0 Attachment
        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,

        SOAP::Trace::transport($self->request->as_string);

        to the top of SOAP::Transport::HTTP::Server::handle, and

        SOAP::Trace::transport($self->response->as_string);

        to the bottom of SOAP::Transport::HTTP::Server::make_response. In my
        server, I called

        use SOAP::Lite 'trace';
        use SOAP::Transport::HTTP;

        and, voilĂ , the full messages as in my clients.

        Cheers, Til



        tilmankoschnick wrote:
        > Hello everybody,
        >
        > is there something like the 'use SOAP::Lite +trace' call on the
        server side? I am using
        >
        > use SOAP::Lite 'trace';
        > use SOAP::Transport::HTTP;
        >
        > but this only gives me some information, like
        >
        > SOAP::Serializer::new: ()
        > SOAP::Deserializer::new: ()
        > SOAP::Parser::new: ()
        > SOAP::Server::new: ()
        > SOAP::Transport::HTTP::Server::new: ()
        > SOAP::Transport::HTTP::Daemon::new: ()
        > ...
        >
        > but not the call and response itself, as it would on the client side.
        I've searched the archive and found a couple of similar questions, but
        no answer, so I'm asking again in the hope someone found out by now.
        >
        > Cheers, Tilman Koschnick
      • 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 3 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.