I am Trying to use the Nintex Call web service workflow actions AddAttachment web method to attach a library contained document (where the workflow is running, to a form/document in a list. The library containing the document is hidden from users but the list documents are visible. Once the document is attached, it will be deleted from the library. The code is:
<?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>HR Nominations</m:listName>
<m:listItemID>{ItemProperty:ID}</m:listItemID>
<m:fileName>{ItemProperty:FileLeafRef}</m:fileName>
<m:attachment>[FileData]</m:attachment>
</m:AddAttachment>
</soap:Body>
</soap:Envelope>
where "HR Nominations" is the name of the list containing the Nintex form/document resides and "ItemProperty:ID is the ID of the document to be attached. This looks correct, but throws 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.
Any ideas or suggestions? There could be one or more documents, of various formats, to be attached.
The application is one where employees are nominated for various awards on a public site where the nomination form is available, and nominations bight be supported by attached documents. The nomination form, when saved, starts another workflow via a "Call web service" action. This workflow copies the form information to the private HR site for further action. The attachments are copied to a hidden library on the private HR site. The original, public record is then deleted. Personnel in HR receive an email message letting them know that a nomination has been submitted. (Once the supporting document(s) have been attached to the nomination, it/they are deleted from the hidden library.
Thanks for your help!
Bill