Deploying LiveCycle Applications

Using the Java and web service API, you can programmatically deploy a LiveCycle application (an LCA file) to LiveCycle. Programmatically deploying a LiveCycle application results in an application being deployed to LiveCycle as though you imported the application using Applications and Services, which is accessed by logging in to Administration Console. When programmatically deploying an application, specify an Administrator or Super Administrator when setting connection settings.

To deploy a LiveCycle application, reference an existing LiveCycle archive (LCA) file. For information about creating an LCA file, see LiveCycle Workbench 11 Help.

Hinweis: You can invoke the Application Manager service using web services. To demonstrate how to deploy a LiveCycle application using web services, the Deploying LiveCycle Applications web service quick start uses SwaRef. (See Invoking LiveCycle using SwaRef.)

Summary of steps

To programmatically deploy a LiveCycle application, perform the following tasks:

  1. Include project files.

  2. Create required LiveCycle Client API objects.

  3. Retrieve an existing archive file.

  4. Import the LiveCycle application.

  5. Check the status of the LiveCycle application.

Include project files

Include necessary files into your development project. Because you are creating a client application by using Java, include the necessary JAR files.

Create required LiveCycle Client API objects

Before you can programmatically import an application, create an ApplicationManager object. Ensure that you specify an administrator user name when setting connection properties. (See Setting connection properties.)

Retrieve an existing archive file

To import an application, reference a valid LCA file. A LCA file is created using Workbench. (See LiveCycle Workbench 11 Help .)

Import the LiveCycle application

After you reference an LCA file, you can import the application. After you import the application, you can check its status to ensure that the application was successfully imported. If the status code is 1, the application was successfully imported.

Check the status

After you import a LiveCycle application, you can check its status to ensure that the application was successfully deployed. The following list specfies possible values:

  • 0 - The status of the application is unknown.

  • 1 - The application is successfully deployed.

  • 2 - An import error occurred.

  • 3 - The application was successfully exported.

  • 4 - An error occurred when the application was exported.

  • 5 - The application was removed successfully.

  • 6 - An error occurred when the application was removed.

  • 7 - The application was successfully previewed .

  • 8- A status preview error occurred.

  • 9 - Information about the appliation was successfully retrieved.

  • 10 - An error occurred when information was retrieved.

Hinweis: When importing an application, values 0, 1 or 2 are returned.

Deploy a LiveCycle application using the Java API

Deploy a LiveCycle application by using the Application Manager API (Java):

  1. Include project files

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

  2. Create required LiveCycle Client API objects

    • Create a ServiceClientFactory object that contains connection properties.

    • Create an ApplicationManager object by using its constructor and passing the ServiceClientFactory object.

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

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

  3. Retrieve an existing archive file

    • Reference an LCA file that represents the application to import by creating a FileInputStream object by using its constructor. Pass a string value that specifies the location of the LCA file.

    • Create a com.adobe.idp.Document object by using its constructor and passing the FileInputStream object.

  4. Import the LiveCycle application

    Import the application by invoking the ApplicationManager object’s importApplicationArchive method. Pass the com.adobe.idp.Document object that contains the LCA file. This method returns an ApplicationStatus object that specifies whether the application was successfully imported.

  5. Check the status

    Check the status of the application by invoking the ApplicationStatus object’s getStatusCode method. If this method returns the value 1, the application is successfully imported.

Deploy a LiveCycle application using the web service API

Deploy a LiveCycle application by using the Application Manager API (web services):

  1. Include project files

    Create Java proxy classes using JAX-WS. Ensure that the Java proxy classes support SwaRef.

    Ensure that you use the following WSDL defination: http://localhost:8080/soap/services/ApplicationManager?WSDL&lc_version=9.0.1.

    Hinweis: Replace localhost with the IP address of the server hosting LiveCycle.
  2. Create required LiveCycle Client API objects

    • Create an ApplicationManagerService object by using its constructor.

    • Create an ApplicationManager object by invoking the ApplicationManagerService object’s getApplicationManager method.

    • Set authentication values by invoking the ApplicationManager object’s getRequestContext method.

  3. Retrieve an existing archive file

    • Retrieve the LCA file by creating a java.io.File object by using its constructor. Pass a string value that specifies the location of the PDF document.

    • Create a javax.activation.DataSource object by using the FileDataSource constructor. Pass the java.io.File object.

    • Create a javax.activation.DataHandler object by using its constructor and passing the javax.activation.DataSource object.

    • Create a BLOB object by using its constructor.

    • Populate the BLOB object by invoking its setSwaRef method and passing the javax.activation.DataHandler object.

  4. Import the LiveCycle application

    Import the application by invoking the ApplicationManager object’s importApplicationArchiveDocument method. Pass the BLOB object that contains the LCA file. This method returns an ApplicationStatus object that specifies whether the application was successfully imported.

  5. Check the status

    Check the status of the application by invoking the ApplicationStatus object’s getStatusCode method. If this method returns the value 1, the application is successfully imported.