Problems when attempting to capture SOAP::Trace events in a variable instead of out to STDERR

Peter Edwards <[email protected]>
Newsgroups gmane.comp.windows.devel.soap.general
Message-ID <SOAP%[email protected]>
Hi,

Apologies if this isn't the right place, but I couldn't find a list usage
FAQ or similar.

Trying to keep it brief, my problem stems from the line in the SOAP::Lite
documentation quoted at the end of this post.

How, when I define my own function, can I store all the logging in a string
variable (which I can then output to a webpage)?!

This is the function I've written:

use SOAP::Lite +trace =>
    all => sub { $mysoaptrace = shift };

I have tried every combination of re-writes I can think of - I am expecting
to find all the debugging information within @_, but all it seems to contain
is the string value 'SOAP::Lite'.

The debugging information I am after, however, instead of being assigned to
the variable $mysoaptrace, appears to be output to the web browser at the
very end of my HTML page - which is not of too much use to me.

If anyone can help, I'm totally stuck, I'd much appreciate it.

Peter.

"SOAP::Trace provides you with a trace/debug facility for the SOAP::Lite
library. To activate it you need to specify a list of traceable events/parts
of SOAP::Lite.

For example:

use SOAP::Lite +trace =>
qw(method fault);

lets you output the parameter values for all your fault/normal envelopes
onto STDERR. If you want to log it you can either redirect STDERR to some
file or (preferably) define your own function for a particular event:

use SOAP::Lite +trace =>
method => sub {'log messages here'}, fault => \&log_faults;"

You can read messages from the SOAP archive, unsubscribe from SOAP, or subscribe to other
DevelopMentor lists at http://discuss.develop.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.