Sharepoint 如何从UpdateListEMS SOAP响应获取错误详细信息?
我正在为Microsoft SharePoint编写iOS客户端。我的目标是更新列表项的datetime字段并获取错误的详细信息。我有一个带有自定义服务器端验证的datetime字段 以下是对/_vti_bin/Lists.asmx的请求:Sharepoint 如何从UpdateListEMS SOAP响应获取错误详细信息?,sharepoint,soap,Sharepoint,Soap,我正在为Microsoft SharePoint编写iOS客户端。我的目标是更新列表项的datetime字段并获取错误的详细信息。我有一个带有自定义服务器端验证的datetime字段 以下是对/_vti_bin/Lists.asmx的请求: <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<UpdateListItems xmlns="http://schemas.microsoft.com/sharepoint/soap/">
<listName>{405FFE91-946E-4B2F-861E-DDB24F1629F2}</listName>
<updates>
<Batch OnError="Continue" ListVersion="1">
<Method ID="1" Cmd="Update">
<Field Name="ID">1</Field>
<Field Name="DateTime_x0020_E">2000-08-08 07:00:00 +0000</Field>
</Method>
</Batch>
</updates>
</UpdateListItems>
</soap:Body>
</soap:Envelope>
{405FFE91-946E-4B2F-861E-DDB24F1629F2}
1.
2000-08-08 07:00:00 +0000
以下是回应:
?xml version="1.0" encoding="utf-8"?>
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<UpdateListItemsResponse
xmlns="http://schemas.microsoft.com/sharepoint/soap/">
<UpdateListItemsResult>
<Results>
<Result ID="1,Update">
<ErrorCode>0x8102001c</ErrorCode>
<ErrorText>Invalid date/time value.
A date/time field contains invalid data. Please check the value and try again.</ErrorText>
<z:row ows_ContentTypeId="0x0100D3AA6E2413CF1645A9101D3421B797AE" ows_Title="test of time" ows_DateTi... skipped...
?xml version=“1.0”encoding=“utf-8”>
0x8102001c
无效的日期/时间值。
日期/时间字段包含无效数据。请检查该值,然后重试。
我已经发现我的错误在哪里了。该字段仅为日期字段,因此SharePoint可能不接受值为2000-08-08 07:00:00+0000
。当我只发送日期时:
<Field Name="DateTime_x0020_E">1995-08-08</Field>
1995-08-08
我得到了正确的错误文本:
<Result ID="1,Update">
<ErrorCode>0x810200c5</ErrorCode>
<ErrorText>[DateTime E] - [Date should be after July 1, 2007]</ErrorText>
...
</Result>
0x810200c5
[日期时间E]-[日期应在2007年7月1日之后]
...