Thread

Posted on Tue May 20 16:38:27 2008 by oly
Trace?
When running a client with version 1.27, I used to print the trace with the following line:
import SOAP::Lite +trace;

Is there a way to do the same with SOAP::WSDL only (without SOAP::Lite)?
Thanks for your help!
Direct Responses: 7931 | Write a response
Posted on Sun May 25 23:41:03 2008 by mkutter in response to 7912
Re: Trace?
Hi oly, that's not implemented yet. the easiest way by now is to implement your own transport layer (don't fear, it's quite simple):
package MyTransport; use strict; use warnings; use base qw(SOAP::WSDL::Transport::HTTP); use SOAP::WSDL::Factory::Transport; SOAP::WSDL::Factory::Transport->register( http => __PACKAGE__ ); SOAP::WSDL::Factory::Transport->register( https => __PACKAGE__ ); sub send_receive { my $self = shift; my $response = $self->SUPER::send_receive(@_); warn $response; return $response; } 1;
... and somewhere before calling a SOAP method:
use MyTransport;
Martin
Direct Responses: 7966 | Write a response
Posted on Thu May 29 18:45:15 2008 by oly in response to 7931
Re: Trace?
Great, thanks Martin! I'll bother you just a bit more... That way, I get the response envelope. Is there a way I could also see the request one?
Direct Responses: 7982 | Write a response
Posted on Fri May 30 20:48:41 2008 by mkutter in response to 7966
Re: Trace?
sub send_receive { my ($self, %params_of) = @_; warn "Request: $params_of{envelope)"; my $response = $self->SUPER::send_receive(%params_of); warn "Response: $response"; return $response; }
Martin
Direct Responses: 7996 | Write a response
Posted on Mon Jun 2 09:55:30 2008 by oly in response to 7982
Re: Trace?
Many thanks! It works perfectly.

Olivier

Write a response