0

我在 Web 服务的服务器端使用 NUSOAP。我想返回一个空dateTime元素,但我不确定如何。

如果我返回值falseor '',结果是

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

而我希望它是

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

如果我返回null,则due_date标签不再存在,这会导致客户端出现问题。

4

1 回答 1

0

代替nullor '',显式返回new soapval( 'element','xsd:dateTime', null )

(一些)由NuSOAP Sourceforge 论坛提供。

于 2009-11-04T22:02:51.747 回答