[Xml-compile] Empty strings result in parameters not sent - XML::Compile::WSDL

henrik at adapt.dk henrik at adapt.dk
Mon Apr 29 12:18:52 GMT 2013


Hi Mark

markov has replied with a patch that should fix things. He says:
"Typical defined/fault mistake.  In "normal" xml-schema use, an empty
element is equivalent to a missing element.  However, for WSDL parts,
I can imagine this is different."

I'll be trying it as soon as 'the other' end id back up (tomorrow, the
guy in the know is away today - typical!).

--
Henrik


2013/4/29 Mark Grimes <mgrimes at cpan.org>:
> Henrik,
>
> Have you tried setting them to undef instead of the empty string? That
> should result in xml with NIL values (I think), which maybe what you need.
>
> -Mark
>
> On Apr 29, 2013 5:19 AM, "henrik at adapt.dk" <henrik at adapt.dk> wrote:
>>
>> Hi
>>
>> I have a problem trying to use a webservice on Apache Axis using
>> SOAP-RPC from XML::Compile::WSDL11.
>>
>> The server side complains that some argumnents are missing if i set
>> them to empty strings.
>>
>> Snippet of WSDL:
>>    <wsdl:message name="processRequest">
>>       <wsdl:part name="type" type="xsd:string"/>
>>       <wsdl:part name="webUser" type="xsd:string"/>
>>       <wsdl:part name="customerNumber" type="xsd:string"/>
>>       <wsdl:part name="clientIdentity" type="xsd:string"/>
>>       <wsdl:part name="encryptedPassword" type="xsd:string"/>
>>       <wsdl:part name="name" type="xsd:string"/>
>>       <wsdl:part name="clientMailAddress" type="xsd:string"/>
>>    </wsdl:message>
>>
>> If i do this:
>>  my ($answer, $trace) = $call->(
>>   type => "1",
>>   webUser => "webuser1",
>>   customerNumber => "20746",
>>   clientIdentity => "",
>>   encryptedPassword => "",
>>   name => "Thomas Noergaard",
>>   clientMailAddress => 'tn\@XXX.dk'
>>  );
>> I get an error (the arguments clientIdentity and encryptedPassword are
>> not in the XML generated and sent to the server), but if I do this:
>>  my ($answer, $trace) = $call->(
>>   type => "1",
>>   webUser => "webuser1",
>>   customerNumber => "20746",
>>   clientIdentity => " ",
>>   encryptedPassword => " ",
>>   name => "Thomas Noergaard",
>>   clientMailAddress => 'tn\@XXX.dk'
>>  );
>> i.e. set them to a space instead, they appear in the generated XML.
>> Is this an error on my part? In XML::Compile::WSDL? or should the
>> server-side accept the SOAP package without complaining?
>>
>> Reading the W3C SOAP specs did'nt give me any clues (but a mild
>> headache), googling gave no leads (perhas my google-foo is'nt good
>> enough), so I turn to the assembled wisdom of this list in the hope of
>> some enlightenment.
>>
>> Henrik Tougaard (HTOUG)
>> Adapt A/S, Denmark
>>
>> _______________________________________________
>> Xml-compile mailing list
>> Xml-compile at lists.scsys.co.uk
>> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/xml-compile
>
>
> _______________________________________________
> Xml-compile mailing list
> Xml-compile at lists.scsys.co.uk
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/xml-compile
>



More information about the Xml-compile mailing list