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,

loris


In reply to SOAP::Lite - Problem with non-string parameters by loris

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.