I'm trying to send raw XML to a wsdl service using SOAP::Lite.
Here's the relevant portion of my code:
use SOAP::Lite +trace => 'debug';
my $wsurl = 'http://xxxxxxxx.com/SVC/services/Service?wsdl';
my $svc = SOAP::Lite-> service($wsurl);
$svc-> InsertData(@temparray);
This works BUT the angle brackets are getting escaped because the data type is set to string. To fix this I attempted to use SOAP::Data to set the type to XML like so:
use SOAP::Lite +trace => 'debug';
my $wsurl = 'http://xxxxxxxx.com/SVC/services/Service?wsdl';
my $svc = SOAP::Lite-> service($wsurl);
my @xmldata = SOAP::Data->type('xml' => @temparray);
$svc-> InsertData(@xmldata);
This results in an empty call to the service (no data). If I examine the resulting @xmldata with Data::Dumper I can see the data like so:
$VAR1 = bless( {
'_type' => 'xml',
'_signature' => [],
'_value' => [
'<?xml version="1.0" encoding="UTF-8"?>
+',
'<Data1>',
'<Data2>',
etc...
],
'_attr' => {}
}, 'SOAP::Data' );
I'm pretty new at this web services stuff and I'd like to think that perl can do anything that Java/XMLSpy can do, but this is getting frustrating. I get the same results whether I sent the xml as an array or a long string.
Any help sending raw xml to a web service would be greatly appreciated. Thanks monks!
Rob