use strict; use warnings; use SOAP::Lite +trace => [ transport => sub { my ($in) = @_; return if ref $in ne 'HTTP::Response'; printf "Response length: %d bytes.\n", bytes::length( $in->content ); } ]; my $sv = SOAP::Lite->new->service('.../foo.wsdl'); $sv->fooMethod( 'foo', 'bar' );