Forum Discussion

yrangasa125's avatar
yrangasa125
Copper Contributor
Mar 01, 2019

Unable to checkin the uploaded document

Hi Guys,

 

I want to upload a document to SharePoint site and check in the uploaded doc. Im able to upload the doc using,

curl -v -k --ntlm --user username:password --upload-file data_fortesting.csv https://sp.mycompany.com/sites/subsite/Shared%20Documents/data_fortesting.csv -k

 

But I could not checkin the uploaded the doc. Im using the following code,

curl -v -k --ntlm --userusername:password -d @soapdata.xml -H "SOAPAction: http://schemas.microsoft.com/sharepoint/soap/CheckInFile" -H "Content-Type: text/xml; charset=utf-8" https://sp.mycompany.com/sites/_vti_bin/Lists.asmx

 

where in my soapdata is,

<?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>

        <CheckInFile xmlns="http://schemas.microsoft.com/sharepoint/soap/">    <pageUrl>https://sp.mycompany.com/sites/subsites/Shared%20Documents/data_fortesting.csv</pageUrl>

          <comment>checkingin</comment>

           <CheckinType>1</CheckinType>

        </CheckInFile>

    </soap:Body>

</soap:Envelope>

 

Im getting the following response,

<?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><CheckInFileResponse xmlns="http://schemas.microsoft.com/sharepoint/soap/"><CheckInFileResult>false</CheckInFileResult></CheckInFileResponse></soap:Body></soap:Envelope>

 

Why my CheckInFileResult is false. What am I missing here?

 

Thanks,

Yas

No RepliesBe the first to reply

Resources