doomm4711 2016-11-10 20:26
浏览 32

肥皂更新错误Sharepointapi.php

Using sharepointapi.php in order to update some value into a sharepoint list. I get the next request XML, generated by sharepointapi.php:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://schemas.microsoft.com/sharepoint/soap/">
  <SOAP-ENV:Body>
    <UpdateListItems xmlns="http://schemas.microsoft.com/sharepoint/soap/">
       <listName>CONTRACTS</listName>
          <updates>
            <Batch ListVersion="1" OnError="Continue">
               <Method Cmd="Update" ID="1">
                 <Field Name="state">Awaiting F</Field>
                 <Field Name="ID">10</Field>
               </Method>
            </Batch>
         </updates>
    </UpdateListItems>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

And I got this from the server:

<?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><soap:Fault>
    <faultcode>soap:Server</faultcode>
    <faultstring>Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown.</faultstring>
    <detail>
      <errorstring xmlns="http://schemas.microsoft.com/sharepoint/soap/">Cannot access a closed Stream.
      </errorstring>
    </detail>
    </soap:Fault>
  </soap:Body>
</soap:Envelope>

Note. I am actually able to get all the rows from the list.

Is my query bad formatted?

Thankyou.

</div>
  • 写回答

1条回答 默认 最新

  • drza10046 2016-11-12 18:51
    关注

    Looks like your trying to update the ID of a listitem. The ID is generated by SharePoint and cannot be changed.

    评论

报告相同问题?

悬赏问题

  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
  • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
  • ¥15 可见光定位matlab仿真
  • ¥15 arduino 四自由度机械臂
  • ¥15 wordpress 产品图片 GIF 没法显示