
Adobe
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:
The following illustration (Figure 1) shows a .NET 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.

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.
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.

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
Note: In the client applications created in this
document, the |
2 |
Represents the Content Service's The Note: For information about the |
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.

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
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.