Moving Content in Content Services (deprecated)

You can programmatically move content from one LiveCycle Content Services (deprecated) location to another by using the Java API or web service API. For example, consider the PDF document shown in this illustration.

Using the Document Management API (Deprecated), you can move MortgageForm.pdf from /Company Home/Test Directory to another location, such as /Company Home. When you move content, it is not copied. Moved content no longer exists in the original location; that is, the MortgageForm.pdf file is no longer in Company Home/Test Directory.

Note: Access to Document Management service operations using APIs were added in LiveCycle ES2.5.

The web service quick starts that correspond to the Document Management service use the following WSDL:

http://localhost:8080/soap/services/DocumentManagementService?WSDL&lc_version=9.0.1
Important: If you attempt to move content to a location where it already exists, an exception is thrown.
Note: Adobe is migrating Adobe® LiveCycle® Content Services ES customers to the Content Repository built on the modern, modular CRX architecture, acquired during the Adobe acquisition of Day Software. The Content Repository is provided with LiveCycle Foundation and is available as of the LiveCycle ES3 release.

Summary of steps

To move content to another Content Services (deprecated) location, follow these steps:

  1. Include project files.

  2. Create the service client.

  3. Specify the content to move.

Include project files

Include the necessary files in your development project. If you are using Java to create a client application, include the necessary JAR files. If you are using web services, include the proxy files.

Add the following JAR files to your project’s class path:

  • adobe-livecycle-client.jar

  • adobe-usermanager-client.jar

  • adobe-contentservices-client.jar

  • adobe-utilities.jar (required if LiveCycle is deployed on JBoss)

  • jbossall-client.jar (required if LiveCycle is deployed on JBoss)

Note: These JAR files are required if you are using the EJB connection mode. If you are using the SOAP connection mode, include additional JAR files.

Create the service client

Before you can programmatically create a space, establish a connection and provide credentials. This task is accomplished by creating a service client. The service client is based on the LiveCycle service named Document Management.

Specify the content to move

Invoke the Document Management service’s moveContent method to create a space. Specify the name of the new space and the store name. The default value for this parameter is SpacesStore.

Move Content Services (deprecated) content using the Java API

Move content by using the Document Management Service API (Java):

  1. Include project files.

    Include client JAR files, such as adobe-contentservices-client.jar, in your Java project’s class path.

  2. Create the service client.

    • Create a ServiceClientFactory object that contains connection properties.

    • Create a DocumentManagementServiceClientImpl object by using its constructor and passing the ServiceClientFactory object.

  3. Specify the content to move.

    Move content by invoking the DocumentManagementServiceClientImpl object’s moveContent method and passing the following values:

    • A string value that specifies the name of the store. You can specify SpacesStore for this parameter value. This value is a mandatory parameter.

    • A string value that specifies the fully qualified path of the content to move (for example, /Company Home/Test Directory/MortgageForm.pdf). This value is a mandatory parameter.

    • A string value that specifies the fully qualified path of the new location (for example, /Company Home). This value is a mandatory parameter.

    The moveContent method returns a string value that specifies the identifier value of the moved content. This identifier value is in a GUID format, such as 556acef7-8478-46d9-bdd6-ea955d21d617.

Move Content Services (deprecated) content using the web service API

Move content by using the Document Management Service API (web service):

  1. Include project files.

    Create a Microsoft .NET project that uses MTOM. Ensure that you use the following WSDL definition: http://localhost:8080/soap/services/DocumentManagementService?WSDL&lc_version=9.0.1.

    Note: Replace localhost with the IP address of the server hosting LiveCycle.
  2. Create the service client.

    • Create a DocumentManagementServiceClient object by using its default constructor.

    • Create a DocumentManagementServiceClient.Endpoint.Address object by using the System.ServiceModel.EndpointAddress constructor. Pass a string value that specifies the WSDL to the LiveCycle service (for example, http://localhost:8080/soap/services/DocumentManagementService?WSDL.) You do not need to use the lc_version attribute. This attribute is used when you create a service reference.

    • Create a System.ServiceModel.BasicHttpBinding object by invoking the value of the DocumentManagementServiceClient.Endpoint.Binding field. Cast the return value to BasicHttpBinding.

    • Set the System.ServiceModel.BasicHttpBinding object’s MessageEncoding field to WSMessageEncoding.Mtom. This value ensures that MTOM is used.

    • Enable basic HTTP authentication by performing the following tasks:

      • Assign the LiveCycle user name to the field DocumentManagementServiceClient.ClientCredentials.UserName.UserName.

      • Assign the corresponding password value to the field DocumentManagementServiceClient.ClientCredentials.UserName.Password.

      • Assign the constant value HttpClientCredentialType.Basic to the field BasicHttpBindingSecurity.Transport.ClientCredentialType.

      • Assign the constant value BasicHttpSecurityMode.TransportCredentialOnly to the field BasicHttpBindingSecurity.Security.Mode.

  3. Specify the content to move.

    Move content by invoking the DocumentManagementServiceClient object’s moveContent method and passing the following values:

    • A string value that specifies the name of the store. You can specify SpacesStore for this parameter value. This value is a mandatory parameter.

    • A string value that specifies the fully qualified path of the content to move (for example, /Company Home/Test Directory/MortgageForm.pdf). This value is a mandatory parameter.

    • A string value that specifies the fully qualified path of the new location (for example, /Company Home). This value is a mandatory parameter.

    The moveContent method returns a string value that specifies the identifier value of the moved content. This identifier value is in a GUID format, such as 556acef7-8478-46d9-bdd6-ea955d21d617.

// Ethnio survey code removed