[英]Pass Null Value in DateTime Field in soap ui
我想從 Soap UI 為 Datetime 字段傳遞 null 值,一個選項是我應該刪除標簽。 還有其他方法可以在日期字段中傳遞 null 或其他值。
<rt6:DateofBirth></rt6:DateofBirth>
<rt6:DateofBirth></rt6:DateofBirth>
不為空,而是空字符串(並非所有語言都一樣),使用xsi:nil="true"
,所以
<rt6:DateofBirth xsi:nil="true" />
其中 xsi 命名空間是xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
。
一般回答:
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
將此添加到根標記上的命名空間。 然后將此屬性添加到標記
xsi:nil="true"
例如:
<vp1:DateofBirth xsi:nil="true"></vp1:DateofBirth>
以下對我有用:
<rt6:DateofBirth xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
嘗試傳遞像 9999-12-31 這樣的高日期。 那對我有用。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.