12 May 2017

WebCenter Imaging web services

I wanted to invoke WebCenter Imaging (WCI) web services to export the documents to folder. On oracle docs you can find the code at Retrieve Document Sample.
Even on internet you will find the code snippet with detailed explanation at many places. However the most irritating & equally frustrating part I faced was to find the jar files. Some the classes are not standard and you won't find the entries in the www.findjar.com site. 

Below are the places where you could find the jar file for this program to run
1) <Middleware_Home>/wl_Server/server/lib
2) <Middleware_Home>/Oracle_ECM1/ipm/lib

Even after adding the Jar files from these locations it fails at the login service i.e. below line. 

ServicesFactory servicesFactory = ServicesFactory.login(credentials, Locale.US, "http://vikrant.ipm.com:16000/imaging/ws");

To make it work you need to add few more jar file. Below is the complete list of Jar files. All these jar files are available at JarFiles.
  1. gmbal-api-only.jar
  2. imaging-client.jar: This file must be from WCI server to which you will be connecting. For me the size was 835458 B 
  3. itextpdf-5.0.6.jar
  4. javax.persistence.jar
  5. jaxb-core-2.2.11.jar
  6. jaxb-impl.jar
  7. jaxws-rt.jar
  8. policy.jar
  9. stax-ex.jar
  10. streambuffer.jar
  11. ws.api.jar