AnsweredAssumed Answered

Add Attachment Web Service Action

Question asked by rmarsh on Nov 17, 2014
Latest reply on Oct 13, 2017 by mohamed

I am using the Add Attachment Call Web Service action to move documents from a library and attach them to items in a list. This workflow works great when the documents are pdfs; however, when the documents are Microsoft Word or Excel documents, I receive the following error:

 

Failed to invoke web service. Error returned from server: <soap:Fault xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><faultcode>soap:Server</faultcode><faultstring>Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown.

 

Here is my web service code:

 

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3/org/2001/XMLSchema-instance"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:m="http://schemas.microsoft.com/sharepoint/soap/">

<soap:Header>

</soap:Header>

<soap:Body>

<m:AddAttachment>

<m:listName>Regulatory Tracker</m:listName>

<m:listtItemID>{WorkflowVariable:Custom list item ID}</m:listItemID>

<m:fileName>{ItemProperty:FileLeafRef}</m:fileName>

<m:attachments>[FileData]</m:attachment>

</m:AddAttachment>

</soap:Body>

</soap:Envelope>

 

I need to be able to transfer multiple Word/Excel documents from the library to a single item in the list. If anyone knows something that might help, I would appreciate it! Thank you!

Outcomes