JBI Component development (Part 11)

The LibMapperServiceEngine  Composite Application

1. The LibMapperServiceEngine Composite Application

Service Assembly - a composite application of components.





TestLibMapperBpelModule:

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

import the two modules previously created into the JBI Module folder:

- LibMapperServiceEngineJBIModule
- TestLibMapperBpelModule

Choose in the NetBeans 6.1 TestMapperSECompositeApp's menu the build item to create the SU of the TestMapperSECompositeApp.

Display the service assembly by clicking the Service Assembly icon.

The illustration below shows the CASA Editor and the Service Assembly for the TestMapperSECompositeApp project:





Deploy the TestMapperSECompositeApp on JBI

NetBeans 6.1 provide a service GUI allowing the JBI management.

The illustration below shows through the management service, the deployed service assebly TestMapperSECompositeApp on JBI:





2. Glassfish Administration tool and JBI

The browser-based option we have for exploring JBI monitoring and management data is the GlassFish administrative console.

All JBI administration use-cases are built into the Sun Application Server Admin Console
This allows administrators to administer their domain runtimes and components remotely using a browser.

The illustration below shows Sun Application Server Admin Console the installed JBI components:






3. Testing the Generic Library Wrapper Service Engine that use a Java JNI wrapper Library.

How to test the new deployed composite application ?

Select the Composite application'project Test folder and create a new test case.
Select the WSDL and the operation that to be tested.

The illustration below shows through the NetBeans Test case wizard:




After the test creation you need fill two SOAP messages:

the input SOAP message that will contain the data sent to the HTTP BC.
the output SOAP message with the test return data that will receive.

The NetBeans test case will compare the input and output messages.

Input test SOAP message sent to the HTTP BC:




Output test SOAP message from the HTTP BC:

 The ilustration below shows the LibMapperServiceEngine testing through NetBeans:



4. Composite application test case: Full Log from the Glassfish Application Server:


Service async request for: //TestPMService/jniPort
Query string encoding: UTF-8
Completed async invoke
Processing SOAPMessage received in AsyncProvider. [Service: {http://www.sun.com/jbi/examples/sample-service/jni/}TestPMService] [Port: {http://www.sun.com/jbi/examples/sample-service/jni/}jniPort] [Operation: null]
Adding reply listener for messsage exchange:214969219381459-49582-134450151485230164
SOAP envelope namespaces:
{xmlns:xsd=http://www.w3.org/2001/XMLSchema
xmlns:typ=http://www.sun.com/jbi/examples/sample-service/jni/types/
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/
}
SOAP body to normalize:
<?xml version="1.0" encoding="UTF-8"?><soapenv:Body xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><typ:Rule xmlns:typ="http://www.sun.com/jbi/examples/sample-service/jni/types/">
<typ:ruleName>RuleTest1</typ:ruleName>
<typ:userID>33445544</typ:userID>
<typ:jobName>Job243</typ:jobName>
<typ:rule>RET_456</typ:rule>
<typ:state>actif</typ:state>
</typ:Rule></soapenv:Body>
SOAP body namespaces:
{}
TYPE_DOC: false TYPE_RPC: false ELEM_DOC: true ELEM_RPC: false
Style is Document, part TestRulePolicyPartInput is Element, QName {http://www.sun.com/jbi/examples/sample-service/jni/types/}Rule
SOAP header to normalize:
<?xml version="1.0" encoding="UTF-8"?><soapenv:Header xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"/>
SOAP header namespaces:
{}
Normalized message:
<?xml version="1.0" encoding="UTF-8"?><jbi:message xmlns:msgns="http://www.sun.com/jbi/examples/sample-service/jni/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://www.sun.com/jbi/examples/sample-service/jni/types/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="TestRulePolicyInput" type="msgns:TestRulePolicyMessageInput" version="1.0" xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper"><jbi:part><typ:Rule>
<typ:ruleName>RuleTest1</typ:ruleName>
<typ:userID>33445544</typ:userID>
<typ:jobName>Job243</typ:jobName>
<typ:rule>RET_456</typ:rule>
<typ:state>actif</typ:state>
</typ:Rule></jbi:part></jbi:message>
Sending to component this normalized message:
<?xml version="1.0" encoding="UTF-8" standalone="no"?><jbi:message xmlns:msgns="http://www.sun.com/jbi/examples/sample-service/jni/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://www.sun.com/jbi/examples/sample-service/jni/types/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="TestRulePolicyInput" type="msgns:TestRulePolicyMessageInput" version="1.0" xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper"><jbi:part><typ:Rule>
<typ:ruleName>RuleTest1</typ:ruleName>
<typ:userID>33445544</typ:userID>
<typ:jobName>Job243</typ:jobName>
<typ:rule>RET_456</typ:rule>
<typ:state>actif</typ:state>
</typ:Rule></jbi:part></jbi:message>
Sending message 214969219381459-49582-134450151485230164
The request received is not a ws-rm enabled message; generated com.sun.jbi.messaging.groupid with value [937f5d14-c373-4e5b-ad5d-c193ce0e5a75] and com.sun.jbi.messaging.messageid with value [5] for message exchange with ID [214969219381459-49582-134450151485230164]
looking up for mx listener with key null+{http://www.sun.com/jbi/examples/sample-service/selib/}selibService+LibMapperServiceEngine_JBIPort+PROVIDER
MXListener.MessageExchangeReceived: with Status: Active
MessageExchangeHandler.processMessageExchange:status: Active
Processing In Message on Provider side ExchangeId: 214969219381459-49582-134450151485640165
Pattern: http://www.w3.org/2004/08/wsdl/in-out
SendChannel: sun-bpel-engine
Role: Provider Index: 1 SynchState: NONE
EndpointLink: Null
Status: ACTIVE Location: LOCAL
Service: null
Endpoint:
Owner: LibMapperServiceEngine Active: True ActiveExchanges: 1
Service: {http://www.sun.com/jbi/examples/sample-service/selib/}selibService
Endpoint: LibMapperServiceEngine_JBIPort
LastDoneTime : Mon Nov 03 15:24:03 CET 2008
Operation: setRulePolicy
InterfaceName: null
Transaction: None
Properties Count: 0
DeltaProperties Count: 1
Name: com.sun.jbi.messaging.messageid
Value: 10.0.2.15:-13166529:11d62b4be84:-7faf:-2000003:-0
Messages Count: 1
Message Name: in
Message Content(Type): javax.xml.transform.dom.DOMSource
Properties Count: 0
Attachments Count: 0
JNI service info :{http://www.sun.com/jbi/examples/sample-service/selib/}selibService opName: setRulePolicy
############### Call Mapper INPUT MESSAGE BEGIN #################
<jbi:message xmlns:msgns="http://www.sun.com/jbi/examples/sample-service/selib/" type="msgns:setRulePolicyMessageInput" version="1.0" xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper"><jbi:part><ns1:Rule xmlns:ns1="http://www.sun.com/jbi/examples/sample-service/selib/types/"><ns1:ruleName>RuleTest1</ns1:ruleName><ns1:userID>33445544</ns1:userID><ns1:jobName>Job243</ns1:jobName><ns1:rule>RET_456</ns1:rule><ns1:state>actif</ns1:state></ns1:Rule></jbi:part></jbi:message>
############### Call Mapper INPUT MESSAGE END ##################
Will load mapping properties !!!!
name: ns1:ruleName value: RuleTest1
name: ns1:userID value: 33445544
name: ns1:jobName value: Job243
name: ns1:rule value: RET_456
name: ns1:state value: actif
Will Call Mapper lib !!!!
looking operation for msg : setRulePolicyMessageInput
TPortType: selibPortType
Operation: setRulePolicy
localPart: input
msgLocalPart: setRulePolicyMessageInput
JNIlibMapper.JNIMapper: callLib -> call the method: setRulePolicy with params type: ns1:Rule
IN -> name: ns1:ruleName value: TOTO_0
IN -> name: ns1:userID value: TOTO_1
IN -> name: ns1:jobName value: TOTO_2
IN -> name: ns1:rule value: TOTO_3
IN -> name: ns1:state value: TOTO_4
Java: PMServices: setPolicyRule
OUT -> name: ns1:ruleName value: TOTO_0
OUT -> name: ns1:userID value: TOTO_1
OUT -> name: ns1:jobName value: TOTO_2
OUT -> name: ns1:rule value: TOTO_3
OUT -> name: ns1:state value: TOTO_4
looking message output name from operation name: setRulePolicy
TPortType: selibPortType
Operation: setRulePolicy
localPart: input
localPart: output
msgLocalPart: setRulePolicyMessageOutput
############### Call Mapper OUTPUT MESSAGE BEGIN #################
<jbi:message xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper" xmlns:msgns="http://www.sun.com/jbi/examples/sample-service/selib/" type="msgns:setRulePolicyMessageOutput" version="1.0">
<jbi:part>
<ns1:Rule xmlns:ns1="http://www.sun.com/jbi/examples/sample-service/selib/types/">
<ns1:ruleName>TOTO_0</ns1:ruleName>
<ns1:userID>TOTO_1</ns1:userID>
<ns1:jobName>TOTO_2</ns1:jobName>
<ns1:rule>TOTO_3</ns1:rule>
<ns1:state>TOTO_4</ns1:state>
</ns1:Rule>
</jbi:part>
</jbi:message>
############### Call Mapper OUTPUT MESSAGE END ##################
XXX MX Handler processed ME with STATUS: Active
looking up for mx listener with key null+{http://www.sun.com/jbi/examples/sample-service/selib/}selibService+LibMapperServiceEngine_JBIPort+PROVIDER
MXListener.MessageExchangeReceived: with Status: Active
MessageExchangeHandler.processMessageExchange:status: Active
Processing In Message on Provider side ExchangeId: 214969219381459-49582-134450151486240166
Pattern: http://www.w3.org/2004/08/wsdl/in-out
SendChannel: sun-bpel-engine
Role: Provider Index: 1 SynchState: NONE
EndpointLink: Null
Status: ACTIVE Location: LOCAL
Service: null
Endpoint:
Owner: LibMapperServiceEngine Active: True ActiveExchanges: 1
Service: {http://www.sun.com/jbi/examples/sample-service/selib/}selibService
Endpoint: LibMapperServiceEngine_JBIPort
LastDoneTime : Mon Nov 03 15:25:48 CET 2008
Operation: getRulePolicy
InterfaceName: null
Transaction: None
Properties Count: 0
DeltaProperties Count: 1
Name: com.sun.jbi.messaging.messageid
Value: 10.0.2.15:-13166529:11d62b4be84:-7faf:-2000005:-1
Messages Count: 1
Message Name: in
Message Content(Type): javax.xml.transform.dom.DOMSource
Properties Count: 0
Attachments Count: 0
JNI service info :{http://www.sun.com/jbi/examples/sample-service/selib/}selibService opName: getRulePolicy
############### Call Mapper INPUT MESSAGE BEGIN #################
<jbi:message xmlns:msgns="http://www.sun.com/jbi/examples/sample-service/selib/" type="msgns:getRulePolicyMessageInput" version="1.0" xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper"><jbi:part><ns1:Rule xmlns:ns1="http://www.sun.com/jbi/examples/sample-service/selib/types/"><ns1:ruleName>TOTO_0</ns1:ruleName><ns1:userID>TOTO_1</ns1:userID><ns1:jobName>TOTO_2</ns1:jobName><ns1:rule>TOTO_3</ns1:rule><ns1:state>TOTO_4</ns1:state></ns1:Rule></jbi:part></jbi:message>
############### Call Mapper INPUT MESSAGE END ##################
Will load mapping properties !!!!
name: ns1:ruleName value: TOTO_0
name: ns1:userID value: TOTO_1
name: ns1:jobName value: TOTO_2
name: ns1:rule value: TOTO_3
name: ns1:state value: TOTO_4
Will Call Mapper lib !!!!
looking operation for msg : getRulePolicyMessageInput
TPortType: selibPortType
Operation: setRulePolicy
localPart: input
msgLocalPart: setRulePolicyMessageInput
localPart: output
Operation: getRulePolicy
localPart: input
msgLocalPart: getRulePolicyMessageInput
JNIlibMapper.JNIMapper: callLib -> call the method: getRulePolicy with params type: ns1:Rule
IN -> name: ns1:ruleName value: TOTO_0
IN -> name: ns1:userID value: TOTO_1
IN -> name: ns1:jobName value: TOTO_2
IN -> name: ns1:rule value: TOTO_3
IN -> name: ns1:state value: TOTO_4
Java: PMServices: getPolicyRule -> TOTO_0
OUT -> name: ns1:ruleName value: rule1
OUT -> name: ns1:userID value: 233445
OUT -> name: ns1:jobName value: job45
OUT -> name: ns1:rule value: RT,45,FG-
OUT -> name: ns1:state value: active
looking message output name from operation name: getRulePolicy
TPortType: selibPortType
Operation: setRulePolicy
Operation: getRulePolicy
localPart: input
localPart: output
msgLocalPart: getRulePolicyMessageOutput
############### Call Mapper OUTPUT MESSAGE BEGIN #################
<jbi:message xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper" xmlns:msgns="http://www.sun.com/jbi/examples/sample-service/selib/" type="msgns:getRulePolicyMessageOutput" version="1.0">
<jbi:part>
<ns1:Rule xmlns:ns1="http://www.sun.com/jbi/examples/sample-service/selib/types/">
<ns1:ruleName>rule1</ns1:ruleName>
<ns1:userID>233445</ns1:userID>
<ns1:jobName>job45</ns1:jobName>
<ns1:rule>RT,45,FG-</ns1:rule>
<ns1:state>active</ns1:state>
</ns1:Rule>
</jbi:part>
</jbi:message>
############### Call Mapper OUTPUT MESSAGE END ##################
XXX MX Handler processed ME with STATUS: Active
looking up for mx listener with key null+{http://www.sun.com/jbi/examples/sample-service/selib/}selibService+LibMapperServiceEngine_JBIPort+PROVIDER
MXListener.MessageExchangeReceived: with Status: Done
MessageExchangeHandler.processMessageExchange:status: Done
InOut Message Exchange Provider received DONE : END of service invocation
XXX MX Handler processed ME with STATUS: Done
End of ME processing. STATUS: Done. Removing the MX Handler ...
looking up for mx listener with key null+{http://www.sun.com/jbi/examples/sample-service/selib/}selibService+LibMapperServiceEngine_JBIPort+PROVIDER
MXListener.MessageExchangeReceived: with Status: Done
MessageExchangeHandler.processMessageExchange:status: Done
InOut Message Exchange Provider received DONE : END of service invocation
XXX MX Handler processed ME with STATUS: Done
End of ME processing. STATUS: Done. Removing the MX Handler ...
Got a message with SOAP binding; id: 214969219381459-49582-134450151485230164
Processing started for message exchange 214969219381459-49582-134450151485230164
Response for exchange 214969219381459-49582-134450151485230164 received (201 ms}
Processing message exchange 214969219381459-49582-134450151485230164 as inbound; pattern is http://www.w3.org/2004/08/wsdl/in-out
Denormalizing received msg:
<?xml version="1.0" encoding="UTF-8" standalone="no"?><jbi:message xmlns:msgns="http://www.sun.com/jbi/examples/sample-service/jni/" type="msgns:TestRulePolicyMessageOutput" version="1.0" xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper"><jbi:part><ns1:Rule xmlns:ns1="http://www.sun.com/jbi/examples/sample-service/jni/types/"><ns1:ruleName>rule1</ns1:ruleName><ns1:userID>233445</ns1:userID><ns1:jobName>job45</ns1:jobName><ns1:rule>RT,45,FG-</ns1:rule><ns1:state>active</ns1:state></ns1:Rule></jbi:part></jbi:message>
Normalized message to denormalize:
<?xml version="1.0" encoding="UTF-8" standalone="no"?><jbi:message xmlns:msgns="http://www.sun.com/jbi/examples/sample-service/jni/" type="msgns:TestRulePolicyMessageOutput" version="1.0" xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper"><jbi:part><ns1:Rule xmlns:ns1="http://www.sun.com/jbi/examples/sample-service/jni/types/"><ns1:ruleName>rule1</ns1:ruleName><ns1:userID>233445</ns1:userID><ns1:jobName>job45</ns1:jobName><ns1:rule>RT,45,FG-</ns1:rule><ns1:state>active</ns1:state></ns1:Rule></jbi:part></jbi:message>
JBI message namespaces:
{xmlns:msgns=http://www.sun.com/jbi/examples/sample-service/jni/
}
JBI part 'TestRulePolicyPartOutput' namespaces:
{}
Denormalized SOAP envelope:
<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><ns1:Rule xmlns:msgns="http://www.sun.com/jbi/examples/sample-service/jni/" xmlns:ns1="http://www.sun.com/jbi/examples/sample-service/jni/types/"><ns1:ruleName>rule1</ns1:ruleName><ns1:userID>233445</ns1:userID><ns1:jobName>job45</ns1:jobName><ns1:rule>RT,45,FG-</ns1:rule><ns1:state>active</ns1:state></ns1:Rule></SOAP-ENV:Body></SOAP-ENV:Envelope>
Calling back JAX-WS asynchronously to proceed with response
Processing completed for message exchange 214969219381459-49582-134450151485230164

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