CopyXMLObject |
This Web service operation is used to copy an XML Object.
SOAP Request
<CopyXMLObject xmlns="http://schemas.cordys.com/1.0/xmlstore"> <source lastModified="1030698441048">/Cordys/WCP/Menu/MyMenu1</source> <destination>/Cordys/WCP/MyMenu</destination> </CopyXMLObject>
Request Parameters
Parameter |
Description |
---|---|
source |
The key of the XML Object which must be copied. This must be relative path from the collection folder. |
destination |
The key to which the XML Object must be copied. This must be relative path from the collection folder. |
SOAP Response
<CopyXMLObjectResponse xmlns="http://schemas.cordys.com/1.0/xmlstore"> <tuple isFolder="false" key="/Cordys/WCP/MyMenu" lastModified="1030698441048" level="isv" name="MyMenu"/> </CopyXMLObjectResponse>
Note:
- The protocol is similar to MoveXMLObject. However, in this case, the original object remains in its location, and a copy is created in the destination.
- By default, the XML Object is searched in the current organization. If not found, it is then searched in ISV folder. If the user wants a particular version (user/isv/organization) of XML Object to be retrieved, then the version can be specified in the version attribute of <source>.
Response Parameters
Parameter |
Description |
---|---|
<tuple> |
The <tuple> tag has an optional attribute 'version' which can contain isv or organization or user. This specifies the version of the XML Store content that is to be retrieved. |
key |
Relative path of the XML Object. If the relative path does not exist, the connector creates the specified path and specified XML Object |
name |
Name of the XML object |
lastModified |
LastModified value of the XML Object |
level |
Specifies the version (user/organization/isv) where the XML Object is created |
isFolder |
If the value is 'true', it creates the specified folders |
original |
Specifies the correct case of the key as stored in the file system |
Note:
- The XMLStore uses optimistic locking. In order to update an XML Object, the lastModified-attribute has to be specified. The XML Store Service uses this attribute to determine if the XML Object that is to be updated has been modified recently.
- If optimistic locking is not required, an unconditional-attribute can be set on the <tuple>. If the XML Object is not a read-only and exists in the XML Store, no locking is performed and the XML Object will be modified. Example - <tuple key='emp.xml' unconditional='true'.