Uderc programming article aggregator sites

Error While Making a Request Through API

Tags:
Answers: Have 9 answers
Advertisement
Hi everyone,
I'm trying to submit a request through the API for the "Assign Roles" template, I used http://java.net/projects/openptk/sources/svn/content/branches/Oracle/OIM11g/examples/java/OIMClient/src/oim/client/request/RequestRoleCreate.java?rev=1489 as a basis for my code. Pretty much line for line.
This is my code.
public static RequestStatusSummary[] applicationAccessRequest(String email, String templateName, String roleName) {
String userKey = getUserKey(email);
Beneficiary beneficiary = null;
RequestBeneficiaryEntity entity = null;
List<RequestBeneficiaryEntity> entityList = null;
List<RequestBeneficiaryEntity> entityAttrList = null;
// add role requested
entityList = new ArrayList<RequestBeneficiaryEntity>();
entity = new RequestBeneficiaryEntity();
entity.setEntityKey(getRoleKey(roleName));
entity.setEntityType(RequestConstants.ROLE);
entity.setEntitySubType(roleName);
entityList.add(entity);
// set beneficiary to user
beneficiary = new Beneficiary();
beneficiary.setBeneficiaryType("user");
beneficiary.setBeneficiaryKey(userKey);
beneficiary.setTargetEntities(entityList);
// add benficiaries to the request data
List<Beneficiary> beneficiaries = new ArrayList<Beneficiary>();
beneficiaries.add(beneficiary);
requestData.setBeneficiaries(beneficiaries);
System.out.println(requestData);
// submit request
String reqId = requestSvc.submitRequest(requestData);
RequestStatusSummary[] requestStatusSummary = requestSvc.getRequestStatusSummary(reqId);
return requestStatusSummary;
getRoleKey() and getUserKey obtain the correct values. Directly before calling this method I log in to OIM using OIMClient this works correctly as well. The issue is that submitRequest() throws this. Any suggestions would be greatly appreciated. Thank you for your time.
javax.ejb.EJBException: ; nested exception is:
     java.io.EOFException; nested exception is: java.io.EOFException
     at weblogic.rjvm.t3.MuxableSocketT3.endOfStream(MuxableSocketT3.java:345)
     at weblogic.socket.SocketMuxer.deliverExceptionAndCleanup(SocketMuxer.java:826)
     at weblogic.socket.SocketMuxer.deliverEndOfStream(SocketMuxer.java:760)
     at weblogic.socket.SocketMuxer.readReadySocketOnce(SocketMuxer.java:941)
     at weblogic.socket.SocketMuxer.readReadySocket(SocketMuxer.java:888)
     at weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java:339)
     at weblogic.socket.SocketReaderRequest.run(SocketReaderRequest.java:29)
     at weblogic.work.ExecuteRequestAdapter.execute(ExecuteRequestAdapter.java:21)
     at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:145)
     at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:117)
javax.ejb.EJBException: ; nested exception is:
     java.io.EOFException; nested exception is: java.io.EOFException
     at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.unwrapRemoteException(RemoteBusinessIntfProxy.java:121)
     at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:96)
     at $Proxy6.submitRequestx(Unknown Source)
     at oracle.iam.request.api.RequestServiceDelegate.submitRequest(Unknown Source)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at Thor.API.Base.SecurityInvocationHandler$1.run(SecurityInvocationHandler.java:68)
     at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
     at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
     at weblogic.security.Security.runAs(Security.java:41)
     at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs(weblogicLoginSession.java:52)
     at Thor.API.Base.SecurityInvocationHandler.invoke(SecurityInvocationHandler.java:79)
     at $Proxy7.submitRequest(Unknown Source)
     at testoimlogin.TestOIMLogin.applicationAccessRequest(TestOIMLogin.java:350)
     at testoimlogin.TestOIMLogin.main(TestOIMLogin.java:537)
Caused by: java.io.EOFException
     at weblogic.rjvm.t3.MuxableSocketT3.endOfStream(MuxableSocketT3.java:345)
     at weblogic.socket.SocketMuxer.deliverExceptionAndCleanup(SocketMuxer.java:826)
     at weblogic.socket.SocketMuxer.deliverEndOfStream(SocketMuxer.java:760)
     at weblogic.socket.SocketMuxer.readReadySocketOnce(SocketMuxer.java:941)
     at weblogic.socket.SocketMuxer.readReadySocket(SocketMuxer.java:888)
     at weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java:339)
     at weblogic.socket.SocketReaderRequest.run(SocketReaderRequest.java:29)
     at weblogic.work.ExecuteRequestAdapter.execute(ExecuteRequestAdapter.java:21)
     at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:145)
     at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:117)
Advertisement
The best answer: How are you creating OIMClient ?
Make sure that you are using proper OIM URL: t3://ManagerServer:MANAGEDSERVERPORT
getting error while calling RequestService interface