1 Reply Latest reply: Nov 6, 2012 5:45 AM by Ajay Sharma RSS

    How to call Web Service in OAF page registered as business event on apps?

    Ajay Sharma
      Hi,

      I created one business event and Subscribe the web service to it.

      How to call it in OAF page controller.

      currently I am using following code.
            String eventName = "oracle.apps.xxios.dashboardadmin.invoke";
            // invoker business event
                 
                 // unique key for the web service invocation
                 String eventKey = "key1";
                 // event data - XML payload sent to web service as input
                 // String evtData = ....
                 Connection conn = ((OADBTransactionImpl)am.getOADBTransaction()).getJdbcConnection();//((OADBTransactionImpl)getOADBTransaction()).getJdbcConnection();
                 BusinessEvent event = null;
                 try{
                     event = new BusinessEvent(eventName, eventKey);
                    // event.setData(evtData);
                     event.raise(conn);
                 }
                 catch (BusinessEventException e) {
                     throw new OAException("Exception occured when invoking web service - "+e.getMessage());
                 } finally {
                    am.getOADBTransaction().commit();
                 }
                 //String respData = (String)event.getResponseData();
                  dbParam = (String[])event.getResponseData();
                  throw new OAException ("Param = "+dbParam, OAException.INFORMATION);
      
       
      but I got following error.
      Exception occured when invoking web service - Exception when Invoking Web Service -> oracle.apps.fnd.wf.bes.InvokerException: Event payload is not available  
      Regards,
      Ajay