CopyIntoItems Sharepoint SOAP 操作参数
我正在尝试使用 SOAP Action 上传文件
POST /_vti_bin/Copy.asmx HTTP/1.1
Host: my.hostname.net
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://schemas.microsoft.com/sharepoint/soap/CopyIntoItems"
<?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>
<CopyIntoItems xmlns="http://schemas.microsoft.com/sharepoint/soap/">
<SourceUrl>string</SourceUrl>
<DestinationUrls>
<string>string</string>
<string>string</string>
</DestinationUrls>
<Fields>
<FieldInformation Type="Invalid or Integer or Text or Note or DateTime or Counter or Choice or Lookup or Boolean or Number or Currency or URL or Computed or Threading or Guid or MultiChoice or GridChoice or Calculated or File or Attachments or User or Recurrence or CrossProjectLink or ModStat or AllDayEvent or Error" DisplayName="string" InternalName="string" Id="guid" Value="string" />
<FieldInformation Type="Invalid or Integer or Text or Note or DateTime or Counter or Choice or Lookup or Boolean or Number or Currency or URL or Computed or Threading or Guid or MultiChoice or GridChoice or Calculated or File or Attachments or User or Recurrence or CrossProjectLink or ModStat or AllDayEvent or Error" DisplayName="string" InternalName="string" Id="guid" Value="string" />
</Fields>
<Stream>base64Binary</Stream>
</CopyIntoItems>
</soap:Body>
</soap:Envelope>
我希望上传 PDF 文件或 Doc 文件。我正在使用 Firefox 扩展 Poster
我有源 URL 和目标 URL
和
的值应该是多少?
预先感
谢维夫
I am trying to upload a file using SOAP Action
POST /_vti_bin/Copy.asmx HTTP/1.1
Host: my.hostname.net
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://schemas.microsoft.com/sharepoint/soap/CopyIntoItems"
<?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>
<CopyIntoItems xmlns="http://schemas.microsoft.com/sharepoint/soap/">
<SourceUrl>string</SourceUrl>
<DestinationUrls>
<string>string</string>
<string>string</string>
</DestinationUrls>
<Fields>
<FieldInformation Type="Invalid or Integer or Text or Note or DateTime or Counter or Choice or Lookup or Boolean or Number or Currency or URL or Computed or Threading or Guid or MultiChoice or GridChoice or Calculated or File or Attachments or User or Recurrence or CrossProjectLink or ModStat or AllDayEvent or Error" DisplayName="string" InternalName="string" Id="guid" Value="string" />
<FieldInformation Type="Invalid or Integer or Text or Note or DateTime or Counter or Choice or Lookup or Boolean or Number or Currency or URL or Computed or Threading or Guid or MultiChoice or GridChoice or Calculated or File or Attachments or User or Recurrence or CrossProjectLink or ModStat or AllDayEvent or Error" DisplayName="string" InternalName="string" Id="guid" Value="string" />
</Fields>
<Stream>base64Binary</Stream>
</CopyIntoItems>
</soap:Body>
</soap:Envelope>
I wish to upload a PDF file or Doc file. I am using Firefox extension Poster
I have the source and destination URLs
What should be the values of <FieldInformation>
and <Stream>
?
Thanks in advance
Viv
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
流值需要是文件的 base64 二进制表示形式。例如,我有一个包含文本“123”的文本文件。使用此网站http://www.base64converter.com/我将文本转换为base64,翻译为“MTIz ”。因此,如果我尝试上传文件,我会将“MTIz”(不带引号)放入 Stream 标签中。像这样:
FieldInformation 标记需要包含需要与您正在上传的文档关联的任何 SharePoint 属性。因此,如果您想将标题属性设置为“我的文档”,您将需要这样的内容:
The stream value needs to be the base64binary representation of the file. So for example I have a text file that contains the text "123". Using this site http://www.base64converter.com/ I converted the text to base64 which translated to "MTIz". So if I was trying to upload my file I would put "MTIz" (without quotes) into the Stream tag. Something like this:
The FieldInformation tags need to contain any SharePoint properties that need to be associated with the document you are uploading. So if you want to set the title property to "My Document" you would need something like this: