Quantcast
Channel: Nintex Connect: Unanswered Threads
Viewing all articles
Browse latest Browse all 2462

Copying Documents between site collections

$
0
0

I am currently trying to copy a document from a library in Collection A to a library in Collection B.

I am using the COPY(CopyIntoItems) webservice to perform the task and although it creates the document in the library it does not contain any content.  From further investigation it seems as if I need to include the document content in the <stream> tag if I want an exact copy of the doc and not just an empty doc.  I have tried to use the Copy(GetItem) webservice to return the content into a variable which can then be used in the <stream> tag however I have since found out that SharePoint(Nintex) does not have a variable type that can handle such an array....

The other option I have spotted is using the [FileData] token which should pick up the content from the source file however whenever I include this I recieve the following error:

Failed to invoke web service. Object reference not set to an instance of an object.

Here is the Soap for the Webservice I am using (Obviously with the Source and Destination omitted:

 <?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/">
    <soap:Body>
        <CopyIntoItems xmlns="
http://schemas.microsoft.com/sharepoint/soap/">
            <SourceUrl>LocationA</SourceUrl>
            <DestinationUrls><string>LocationB</string></DestinationUrls>
            <Fields></Fields>
            <Stream>[FileData]</Stream>
        </CopyIntoItems>
    </soap:Body>
</soap:Envelope>


Viewing all articles
Browse latest Browse all 2462

Trending Articles