It is possible to checkin a file to sharepoint document library using curl with the following command as mentioned in this question:
curl --ntlm --user username:password --upload-file file.txt https://mysharepointserver.com/sites/mysite/myfile.txt -k
But how to checkout the file first(using curl) from the document library?
I tried one method by passing SOAPAction checkoutfile headers and data as follows, but it had no effect eventhough the server returned response: '200 OK'
curl --ntlm --user username:password -d @soapdata.xml -H "SOAPAction: http://schemas.microsoft.com/sharepoint/soap/CheckOutFile" -H "Content-Type: text/xml; charset=utf-8" https://mysharepointserver.com/sites/mysite/myfile.txt -k
soapdata.xml contains the SOAP data needed for checkout as described by WSDL. Is there something wrong in above command or is there a simpler way to do this with CURL like the checkin case?