Not applicable

GetItem WebMethod using Copy.asmx Web service returning no node but '0' in response XML

I am creating a site workflow in which I am trying to use Copy.asmx service to copy document (file) from one farm (SP 2007) to another (SP 2013) in a SharePoint environment. I am using 'GetItem' web method provided by Copy.asmx service to get the Document file stream that is to be copied to the destination document library. The problem i am facing is the response of service is always '0' as given below:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Body>
<GetItemResponse xmlns="http://schemas.microsoft.com/sharepoint/soap/">
 
<GetItemResult>0</GetItemResult>
</GetItemResponse>

</soap:Body>

</soap:Envelope>

And also, there is no variable to store Base 64 thing in Nintex so i am using simple text variable to store the response. I am not getting any response xml but a '0'. The workflow is being created on destination site. The files i am trying to download are actually in PDF format.

Your suggestions are greatly welcomed. Any help is appreciated.

0 Kudos
Reply
3 Replies
andrewg
Automation Master
Automation Master

Re: GetItem WebMethod using Copy.asmx Web service returning no node but '0' in response XML

Using the object model, what you would commonly do is use the GetItem method to put the source file into a byte array and then pass the stream to the CopyIntoItems method to copy the array into a document on the destination server.

But, there is not way to store the document into a byte array using the copy web service in the nintex action. If you were copying the current item into another farm it appears there is a way to do this using the web service as you can interact with the [FileData] token. But you do not have this option.

You could create a custom action to perform this as then you could store the document into the correct format.

It may not help, but I believe you can use lists.asmx to copy list items to a different farm. But that may be all inclusive.

Possibly using the Move action in Author.dll could do this for you as this is through a web request. See an example Nintex Workflow - Move Documents and Preserve Version History - Vadim Tabakman

0 Kudos
Reply
Not applicable

Re: GetItem WebMethod using Copy.asmx Web service returning no node but '0' in response XML

@Andrew Glasser:
Yeah I did try the link that you provided, but it provides me with erroneous xml in response. Following are my configurations:

web request.PNG

Please suggest if i am missing something.
The Source Server is actually SharePoint 2007 environment, whereas the destination_server is SharePoint 2013. {workflowVariable: ItmUrl} basically holds the encoded absolute url of the item being processed (actually it's a foreach loop).  {workflowVariable: fname} holds the file name.

0 Kudos
Reply
andrewg
Automation Master
Automation Master

Re: GetItem WebMethod using Copy.asmx Web service returning no node but '0' in response XML

What do you have as headers to the request?

Also, the service_name may need a leading / to sites

And yes, the auther.dll is available in 2007. You should find it in the /12/isapi folder

0 Kudos
Reply