[Xml-compile] setting nil attribute with wsdl derived clients

Mark Blackman m.blackman at fairfx.com
Wed Jan 7 12:40:16 GMT 2009


On 7 Jan 2009, at 12:16, Mark Blackman wrote:

> On 7 Jan 2009, at 11:57, Mark Overmeer wrote:
>
>> * Mark Blackman (m.blackman at fairfx.com) [090107 11:40]:
>>> I need to submit an explicit NIL for a SOAP parameter, however I'm
>>> merely using
>>> the WSDL derived client (via compileClient) and so I'm not sure  
>>> how to
>>> encode
>>> an  xsi:nil="true" attribute in the %request hash. any suggestions?
>>>
>>> This is the definition of the parameter in the WSDL
>>>
>>> <s:element minOccurs="1" maxOccurs="1" name="DateOfBirthFilter"
>>> nillable="true" type="s:dateTime" />
>>
>> should work like:
>>
>>  DateOfBirthFilter => 'NIL'
>>
>> NIL is a special constant.  See also tests in t/54nil.t
>
> thanks!  will look at tests, but when i tried that I got...
>
> bad name at /opt/local/lib/perl5/site_perl/5.8.8/XML/Compile/ 
> Translate/Writer.pm line 442.
> (XML::Compile v 0.99)
>
> which, looking at the code, seems impossible for that parameter.

I note that childname for createElement appears to be

{https://service.arbitrary.net/}DateOfBirthFilter

when the request hash has that DateOfBirthFilter key
sitting in the requestInfo key. perhaps it should be.

{https://service.arbitrary.net/}requestInfo/DateOfBirthFilter ?

- Mark (B)





More information about the Xml-compile mailing list