可以使用curl使用以下命令将文件签入到共享点文档库:这个问题:
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 mysharepointserver/sites/mysite/myfile.txt -k但是如何从文档库首先检出文件(使用curl)?
But how to checkout the file first(using curl) from the document library?
我通过传递SOAPAction checkoutfile头和数据,尝试了一个方法,但是它没有任何效果,即使服务器返回了响应:'200 OK'
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: schemas.microsoft/sharepoint/soap/CheckOutFile" -H "Content-Type: text/xml; charset=utf-8" mysharepointserver/sites/mysite/myfile.txt -ksoapdata.xml包含WSDL所描述的检出所需的SOAP数据。上面的命令有什么问题,或者有一个更简单的方法来做这个CURL像检查case?
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?
推荐答案示例,使用SOAP方法,CURL命令中的URL应该是共享点站点Lists.asmx的路径,而不是要检出的文件的URL。文件URL只需要在soapdata xml的pageUrl字段中,如下所示:
Found from an example that, with SOAP approach, the URL in CURL command should be the path of the sharepoint site Lists.asmx and not the URL of file to be checked out. The file URL need to be only in the pageUrl field in soapdata xml as follows:
curl --ntlm --user username:password -d @soapdata.xml -H "SOAPAction: schemas.microsoft/sharepoint/soap/CheckOutFile" -H "Content-Type: text/xml; charset=utf-8" -k -v mysharepointserver/sites/mysite/_vti_bin/Lists.asmx其中soapdata的内容。 xml:
where contents of soapdata.xml:
<?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="schemas.xmlsoap/soap/envelope/" xmlns:xsi="www.w3/2001/XMLSchema-instance" xmlns:xsd="www.w3/2001/XMLSchema"> <soap:Body> <CheckOutFile xmlns="schemas.microsoft/sharepoint/soap/"> <pageUrl>mysharepointserver/sites/mysite/myfile.txt</pageUrl> <checkoutToLocal>true</checkoutToLocal> <lastmodified/> </CheckOutFile> </soap:Body> </soap:Envelope>更多推荐
如何从共享点文档库使用curl签出文件?
发布评论