Listing Content Services (deprecated) Content

You can programmatically list content that is located in a specified space by using the Java API or web service API. All content is returned in a collection object. You can iterate through the collection to obtain details about each piece of content. Listing content is different from searching for content. When searching, you use query statements to filter the search results.

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

Summary of steps

To list content, follow these steps:

  1. Include project files.

  2. Create the service client.

  3. Specify the space whose contents are listed.

  4. Iterate through the results.

Include project files

Include necessary files in your development project. If you are creating a custom application by using Java, include the necessary JAR files. If you are using web services, make sure that you include the proxy files.

The following JAR files must be added to your Java 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)

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 space whose contents are listed

Invoke the Document Management service’s getSpaceContents method to list content that is located in a given space. Content located within the space is returned in a collection object, where each element is a CRCResult object.

Iterate through the results

Iterate through the collection object to obtain information about each piece of content. You can, for example, determine the file name of each piece of content.

List Content Services (deprecated) content using the Java API

List content that is located in a given space 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 space whose contents are listed.

    Invoke the DocumentManagementServiceClientImpl object’s getSpaceContents method and pass the following values:

    • A string value that specifies the name of the store where the space is created. You can specify SpacesStore for this parameter value.

    • A string value that specifies the fully qualified path of the space whose contents are listed.

    • A Boolean value that specifies whether to list only files. The value true means to list only files.

    The getSpaceContents method returns a java.util.List object that contains the contents of the given space.

  4. Iterate through the results.

    • Invoke the java.util.List object’s iterator method. This method returns an Iterator object.

    • Use the Iterator object to retrieve each element in the list. Each element is a CRCResult object. You can use the CRCResult object to obtain information about the content. You can, for example, retrieve the file name by invoking the CRCResult object’s getNodeName method.

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

List contentthat is located in a given space 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 getting 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 space whose contents are listed.

    Invoke the DocumentManagementServiceClient object’s getSpaceContents method and pass the following values:

    • A string value that specifies the name of the store where the space is created. You can specify SpacesStore for this parameter value.

    • A string value that specifies the fully qualified path of the space whose contents are listed.

    • A Boolean value that specifies whether to list only files. The value true means to list only files.

    The getSpaceContents method returns a MyArrayOfCRCResult object that contains the contents of the given space. Each element is a CRCResult object.

  4. Iterate through the results.

    • Determine the number of elements in the MyArrayOfCRCResult object by getting the value of its Count field.

    • For each element in the MyArrayOfCRCResult object, perform an iteration through the object. Cast each element as a CRCResult object. You can use the CRCResult object to obtain information about the content. You can, for example, retrieve the file name by getting the value of the CRCResult object’s nodeName field.

// Ethnio survey code removed