JBI Component development (Part 10)

How to use the LibMapperServiceEngine

1. How to use the LibMapperServiceEngine

1.1. Build a test case

1.1.1. Notion of Service Unit and Service Assembly
The official JBI term used for component and composite application are:

- Service Unit - a component of a container type;
- Service Assembly - a composite application of components.

A service engine that uses the service engine wizard,
A Service Engine module that plugs in the NetBeans environment to create service units (JBI modules).




1.1.2. The test case

The test case for the LibMapperServiceEngine will based on a simple BPEL process that will call the two methods setPolicyRule and getPolicyRule implemented in C code inside the MyLib.
The test case need two WSDL files:

- TestSampleJNICalls.wsdl: input partner at BPEL level using the HTTP binding Binding Component
- SampleJNICalls.wsdl: description of MylLib interface.

The illustration below shows the SampleJNICalls.wsdl:




The illustration below shows the TestSampleJNICalls.wsdl:




1.1.3. BPEL test case for the LibMapperEngineService

TestLibMapperBpelModule:

To create the TestLibMapperBpelModule, use NetBeans and create a new BPEL project with the wizard:




Import the two WSDL in the process file folder:

- TestSampleJNICalls.wsdl
- SampleJNICalls.wsdl


Create a BPEL process with the NetBeans wizard:




The illustration below shows the BPEL process that will call the JNIWrapper library through the LibMapperServiceEngine:





The illustration below shows the BPEL assignation variable through the mapping graphic tool:




Choose in the NetBeans6.1 TestLibMapperBpelModule's menu, the build item to create the SU of the TestLibMapperBpelModule.
This module will be use in the creation of the composite application (Service Assemby).

1.1.4. LibMapperServiceEngine module

At the end of this topic the project will produce a LibMapperServiceEngineModule.
This module will be the Service Unit for the LibMapperServiceEngine.

To create the LibMapperServiceEngineModule, use NetBeans and create a new Service Engine project with the wizard:




The generated project embed three files:

- jbi.xml
- semap.properties
- SampleJNICalls.wsdl

Theses files are templates files that have been embedded in the previous JBI DeploymentPlugin [LibMapperServiceEngine] project.
You need to edit these files jbi.xml file to be compliant for the test case.

- jbi.xml is the descriptor of the service unit

- semap.properties

The semap.properties file contains the following parameters:

- wsdl=SampleJNICalls
- mapper=libmapper.JNIMapper

The mapper field must contain the the name of the specific class that extends the Mapper file. This class will be dynamically loaded by the LibMapperServiceEngine.

The wsdl field must contain the name of the WSDL that describe the interface of the Java library.

- SampleJNICalls.wsdl

this the file that describes the interface of the Java library.


The illustration below shows the LibMapperServiceEngineJBIModule:



Choose in the NetBeans6.1 LibMapperServiceEngineJBIModule's menu, the build item to create the SU of the LibMapperServiceEngineJBIModule.
This module will be used in the creation of the composite application (Service Assemby).

See part 11 ...

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

Christophe Vaille

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today