开发者

How do I send an empty dateTime with NUSOAP?

I'm using NUSOAP on the server-side of a web service. I want to return a null dateTime element, but I'm not sure how.

If I return the values false or '' , the result is

<due_date xsi:type="xsd:dateTime" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>

whereas I would like it to be

<due_date xsi:type="xsd:dateTime" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:null="true"/>

If I 开发者_JAVA技巧return null, the due_date tag is not present anymore, which causes problems on the client side.


Instead of null or '', explicitly return new soapval( 'element','xsd:dateTime', null ).

(Some) courtesy of the NuSOAP Sourceforge forums.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜