How to add a document in IPM using Imaging Services

Here is how you can add a document programmatically using Oracle Imaging APIs — Document and Document Content Services.

The example shown is a simple java client that you can use to test the document creation and check-in. Make sure your project has the imaging-client.jar, from IPM lib, included in its class path.

Create a project and a class to test the Document Services. Following 2 lines will help you authenticate, so that you can start using the Document Services.

As a best practice, wrap any code after login with try{}finally{} just to make sure you log out of the Imaging framework when the work is done — regardless of exceptions — else you will end up having lots of open sessions in Imaging.

From the service factory you can now tap into Document and Document Content Services. With the Document services handy you can now query your application defined in IPM.

Once you get hold of your application in IPM, creating document is simple. Prepare a file to be added, populate list of required metadata for it, then upload and create the document in IPM, like so.

Here is the complete method code.

Sanjib

Director at Fusion Applied
Sanjib is an Oracle Middleware Architectwith over 15 years' experience developing software and managing projects in challenging, fast-paced consulting environments. An experienced OO developer with expertise in J2EE and Oracle Fusion Middleware technologies. His current focus is on helping customers build solutions using the Oracle Fusion Middleware stack including Oracle SOA Suite 11g, BPM, ADF & WebCenter Suite.
Sanjib

Leave a Reply

avatar
  Subscribe  
Notify of