XML::C...::Trace(3pm)

πŸ“¦
version 3.28 Β· 2 versions
  • 3.28 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 3.27 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

✨ NAME ✨

XML::Compile::SOAP::Trace β€” bestie, this is the little help module that lets you actually see your trace details πŸ’… (it's a 3pm page from the User Contributed Perl Documentation, and we are obsessed)


🌸 SYNOPSIS 🌸

my ($answer, $trace) = $call->(%params);
# now $trace is a XML::Compile::SOAP::Trace

my $req = $trace->request;   # HTTP message which was sent
my $res = $trace->response;  # HTTP message received

my $start = $trace->date;
my $dura  = $trace->elapse;

$trace->printTimings;
$trace->printErrors;
$trace->printTimings(\*STDERR);
$trace->printRequest(pretty_print => 1);
$trace->printResponse;

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so this help module is literally here to make your life easier when you wanna get at the trace data 🫢 β€” the stuff that gets produced by a SOAP call (client side, iykyk).


πŸ‘‘ METHODS πŸ‘‘

πŸŽ€ Constructors

  • XML::Compile::SOAP::Trace->new(%options) β€” this one gets called by the SOAP call implementation itself, so ngl it's not for normal users πŸ™ˆ like it's giving internal business only.

πŸ’– Accessors

  • $obj->date() β€” hands you back the date string that represents the exact moment the call was initiated ⏰
  • $obj->elapse( [$kind] ) β€” returns the time in seconds (with hires, sub-second detail ✨) of a part of the SOAP communication. Heads up bestie: some values may be undef πŸ’€ Elapse with no argument will return the total time elapsed.

As KINDs are defined "encode" (the time required by the translator build by XML::Compile::Schema to translate Perl into an XML::LibXML tree), "transport", and "decode" (from XML::LibXML tree into Perl)>. The transport components are also provided separately, as "stringify" (by XML::LibXML to convert a tree into text), "connect" (for the network message exchange by HTTP::Daemon), and "parse" (parsing answer string into XML)

See printTimings().

example:

print $trace->elapse('decode');
  • $obj->error( [$error] ) β€” often contains an error message when something went wrong 😭 The message is returned as Log::Report::Exception. Only the first error is returned, so use errors() if you wanna get all of them.

[2.31] When an $error is provided, it is added to the internal list of errors. The $error parameter may be a Log::Report::Exception, a Log::Report::Message or a simple string.

  • $obj->errors() β€” [2.31] Return all errors, which are Log::Report::Exception objects. See also error().
  • $obj->request() β€” returns the HTTP::Request object used for this SOAP call πŸ”₯ This might be quite useful during debugging, because a lot of the processing is hidden for the user... but you may want to see or log what is actually begin send πŸ‘€
  • $obj->response() β€” returns the HTTP::Response object, returned by the remote server. In some erroneous cases, the client library will create an error response without any message was exchanged πŸ’€
  • $obj->responseDOM() β€” returns the XML::LibXML::Document top node of the response: the parsed text of the content of the received HTTP message 🌈
  • $obj->start() β€” returns the (platform dependent) time value which represent the moment that the call was initiated ⏱️ See Time::HiRes method "time".

🧚 Printing

  • $obj->printErrors( [$fh] ) β€” the filehandle defaults to STDERR.

If you want to see more output, try adding "<use Log::Report mode =" 3;>>

  • $obj->printRequest( [$fh], %options )
-Option      --Default
 pretty_print  0
  • pretty_print => 0|1|2 β€” Use XML::Compile::Transport::compileClient(xml_format) if you want the messages to be shown readible. The digits reflect XML::LibXML format settings: '0' is unchanged, '1' will show indented formatting, and '2' has even more whitespace in it ✨
  • $obj->printResponse( [$fh], %options )
-Option      --Default
 pretty_print  0
  • pretty_print => 0|1|2 β€” Use XML::Compile::Transport::compileClient(xml_format) if you want the messages to be shown readible πŸ’…
  • $obj->printTimings( [$fh] ) β€” Print an overview on various timings to the selected filehandle πŸ“Š

πŸ’œ SEE ALSO πŸ’œ

This module is part of XML-Compile-SOAP distribution version 3.28, built on August 01, 2022. Website: http://perl.overmeer.net/CPAN/ 🌐


⭐ LICENSE ⭐

Copyrights 2007-2022 by [Mark Overmeer <markov@cpan.org>]. For other contributors see ChangeLog.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://dev.perl.org/licenses/


and that's the whole page bestie, no cap, we ate πŸ’…βœ¨

okay so the sign-off tea πŸ“: this was written for perl v5.34.0, dated 2022-08-04, and it's the XML::C...::Trace(3pm) page β€” slay, go forth and trace responsibly πŸ¦‹πŸ’–

πŸ“¦ where this page comes from