D
doug
Hi, I'm using Soap-lite as a client to talk to a .Net server. It
works great using one parameter. When I add the second parameter, a
XML string, it fails. When I load the string that it generated into a
browser it also fails. It doesn't like the < symbols.
I've read that Soap-lite defaults to soap encoding ang .Net requires
literal encoding, but don't know how to change it on the client side.
Here is the code I'm using with the envelope following.
Thanks for any help
Doug
use SOAP::Lite;
my $prod = "<?xml version = \"1.0\" encoding=\"UTF-8\"
standalone=\"yes\"?>" .
"<VFPData><row cupc=\"06365200060\"/><row
cups=\"06365200080\"/>" .
"<row cupc=\"06365200001\"/></VFPData>";
print SOAP::Lite
-> service('http://192.168.101.2/ip2.wsdl')
-> GetProducts("123", $prod), "\n";
sub SOAP::Transport::HTTP::Client::get_basic_credentials {
return 'storetest' => 'mm0822tt#';
}
my @params = ( SOAP:ata->name(x1 => "123"),
SOAP:ata->name(x2 => $prod) );
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/1999/XMLSchema"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<GetProducts xmlns="">
<parameters>123</parameters>
<c-gensym4 xsi:type="xsd:string">
<?xml version = "1.0" encoding="UTF-8" standalone="yes"?>
<VFPData>
<row cupc="06365200060"/>
<row cups="06365200080"/>
<row cupc="06365200001"/>
</VFPData></c-gensym4>
</GetProducts>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
works great using one parameter. When I add the second parameter, a
XML string, it fails. When I load the string that it generated into a
browser it also fails. It doesn't like the < symbols.
I've read that Soap-lite defaults to soap encoding ang .Net requires
literal encoding, but don't know how to change it on the client side.
Here is the code I'm using with the envelope following.
Thanks for any help
Doug
use SOAP::Lite;
my $prod = "<?xml version = \"1.0\" encoding=\"UTF-8\"
standalone=\"yes\"?>" .
"<VFPData><row cupc=\"06365200060\"/><row
cups=\"06365200080\"/>" .
"<row cupc=\"06365200001\"/></VFPData>";
print SOAP::Lite
-> service('http://192.168.101.2/ip2.wsdl')
-> GetProducts("123", $prod), "\n";
sub SOAP::Transport::HTTP::Client::get_basic_credentials {
return 'storetest' => 'mm0822tt#';
}
my @params = ( SOAP:ata->name(x1 => "123"),
SOAP:ata->name(x2 => $prod) );
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/1999/XMLSchema"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<GetProducts xmlns="">
<parameters>123</parameters>
<c-gensym4 xsi:type="xsd:string">
<?xml version = "1.0" encoding="UTF-8" standalone="yes"?>
<VFPData>
<row cupc="06365200060"/>
<row cups="06365200080"/>
<row cupc="06365200001"/>
</VFPData></c-gensym4>
</GetProducts>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>