1 Reply Latest reply: Nov 14, 2012 3:19 AM by Nishith Nayan RSS

    Raising Request using OIM ApI's in oim 11g R2

    903196
      Hi all

      I trying to raise a request using OIM API in R2. I have written a sample code and it is throwing me the below error....

      Exception in thread "main" java.lang.NullPointerException
      *     at oracle.iam.ui.custom.updateuser.<init>(updateuser.java:76)*
      *     at oracle.iam.ui.custom.updateuser.main(updateuser.java:118)*


      Please take a look at my code....

      RequestEntityAttribute rea = null;
      rea.setName("Modify User Profile");//This is the place where i am getting the error...
      System.out.println("I am Here3");
      rea.setAction(RequestEntityAttribute.ACTION.Modify);

      List<RequestEntityAttribute> lrea = new ArrayList<RequestEntityAttribute>();
      lrea.add(rea);

      RequestEntity re = null;
      re.setEntityData(lrea);
      List<RequestEntity> reqentity = new ArrayList<RequestEntity>();
      reqentity.add(re);

      RequestData requestData = null;
      requestData.setJustification("I need this Role");
      requestData.setTargetEntities(reqentity);


      String str = null;

      try {
      str = _service.submitRequest(requestData);
      } catch (InvalidRequestException e) {
      } catch (InvalidRequestDataException e) {
      } catch (RequestServiceException e) {
      } catch (BulkBeneficiariesAddException e) {
      } catch (BulkEntitiesAddException e) {
      }

      Thanks in Advance