Using the Web Request action you can use the PUT command to copy a document to a remote farm and then use the ‘UpdateListItems’ web service to update any associated meta data.
Here is how I configured this in my test environment.
I had 2 document libraries both with the same name, each in a different farm.
The first Web Request action was configured as follows:
The URL is the URL to the destination farm with the new document name also included. It is recommended you store this URL to a workflow text variable and then pass this to your web request actions, as it will be used in both.
This action will copy the current item to the destination farm document library with a title of “test1.doc”.
I then used another Web Request to update the associated meta data (in this case a field named ‘data’) calling the web service ‘UpdateListItems’.
The URL in this case is the destination farm URL with /_vti_bin/Lists.asmx added to the end.
The SOAP action is: http://schemas.microsoft.com/sharepoint/soap/UpdateListItems
The SOAP used was:
<?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/">
<Batch OnError="Continue" PreCalc="TRUE" ListVersion="0">
<Method ID="1" Cmd="Update">
The ID field will always be 1, however the FIleRef must be the URL used in your first web request action where you used the PUT command.
The 2nd web request action is only required if you need to copy any meta data associated with your document.
For more information on the ‘UpdateListItems’ web service please see: http://msdn.microsoft.com/en-us/library/lists.aspx.