cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Add Attachment Web Service Action

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>soapSmiley Frustratederver</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!

Labels: (1)
0 Kudos
Reply
2 Replies
Not applicable

Re: Add Attachment Web Service Action

I have no problem with Excel and Word. I do have problem with multiple attachments.

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Add Attachment Web Service Action

Instead of using [FileData] , have you considered using <m:attachments>base64Binary</m:attachment> this copies the document as an attachment to a list item.

0 Kudos
Accept as Solution Reply