Accessibility
Scott Macdonald

Scott Macdonald

Adobe

Table of Contents

Created:
10 November 2008
User Level:
Intermediate
Products:
LiveCycle

Programmatically accessing LiveCycle Content Services ES

Adobe LiveCycle ES software provides the means to programmatically access Adobe LiveCycle Content Services using a client application that was developed in Java, a development environment that supports web services, or Adobe Flex. For example, you can create a .NET application, such as a Windows based application, and use it to store, retrieve, and delete documents located in Content Services ES. This article discusses how to create the following client applications that are able to access Content Services ES:

  • A .NET Window-based client application that uses web services.
  • A Java console-based application that uses the LiveCycle ES Invocation API.
  • A Flex web-based application that uses LiveCycle Remoting.

The following illustration (Figure 1) shows a .NET Windows-based client application that is able to access Content Services ES.

A Windows-based client application that is able to access Content Services ES.

Figure 1. A Windows-based client application that is able to access Content Services ES.

This client application lets a user specify both the name of a PDF document to upload and the location in Content Services ES that stores the PDF document. In this example, the /Company Home/Test Directory location is specified. When the user clicks the Store PDF document button, a File dialog box lets the user select a PDF file from the local file system. After the PDF file is selected, it is stored in Content Services ES and the unique identifier of the new resource is displayed in the Resource Identifier text box.

The following illustration (Figure 2) shows the MortgageForm.pdf file that is located in /Company Home/Test Directory/ as specified in the client application.

The MortgageForm.pdf file located in /Company Home/Test Directory/ as specified in the client application.

Figure 2. The MortgageForm.pdf file located in /Company Home/Test Directory/ as specified in the client application.

A client application cannot directly invoke Content Services ES. That is, unlike other LiveCycle ES services, you cannot directly invoke operations belonging to this service. To access Content Services ES from a client application, you must create either a short-lived or long-lived process using Workbench ES that contains operations support by Content Services ES. Then you must invoke the process from the client application.

Note: When programmatically uploading new content to Content Services ES using a client application, you must specify the content type, otherwise an exception is thrown. For example, to successfully upload a PDF document, specify application/pdf as the content type.

UploadDocument process

The following illustration (Figure 3) shows the UploadDocument process, which is a short-lived process that stores a PDF document in Content Services and is referenced in this document.

A LiveCycle ES process that uploads a PDF document to Content Services

Figure 3. A LiveCycle ES process that uploads a PDF document to Content Services

Note: This document does not describe how to create a process by using Adobe LiveCycle Workbench ES. (For information, see Workbench ES Help.)

The following table describes the operations in the UploadDocument process.

Operation

Description

1

Represents the SetValue operation and enables a client application to pass required values. The following values represent the input values for this process:

  • A document process variable named inDoc that stores the PDF document
  • A string process variable named inNodeLocation that stores the node location
  • A string process variable named inDocName that stores the file name

Note: In the client applications created in this document, the inDoc,inDocName, and inDocLocation process variables are referenced.

2

Represents the Content Service's StoreContent operation and stores the PDF document passed to the process from the client application to the specified node location in Content Services ES.

The UploadDocument process returns a GUID value that represents the value of the new Content Services ES resource and corresponds to the StoreContent operation's NodeID output value (this value is displayed in the client application illustration shown in this section). The name of the output process variable is outValue.

Note: For information about the StoreContent operation, see the service reference in Workbench ES Help.

Note: To follow along with this development article, ensure that Content Services ES is part of your LiveCycle ES installation and that this process is developed and activated. This document does not describe how to create a process by using Workbench ES. (See Workbench ES Help.)

Note: The procedure discussed in this document can be followed for other Content Services ES operations like retrieveContent, deleteContent, createAssociation, and so on.

Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License

About the author

Scott Macdonald is a senior SDK technical writer at Adobe Systems with more than 10 years in the software industry working with Java, C/C++/C#, as well as other programming languages.