Tag Archives: ucm

How to in Jdeveloper ADF Tutorials – UCM connection from Jdeveloper


When you connect to ucm from jdeveloper if you face problem in connecting then its worth to check the ip filter of the ucm connection in em console.

UCM connection to a file from Java


Here is the snippet to connect to UCM from java


// create the IDC Client Manager manager
IdcClientManager manager = new IdcClientManager();

// build a client that will communicate using the HTTP protocol
IdcClient idcClient;

try {
//context with ucm username and password
IdcContext user = new IdcContext ("webadmin", "passw0rd");
//ucm link
idcClient = manager.createClient("idc://ucmwebcenterqa01.group.com:4444");

// get the binder
DataBinder binder = idcClient.createBinder();

// populate the binder with the parameters
binder.putLocal ("IdcService", "GET_FILE");
binder.putLocal("dDocName", "UCM_CLUSTER1001204");
binder.putLocal("RevisionSelectionMethod", "Latest");

try {
ServiceResponse response = idcClient.sendRequest (user, binder);

// get the response as a string
String responseString = response.getResponseAsString ();
//dispaly the content of the file
System.out.println ("" + responseString);

} catch (IdcClientException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
} catch (IdcClientException e) {
e.printStackTrace();
}
}