<div dir="ltr">Ola a todos,<br><br>Estou tentando montar um script usando SOAP::Ligth mais ele não esta montando a xml corretamente alguem pode me dar uma luz ?<br><br>#!/usr/bin/perl<br><br><br>use SOAP::Lite 'trace', 'debug';<br>
<br>@params = (<br> SOAP::Data->name('primeiro' => \SOAP::Data->value (<br> SOAP::Data->name( 'nome' => 'andre' ),<br> SOAP::Data->name( 'idade' => '12' ),<br>
SOAP::Data->name( 'cidade' => 'rio' )<br> )<br> )<br>);<br><br>print SOAP::Lite<br> -> readable(1)<br> -> uri('http:/servidor/')<br> -> proxy('<a href="http://servidor/script.asmx">http://servidor/script.asmx</a>')<br>
-> on_fault(<br>sub { my($soap, $res) = @_;<br> die ref $res ? $res->faultstring : $soap->transport->status, "\n";<br>})<br> -> call(@params)<br> -> result;<br><br><br>o resultado do xml eh<br>
<?xml version="1.0" encoding="UTF-8"?><br><soap:Envelope <br> xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>" <br> xmlns:soapenc="<a href="http://schemas.xmlsoap.org/soap/encoding/">http://schemas.xmlsoap.org/soap/encoding/</a>" <br>
xmlns:xsd="<a href="http://www.w3.org/2001/XMLSchema">http://www.w3.org/2001/XMLSchema</a>" <br> soap:encodingStyle="<a href="http://schemas.xmlsoap.org/soap/encoding/">http://schemas.xmlsoap.org/soap/encoding/</a>" <br>
xmlns:soap="<a href="http://schemas.xmlsoap.org/soap/envelope/">http://schemas.xmlsoap.org/soap/envelope/</a>"><br> <soap:Body><br> <primeiro xsi:nil="true" /><br> </soap:Body><br>
</soap:Envelope><br><br>e deveria ter <br><primeiro><br> <nome> andre </nome><br> <idade> 12 </idade><br> <cidade> rj </cidade><br></primeiro><br><br>Obrigado pela ajuda<br>
</div>