Hi Robbie,
welcome to the other side of SOAP ;-)
You stumbled across one of the weaker points in SOAP::WSDL - actually,
the handling of list refs is left undocumented (more or less) on
purpose:
The WS-I spec requires, that document/literal web-services have exactly
one part (which must be a element definition), as well as rpc/literal
web-services (which must have a complex or simpleType as only part).
In our not-so perfect world, there's web services with more than one
part - thus SOAP::WSDL::Client::Base converts everything to a list ref,
just to be sure.
However, the last example actually should not work, because
SOAP::WSDL::Client::Base should regard the content of the array ref as
two parts: 'request' and { Country => 'USA' }
I'll have a look at it,
Martin
Am Dienstag, den 01.04.2008, 03:33 -0400 schrieb Robbie Bow via RT:
Show quoted text> Queue: SOAP-WSDL
> Ticket <URL:
http://rt.cpan.org/Ticket/Display.html?id=34588 >
>
> Hmm. I've tested this further and if the request has a relatively simple
> data structure then passing a hashref works. However, if the request
> requires nested data then an arrayref is needed. For example:
>
> $service->GetWeather({ Country => 'USA' }); # works
>
> $service->GetWeather({ request =>
> { Country => 'USA' }
> }); # fails
>
> $service->GetWeather([ request =>
> { Country => 'USA' }
> ]); # works
>
> Probably useful to note this in the documentation.
>