[Xml-compile] Fastest way to send a single message
Patrick Burns
patburns at cisco.com
Thu Mar 25 14:18:52 GMT 2010
Good afternoon,
I'm trying to create a set of command line tools which send single
soap messages to my server. Starting from your example I used my wsdl
to compile the call code and then execute it - this works
wonderfully. However, because of the size of my wsdl it take several
seconds to parse and send this single message. Do you have any
suggestions to make this process faster? I've tried writing the
compiled code out using perls serializer store. As follows:
Store:
#######
$wsdl = XML::Compile::WSDL11->new("control.wsdl");
$wsdl->importDefinitions("ns.xsd");
$getInfo = $wsdl->compileClient(
operation => "getInfo",
server => "localhost:8161"
);
store $getSystem, "/tmp/getSystem.serl";
print Dumper $getSystem;
#######
Which gives me:
#######
$VAR1 = sub {
package XML::Compile::SOAP::Client;
use warnings;
use strict 'refs';
my $start = time;
my($data, $charset) = UNIVERSAL::isa($_[0], 'HASH') ?
@_ : (@_ % 2 == 0 ? ({@_}, undef) : error(__x(q[client `{name}' called
with odd length parameter list], 'name', $name)));
my($req, $mtom) = &$encode($data, $charset);
my %trace;
my $ans = &$transport($req, \%trace, $mtom);
return UNIVERSAL::isa($ans, 'XML::LibXML::Node') ? &
$decode($ans) : $ans unless wantarray;
$trace{'start'} = $start;
$trace{'encode_elapse'} = $trace{'transport_start'} -
$start;
if (UNIVERSAL::isa($ans, 'XML::LibXML::Node')) {
$ans = &$decode($ans);
my $end = time;
$trace{'decode_elapse'} = $end -
$trace{'transport_end'};
$trace{'elapse'} = $end - $start;
}
else {
$trace{'elapse'} = $trace{'transport_end'} - $start;
}
$ans, 'XML::Compile::SOAP::Trace'->new(\%trace);
};
#######
When I load and execute I get undefined reference from $encode. I
assume transport and decode will be the same problem. Is there a
better way to go about this or is serializing the way to go, and if so
what parts should I be looking at?
Thanks!
Patrick Burns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/xml-compile/attachments/20100325/4e33291f/attachment.htm
More information about the Xml-compile
mailing list