Thursday, June 7, 2012

Invoking a ADF-BC service from the SOA Composite – Oracle SOA Suite


Invoking a ADF-BC service from the SOA Composite – Oracle SOA Suite

This blog explains how to create a sample Oracle ADF-BC service and invoke the same from the Oracle SOA Suite composite.

Creating the ADF-BC application: 

This is a simple ADF-BC application to perform the operations on the Employee table.
  • Create the ADF Model Project and name it as EmpModel
 
  • Select the ADF Business Components in the Project Technologies

  •  Right click on the Project -- >Select ADF Business Components -- >Click on Business Components from Tables

  •   Select the required tables (my case it’s Employee)
  •  Click Next. Select the Available views to the selected section.

  • Click Next. Don’t select anything in the Read Only View Object
  • Click next. Change the Name as EmpAppModule
 
  • Click Next,Next and Finish

 
  • Creating the Service Interface
  • Double Click on EmpAppModule(based on your project design), select Service Interface and click on Add button.
 
  • If required, change the Web Service Name and the Target Namespace value. Select the check box “Generate Asynchronous Web Service Methods”
 
  • Click Next ,Next
  • Move the Available View Instance to the Selected One and select the operations that need to be exposed via service.
 
  • Click on Next , Finish


  • Right Click the project and Click on New  
  • Select Deployment profiles, Click on Business Component Service interface and enter the name accordingly

 
  • Right Click on the Application and select the “Application Properties”
  • Create new EAR deployment profile, enter the name as EmpAppService.

  • Select the Application Assembly and select only the Middle Tier
 
  • Changing the DB URL configuration to Datasource (if required)
  • Double click on EmpAppModule and select configurations.

  • Click on each configurations and change the connection Type to Data Source and enter the data source name.

  • Right click on the project and Click on Project properties.

  • Select Java EE Application and enter meaningful name to Java EE Web Application Name and Java EE Web Context Root.

Creating the Composite process to invoke the ADF-BC Service:


  • Create a Composite with BPEL process
  • Right click on the reference section and select Insert ADF-BC service
 
  • Enter the name as EmpModuleService and  Registry as EmpAppService_ JBOServiceRegistry(<application Name_ JBOServiceRegistry > )
  • The application name is the name entered when creating the application deployment profile.
  •  Enter the WSDL URL of the ADF-BC service -http://<Host Name>:<Port>/<Project Context Path>/<Service Interfacename>?WSDL
              http://localhost:8000/EmpAppModuleServiceContext/EmpAppModuleService?WSDL




  • Wire the BPEL and the ADF-BC service.
 
  • Design the BPEL as per the requirement

  • Deploy both the ADF BC service (Right click on the application and select the deployment profile created  and deploy) and the composite.
  • Test the composite (I am testing here for getEmployee by passing the empid)



4 comments:

  1. I recently came across your blog and have been reading along. I thought I would leave my first comment. I don't know what to say except that I have enjoyed reading. Nice blog. I will keep visiting this blog very often.

    Alena

    Diverticulitis Treatment Diverticulitis Diet

    ReplyDelete
  2. Hi
    we followed above tutorail and we successfully deployed ADFBC and soa application on standalone server.
    while testing bpel service in em console we are getting follwing errors message




    101





    0


    Error converting SDO to XML: Exception [EclipseLink-25007] (Eclipse Persistence Services - 2.1.3.v20110304-r9073): org.eclipse.persistence.exceptions.XMLMarshalException Exception Description: A descriptor for class oracle.jbo.service.errors.ServiceDMLErrorMessageImpl was not found in the project: Exception Description: A descriptor for class oracle.jbo.service.errors.ServiceDMLErrorMessageImpl was not found in the project





    0


    kindly help if any addtional configuration is required

    ReplyDelete
  3. Hi,

    Followed the steps mentioned above. Getting the following error message in the BPEL composite from the error console -

    Error converting SDO to XML: Exception [EclipseLink-25007] (Eclipse Persistence Services - 2.3.1.v20111018-r10243): org.eclipse.persistence.exceptions.XMLMarshalException
    Exception Description: A descriptor for class oracle.jbo.service.errors.ServiceErrorMessageImpl was not found in the project. For JAXB, if the JAXBContext was bootstrapped using TypeMappingInfo[] you must call a marshal method that accepts TypeMappingInfo as an input parameter.:
    Exception Description: A descriptor for class oracle.jbo.service.errors.ServiceErrorMessageImpl was not found in the project. For JAXB, if the JAXBContext was bootstrapped using TypeMappingInfo[] you must call a marshal method that accepts TypeMappingInfo as an input parameter.

    Kindly help.

    Regards,
    Abbas.

    ReplyDelete