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

Mark Grimes mgrimes at cpan.org
Mon Apr 29 12:07:54 GMT 2013


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=3D"processRequest">
>       <wsdl:part name=3D"type" type=3D"xsd:string"/>
>       <wsdl:part name=3D"webUser" type=3D"xsd:string"/>
>       <wsdl:part name=3D"customerNumber" type=3D"xsd:string"/>
>       <wsdl:part name=3D"clientIdentity" type=3D"xsd:string"/>
>       <wsdl:part name=3D"encryptedPassword" type=3D"xsd:string"/>
>       <wsdl:part name=3D"name" type=3D"xsd:string"/>
>       <wsdl:part name=3D"clientMailAddress" type=3D"xsd:string"/>
>    </wsdl:message>
>
> If i do this:
>  my ($answer, $trace) =3D $call->(
>   type =3D> "1",
>   webUser =3D> "webuser1",
>   customerNumber =3D> "20746",
>   clientIdentity =3D> "",
>   encryptedPassword =3D> "",
>   name =3D> "Thomas Noergaard",
>   clientMailAddress =3D> '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) =3D $call->(
>   type =3D> "1",
>   webUser =3D> "webuser1",
>   customerNumber =3D> "20746",
>   clientIdentity =3D> " ",
>   encryptedPassword =3D> " ",
>   name =3D> "Thomas Noergaard",
>   clientMailAddress =3D> '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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/xml-compile/attachments/20130429/e9=
8fc013/attachment.htm


More information about the Xml-compile mailing list