[Xml-compile] XML::Compile::WSDL11 strange error state
Brian E. Lozier
brian at massassi.com
Thu Feb 23 01:15:11 GMT 2012
Hello,
I'm having trouble with a particular SOAP API call. I am using it like
this (somewhat truncated):
use XML::Compile::WSDL11;
use XML::Compile::SOAP11;
use XML::Compile::Transport::SOAPHTTP;
my %auth =3D (
APICredentials =3D> {
DeveloperKey =3D> '',
Password =3D> '',
},
);
my @wsdl_files =3D (
'AdminService.wsdl',
'OrderService.wsdl',
);
my $wsdl =3D XML::Compile::WSDL11->new();
foreach my $file (@wsdl_files) {
$wsdl->addWSDL($file);
}
$wsdl->compileCalls(port =3D> 'AdminServiceSoap');
$wsdl->compileCalls(port =3D> 'OrderServiceSoap');
($r, $trace) =3D $wsdl->call('GetOrderList',
accountID =3D> $account_id,
orderCriteria =3D> {
OrderCreationFilterBeginTimeGMT =3D> $begin_time,
OrderCreationFilterEndTimeGMT =3D> $end_time,
StatusUpdateFilterBeginTimeGMT =3D> $begin_time,
StatusUpdateFilterEndTimeGMT =3D> $end_time,
JoinDateFiltersWithOr =3D> 1,
PageNumberFilter =3D> 1,
PageSize =3D> 100,
OrderStateFilter =3D> 'Active',
},
%auth,
);
warn Dumper($trace);
warn Dumper($r);
In this case, $r ends up as undef and $trace has a whole bunch of stuff in
it, and some reference to an error and "died" message:
'exceptions' =3D> [
bless( {
'report_opts' =3D> {
'location' =3D> [
'XML::Compile::Translate::Reader',
'/usr/local/lib/perl5/site_perl/5.12.2/XML/Compile/Translate/Reader.pm',
628,
'Log::Report::error',
1,
undef,
undef,
undef,
1794,
'TUUEUUUUUUUUU ',
undef
],
'stack' =3D> []
},
'reason' =3D> 'ERROR',
'message' =3D> bless( {
'_prepend' =3D> 'decode
error: ',
'name' =3D>
'xxxOrderStatus',
'path' =3D>
'xxxGetOrderListResponse/GetOrderListResult/ResultData/OrderResponseItem',
'_msgid' =3D> 'element
`{name}\' not processed at {path}',
'_expand' =3D> 1,
'_domain' =3D>
'xml-compile',
'_class' =3D> 'misfit'
}, 'Log::Report::Message' )
}, 'Log::Report::Exception' )
],
I think it's trying to tell me that the response doesn't match the format
specified in the wsdl file (like, it couldn't find "xxxOrderStatus" in the
path
"xxxGetOrderListResponse/GetOrderListResult/ResultData/OrderResponseItem")
but I pulled the XML out of the response and parsed it with XML::Simple and
by hand in a text editor and it seems like the returned XML is valid and
matches the description in the WSDL. I'm a beginner with SOAP so it's
possible I'm missing something. Is there another explanation? What else
can I provide to help debug this?
Also to be clear, every other SOAP call I've made with this provider has
worked well through this module, so it's not a systemic problem.
Thanks,
Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/xml-compile/attachments/20120222/30=
9f210b/attachment.htm
More information about the Xml-compile
mailing list