[英]Pass Null Value in DateTime Field in soap ui
I Want to Pass null value from Soap UI for Datetime Field one option is that i should delete the tag .我想从 Soap UI 为 Datetime 字段传递 null 值,一个选项是我应该删除标签。 There is any other way where i can pass null or some other value in date field.
还有其他方法可以在日期字段中传递 null 或其他值。
<rt6:DateofBirth></rt6:DateofBirth>
<rt6:DateofBirth></rt6:DateofBirth>
is not null, but empty String (not in all languages this is the same), use xsi:nil="true"
, so <rt6:DateofBirth></rt6:DateofBirth>
不为空,而是空字符串(并非所有语言都一样),使用xsi:nil="true"
,所以
<rt6:DateofBirth xsi:nil="true" />
where xsi namespace is xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
.其中 xsi 命名空间是
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
。
General answer:一般回答:
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Add this to namespaces on root tag.将此添加到根标记上的命名空间。 Then add this property to tag
然后将此属性添加到标记
xsi:nil="true"
Eg:例如:
<vp1:DateofBirth xsi:nil="true"></vp1:DateofBirth>
以下对我有用:
<rt6:DateofBirth xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
try passing a high date like 9999-12-31.尝试传递像 9999-12-31 这样的高日期。 That worked for me.
那对我有用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.