0

We need to update (CRUD) SharePoint Online list items from a stand alone application outside of SharePoint from an external company.

This application uses Soap/XML calls to call SP.

The (external) application has been able to connect and update an On-Premises SharePoint 2010 list with no problems, but now we are migrating to SharePoint Online.

The external application can connect to and view list items but always throws an error when we try to update an item in the list on SharePoint Online

Here is the (redacted) Soap request body and response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://schemas.microsoft.com/sharepoint/soap/">
   <soapenv:Header/>
   <soapenv:Body>
      <soap:UpdateListItems>
         <soap:listName>XXXXXX GUID</soap:listName>
         <soap:updates>
            <Batch OnError="Continue" ListVersion="1" ViewName="XXX GUID CUT">
   <Method ID="1" Cmd="Update">
      <Field Name="ID">1002</Field>
      <Field Name="Received">1</Field>
      <Field Name="COMSBarcode">RL101150</Field>
      <Field Name="DateReceived">2020-03-03</Field>
      <Field Name="ReceivedBy">andras boros</Field>
      <Field Name="DefectsFaults" />
      <Field Name="Description">This is Box 20/1</Field>
   </Method>
   <Method ID="2" Cmd="Update">
      <Field Name="ID">1003</Field>
      <Field Name="Received">1</Field>
      <Field Name="COMSBarcode">RL101151</Field>
      <Field Name="DateReceived">2020-03-03</Field>
      <Field Name="ReceivedBy">andras boros</Field>
      <Field Name="DefectsFaults" />
      <Field Name="Description">This is Box 20/2</Field>
   </Method>
   <Method ID="3" Cmd="Update">
      <Field Name="ID">1004</Field>
      <Field Name="Received">1</Field>
      <Field Name="COMSBarcode">RL101152</Field>
      <Field Name="DateReceived">2020-03-03</Field>
      <Field Name="ReceivedBy">andras boros</Field>
      <Field Name="DefectsFaults" />
      <Field Name="Description">This is Box20/3</Field>
   </Method>
</Batch>
         </soap:updates>
      </soap:UpdateListItems>
   </soapenv:Body>
</soapenv:Envelope>
4:02
<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>0x81020026</ErrorCode>
                  <ErrorText>The list that is referenced here no longer exists.</ErrorText>
                  <z:row ows_Title="I changed it online (Andras Boros)" ows_T_x002d_Code="X91" ows_BoxNo="20.0000000000000" 
                  {TL:DR}
                  ows_SMTotalFileCount="1002;#0" xmlns:z="#RowsetSchema"/>
               </Result>
               {TL:DR}
             </Results>
            </UpdateListItemsResult>
        </UpdateListItemsResponse>
    </Body>
</soap:envelope/>

Is it possible to update SharePoint Online list items from a standalone webapp in a completely different doamin?

And how would we go about handling authentication.

Any help on this would be much appreciated.

0

The issue was caused because the URL & WSDL were for the top site SharePoint, rather than the specific sub-site.

Once we provided the sub-site url/wsdl the external app started working correctly

The error "The List That is Referenced Here no Longer Exists" is thrown when you try to reference the wrong subsite when you create the web reference to Lists.asmx web service.

"If your site URL is http://my_share_point_site, the list.asmx can be found at http://my_share_point_site/sites/main/_vti_bin/lists.asmx?WSDL and use that URL to reference the API and some things might work.

When we attempt to update a list found under some sub_site, your updates will silently fail. You have to reference http://my_share_point_site/sites/main/sub_site/_vti_bin/lists.asmx?WSDL for updates to your list."

Here is a blog post about the issue: SharePoint: The List That is Referenced Here no Longer Exists

Here is a thread about calling lists.asmx in SharePoint Online which we also found helpful: How to call (_vti_bin) SOAP web service in SharePoint Online 2013 from dot net web application

Also, outside of SharePoint Online, it's suggested to use SharePoint Online CSOM instead of Lists.asmx, Lists.asmx is the old way mainly for SharePoint 2010:

How To Read Various Objects Using SharePoint Online Client Side Object Model (CSOM)

Complete basic operations using SharePoint client library code

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.