i2blind has asked for the wisdom of the Perl Monks concerning the following question:

wsdl snippet
<wsdl:message name="getMonitorSnapshotsRequest"><wsdl:part name="in0" +type="impl:ArrayOf_xsd_string"> </wsdl:part><wsdl:part name="in1" type="apachesoap:Map"> </wsdl:part><wsdl:part name="in2" type="xsd:string"> </wsdl:part><wsdl:part name="in3" type="xsd:string"> </wsdl:part><wsdl:part name="in4" type="xsd:string"> </wsdl:part></wsdl:message>
trying
$service = SOAP::Lite -> service('URL goes here'); $data = 'array data goes here'; $response = $service->getMonitorSnapshots($data,'','username','passwo +rd'); print $response;

In this instance the first parameter is an array of values and the second and third are single values. In particular the data for the first parameter is an array of paths to search in.

If I have 3 pahts that need to be in an wsdl array or type apachesoap:Map
/path/to/first/monitor
/path/to/second/monitor>
/path/to/third/monitor
How do I put those in an array that the web service will recognize in parameter in0? I just can't quite figure out how to format the array data in the first parameter so that its formatted correctly for the WSDL. Thanks for your help tried

Replies are listed 'Best First'.
Re: passing arrays and maps in soap::WSDL
by Anonymous Monk on Apr 10, 2015 at 21:50 UTC

    Maybe look at the MSDN articles in soap tips and stuff?

    my @params = ( SOAP::Data->name(in0 => "ro"), SOAP::Data->name(in1 => "sham"), SOAP::Data->name(in2 => "bo"), ); my $data = \@params;

    Have you ever read perldata?

    I hate soap

Re: passing arrays and maps in soap::WSDL
by GotToBTru (Prior) on Apr 10, 2015 at 21:22 UTC