loris has asked for the wisdom of the Perl Monks concerning the following question:
Dear All,
I probably know too little about SOAP in general to be doing this sort of thing, but perhaps the kind-hearted will bear with me.
I have generated a module from a WSDL which contains this:
my %methods = ( ... findGroups => { endpoint => 'https://xxx.xxx.xxx.xxx:xxxx/grouper-ws/services/Grou +perService.GrouperServiceHttpSoap12Endpoint/', soapaction => 'urn:findGroups', namespace => 'http://soap.ws.grouper.middleware.internet2.edu/xsd' +, parameters => [ SOAP::Data->new(name => 'clientVersion', type => 'xs:string', at +tr => {}), SOAP::Data->new(name => 'wsQueryFilter', type => 'ns:WsQueryFilt +er', attr => {}), SOAP::Data->new(name => 'actAsSubjectLookup', type => 'ns:WsSubj +ectLookup', attr => {}), SOAP::Data->new(name => 'includeGroupDetail', type => 'xs:string +', attr => {}), SOAP::Data->new(name => 'params', type => 'ns:WsParam', attr => +{}), ], # end parameters }, # end findGroups ); # end my %methods
I call the method like this:
my $xml = "<ns:wsQueryFilter><ns:groupName>$params{groupname}</ns:gr +oupName><ns:queryFilterType>$params{queryfiltertype}</ns:queryFilterT +ype></ns:wsQueryFilter>"; my $elem = SOAP::Data->type('xml' => $xml); my $result= $grouper->findGroups($params{clientversion}, $elem, '', 'T' );
However, the SOAP body generated looks like this:
<soap:Body> <ns:findGroups> <clientVersion xsi:type="xs:string">v1_4_001</clientVersion> <wsQueryFilter xsi:nil="true" xsi:type="ns:WsQueryFilter" /> <actAsSubjectLookup xsi:nil="true" xsi:type="ns:WsSubjectLookup" + /> <includeGroupDetail xsi:type="xs:string">T</includeGroupDetail> </ns:findGroups> </soap:Body>
The wsQueryFilter-tag is always empty - I also get the same result if I replace $elem with '' (or pretty much anything else).
Other methods which take only string aguments work fine. Can anyone see how I should pass the non-string arguments?
Thanks,
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: SOAP::Lite - Problem with non-string parameters
by Anonymous Monk on Jun 24, 2009 at 11:42 UTC | |
by loris (Hermit) on Jul 02, 2009 at 12:52 UTC |