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

Dump the soap body/envelope ?

Expand Messages
  • chaljan@ymail.com
    Hello, I use soap lite and I wonder how can I simply print the soap body of a response or request for debugging purposes. Is it somehow possible ? Thanks, Jan
    Message 1 of 2 , Sep 30, 2010
    • 0 Attachment
      Hello,
      I use soap lite and I wonder how can I simply print the soap body of a response or request for debugging purposes. Is it somehow possible ?

      Thanks,
      Jan
    • Martin Busik
      Hi, ... Variant 1: use SOAP::Lite (+trace = [qw(transport debug parameters)]); Variant 2: SOAP::Lite- import( trace = [ transport = &ws_transport_logger
      Message 2 of 2 , Oct 2, 2010
      • 0 Attachment
        Hi,

        > I use soap lite and I wonder how can I simply print the soap
        > body of a response or request for debugging purposes. Is it
        > somehow possible ?

        Variant 1:

        use SOAP::Lite (+trace => [qw(transport debug parameters)]);

        Variant 2:

        SOAP::Lite->import( trace => [ transport => \&ws_transport_logger ]);


        sub ws_transport_logger {
        my $http = shift;

        if (UNIVERSAL::can($http,"as_string")) {
        warn $http->as_string;
        } else {
        warn Dumper($http);
        }
        }

        HTH,

        Martin
      Your message has been successfully submitted and would be delivered to recipients shortly.