Hello, my name is Melanie Bailey, and I'm a QA Engineer here at Scribe.
Some of the test cases I executed while testing the Web Services Adapter were related to adding attachments to SharePoint/MOSS 2007 Lists via the SharePoint Lists Web Service.
I use SharePoint on a regular basis, and I no longer use a web browser to manually move files into SharePoint Lists, instead, I now sit back and watch as Scribe automatically migrates multiple files (using a variety of file types) from my database tables and my file system into my SharePoint Lists! Way cool.
In the interest of passing along this potential time-saver to you, I'm going to walk you through configuring a Web Service Adapter to add attachments using the SharePoint Lists Web Service. These steps outlined are geared toward an experienced Scribe Workbench user; I also highly recommend reviewing the MSDN information on Sharepoint Lists Web Services and List Members before making any changes to your system(s).
To add an attachment using binary data accessed via a file path, follow these steps-
- Connect to a Source
-
Using the Web Services Adapter, connect to the SharePoint Lists Web Service for the Site that contains the list(s) to be updated.
-
Add an Execute Step to the AddAttachement method and click Close.
-
Map the values for each target field via data links or formulas
- listName: A string that contains either the title or the GUID for the list.
- listItemID: A string that contains the ID of the item to which attachments are added. This value does not correspond to the index of the item within the collection of list items.
- filename: A string that contains the name of the file to add as an attachment. Filenames must be unique.
- attachment_FilePath: The fully qualified path to the file to attach.
NOTE: Either the attachment_FilePath method or the attachment_Blob method can be mapped to or contain values in a DTS, they cannot be used in the same DTS. Mapping to or creating values for both methods in the same DTS will result in a failed job execution.
Example: Adding an attachment using the attachment_FilePath Target field.
To add an attachment using binary data accessed via a "source" adapter (e.g. ODBC pointing to a SQL table that contains the files to be attached), follow these steps -
- Connect to a Source containing the binary data to be used as an attachment.
- Follow Steps 2 through 4c listed above.
- In place of step 4d, create a Data Link to the binary field from your Source to the attachment_BlobData Target field.
Example: Adding an attachment using the attachment_BlobData Target field.
Please let me know if you have any questions or comments. I'd love to hear about any problems the Web Services Adapter has helped you to solve!
Comments