Your Mother has asked for the wisdom of the Perl Monks concerning the following question:

Playing around with SOAP::Lite lately. And I like it. One of the way I enjoy exploring new modules and code is just with Data::Dumper::Dumper(). It's a great way to see what's going on, what's really there, and usually a good companion to commonly terse or half-done POD. But with SOAP, it's not the objects that I'm interested in understanding, but the exchange of info between client and server. I could read the SOAP RFCs and the POD for 20 modules but it's easier, and more fun, to learn by watching the real thing in progress.

I know there are various ways to watch and record HTTP transactions (see and record the GETs and POSTs and replies with liveHTTPheaders or HTTP::Recorder) and I'd like to do something like that with SOAP::Lite (or any perl SOAP). See the client requests and the server responses.

Is there a perl solution done already? Is this simple to do otherwise; any pointers?

Thank you, for you're doctors.

Replies are listed 'Best First'.
Re: Watching SOAP
by kvale (Monsignor) on Oct 27, 2004 at 02:07 UTC
    Should have read those module docs :) SOAP::Lite contains SOAP::Trace, which allows you to trace and debug messages:
    use SOAP::Lite +trace => [transport debug headers etc.];

    -Mark

      SOAP::Lite's trace function is useful but its sometimes difficult to use its very verbose dumps. Another solution that would give you some more flexibility is using a logging HTTP proxy (see HTTP::Proxy).

      I am embarrassed to admit I didn't get that far into the POD before starting to code. Thank you for the very politely, and correctly, implied RTFM.

Re: Watching SOAP
by aquarium (Curate) on Oct 27, 2004 at 02:03 UTC
    it might be faster for you to use something like ethereal to snoop on the http packets. You can also use Data::Dumper on the request/response objects by hacking SOAP::* and dumping them to screen etc there.
    the hardest line to type correctly is: stty erase ^H