<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Good afternoon,<div><br></div><div>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: </div><div><div><br></div><div>S<font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px;">tore: </span></font></div><div><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px;">#######</span></font></div><div><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px;"> $wsdl = XML::Compile::WSDL11->new("control.wsdl"); </span></font></div><div><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px;"> $wsdl->importDefinitions("ns.xsd"); </span></font></div></div><div><font class="Apple-style-span" face="Arial" size="4"><span class="Apple-style-span" style="font-size: 16px; "><b><div><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; font-weight: normal;"> </span></font></div><div><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; font-weight: normal;"> $getInfo = $wsdl->compileClient( </span></font></div><div><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; font-weight: normal;"> operation => "getInfo", </span></font></div><div><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; font-weight: normal;"> server => "localhost:8161" </span></font></div><div><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; font-weight: normal;"> ); </span></font></div><div><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; font-weight: normal;"> store $getSystem, "/tmp/getSystem.serl"; </span></font></div><div><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; font-weight: normal;"> print Dumper $getSystem;</span></font></div><div><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; font-weight: normal;">#######</span></font></div><div><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; font-weight: normal;"><br></span></font></div><div><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; font-weight: normal;">Which gives me:</span></font></div><div><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; font-weight: normal;">####### </span></font></div><div><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; font-weight: normal;">$VAR1 = sub {</span></font></div><div><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; font-weight: normal;"> package XML::Compile::SOAP::Client;</span></font></div><div><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; font-weight: normal;"> use warnings;</span></font></div><div><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; font-weight: normal;"> use strict 'refs';</span></font></div><div><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; font-weight: normal;"> my $start = time;</span></font></div><div><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; font-weight: normal;"> my($data, $charset) = UNIVERSAL::isa($_[0], 'HASH') ? @_ : (@_ % 2 == 0 ? ({@_}, undef) : error(__x(q[client `{name}' called with odd length parameter list], 'name', $name)));</span></font></div><div><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; font-weight: normal;"> my($req, $mtom) = &$encode($data, $charset);</span></font></div><div><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; font-weight: normal;"> my %trace;</span></font></div><div><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; font-weight: normal;"> my $ans = &$transport($req, \%trace, $mtom);</span></font></div><div><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; font-weight: normal;"> return UNIVERSAL::isa($ans, 'XML::LibXML::Node') ? &$decode($ans) : $ans unless wantarray;</span></font></div><div><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; font-weight: normal;"> $trace{'start'} = $start;</span></font></div><div><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; font-weight: normal;"> $trace{'encode_elapse'} = $trace{'transport_start'} - $start;</span></font></div><div><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; font-weight: normal;"> if (UNIVERSAL::isa($ans, 'XML::LibXML::Node')) {</span></font></div><div><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; font-weight: normal;"> $ans = &$decode($ans);</span></font></div><div><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; font-weight: normal;"> my $end = time;</span></font></div><div><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; font-weight: normal;"> $trace{'decode_elapse'} = $end - $trace{'transport_end'};</span></font></div><div><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; font-weight: normal;"> $trace{'elapse'} = $end - $start;</span></font></div><div><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; font-weight: normal;"> }</span></font></div><div><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; font-weight: normal;"> else {</span></font></div><div><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; font-weight: normal;"> $trace{'elapse'} = $trace{'transport_end'} - $start;</span></font></div><div><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; font-weight: normal;"> }</span></font></div><div><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; font-weight: normal;"> $ans, 'XML::Compile::SOAP::Trace'->new(\%trace);</span></font></div><div><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; font-weight: normal;"> };</span></font></div><div><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; font-weight: normal; ">#######</span></font></div><div><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; font-weight: normal;"><br></span></font></div><div><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; font-weight: normal;">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? </span></font></div><div><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; font-weight: normal;"><br></span></font></div><div><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; font-weight: normal;">Thanks!</span></font></div><div><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; font-weight: normal;">Patrick Burns</span></font></div><div><br></div></b></span></font></div></div></div><br></body></html>