2 Getting Started

This chapter contains the following sections:

2.1 Requirements

Oracle I/PM clients not running on an Oracle WebLogic server have the following requirements:

  • JDK 1.6 or higher

  • An installed and operational Oracle I/PM system

2.2 Configuring the Class Path

The imaging API is contained in the .jar file imaging-client.jar. This is the only .jar reference required to obtain I/PM-specific classes for use in client code.

The imaging-client.jar file is dependent on a number of infrastructure classes for JAX-WS web services and Oracle Web Service Manager Security. These dependencies are automatically available when the client API is called from within an Oracle JRF enabled JEE container.

For standalone JSE clients, IPM provides a bundled zip file containing all external dependencies required by imaging-client.jar. The procedure for configuring references in a stand alone JSE environment is shown below. This procedure assumes that Enterprise Content Management (ECM) is installed to $ORACLE_HOME on a server system, and the client system has no WebLogic or other ECM components installed.

To configure references in a stand-alone JSE environment, do the following:

  1. Copy $ORACLE_HOME/ipm/lib/ecm-client.zip from the server to a temporary directory on the client.

  2. Extract ecm-client.zip to a directory on the client. The directory should contain a lib directory accessible to the client working environment. The .jar files contained within it will be referenced on the classpath at both compile and run time. A typical solution is to place it in a lib directory parallel to the client src and classes directories.)

  3. Copy $ORACLE_HOME/ipm/lib/imaging-client.jar from the server to the lib directory on the client. For example, copy this into the same lib directory to which ecm-client was extracted.

  4. In the classpath during compile and runtime, include imaging-client.jar and ecm-client.jar from with extracted ecm-client zip directory. For example, assuming imaging-client.jar and ecm-client.zip are both installed to a project lib directory within a typical Java project directory, the class path would appear as:

    CLASSPATH = classes:lib/imaging-client.jar:lib/ecm-client.jar

    The ecm-client.jar must be included from within the directory to which the ecm-client.zip was extracted, and all files in the zip must remain in their relative locations within that directory. The ecm-client.jar is a manifest only jar that references other jars using relative paths. Other jars contained in the zip need not be included on the classpath and only ecm-client.jar should be. Future releases may modify the contents of the zip, so referencing other unzipped jars is discouraged.

2.3 Introductory Sample

The following example is a simple demonstration of some of some basic functionality provided by the Oracle I/PM integration API. The example simply logs in to the Oracle I/PM system, lists viewable applications, and logs out.

Example 2-1 Listing Viewable Applications

package devguidesamples;
import java.util.List;
import java.util.Locale;
import oracle.imaging.Application;
import oracle.imaging.ApplicationService;
import oracle.imaging.BasicUserToken;
import oracle.imaging.ImagingException;
import oracle.imaging.NameId;
import oracle.imaging.ServicesFactory;
import oracle.imaging.UserToken;
public class IntroSample {
   public static void main(String[] args) {
      try { // try-catch
         UserToken credentials = new BasicUserToken("ipmuser", "ipmuserpwd");
         ServicesFactory servicesFactory =
            ServicesFactory.login(credentials, Locale.US, "http://ipmhost:16000/imaging/ws");
         try { // try-finally to ensure logout
            ApplicationService appService = servicesFactory.getApplicationService();
            // List the viewable applications to confirm that "Invoices" exists
            List<NameId> appsList = appService.listApplications(Application.Ability.VIEW);
            for (NameId appNameId: appsList) {
               System.out.println( appNameId );
         finally {
            if (servicesFactory != null) {
      catch (ImagingException e) {