Oracle Fusion Middleware (OFM) B2B 11g supports many business document and messaging standards.
ebXML (Electronic Business using Extensible Markup Language is a B2B messaging standard that is also supported by OFM B2B 11g. Shortly described ebXML enables XML messaging over the Electronic Business messaging Service (basically a SOAP extension), abbreviated as ebMS.
This posting describes how to set-up ebXML messaging using two local OFM B2B 11g (PS1) domains. For simplicity, I will extend my previous
B2B example.
Please refer to my previous postings for more info about specific B2B 11g configuration concepts:
-
http://tomhofte.blogspot.com/2009/10/how-to-set-up-xml-document-exchange.html-
http://tomhofte.blogspot.com/2009/10/easy-binding-of-oracle-fusion.htmlNoteYou have to configure both Paris and Berlin. Both configurations are mirrored. Normally, you would use the CPA/CPP import functionality of OFM B2B 11g for this. Unfortunately, I don't have a CPA availabe for this simple demo.
Trading PartnersConfigure the hosts and TP in both B2B installations:
- Paris (receiving role)
- Berlin (sending role)
(Just use all the defaults, including the TP identification type 'Name')
Configure the documentAn ebXML document is defined as a Custom document protocol in OFM B2B 11g. For simplicity, I have used my
previous Order document example. I only have to change the document type and definition to resp. configure the ebMS specific properties
- Action
- Service
- ServiceType
- From role
- To role
and to configure the inbound document identification. I used the XPATH Identification Expression for identifying inbound documents. Also specify a document routing id in the routing tab (I used Berlin_Order). The routing id can be used to route inbound messages to specific applications.
Delivery ChannelsFor both Berlin and Paris, I have specified
Delivery Channels that uses the
ebMS 2.0 protocol (I could use ebMS 1.0..but I prefer newest versions :)). Configuring an ebMS 2.0 delivery channel requires some specific settings. Here are the transport protocol settings that I have used:
- url: http://host:port/b2b/transportServlet for receiving messages over http
- Ack mode: async
- Response mode: none
- Retry count: 4
- Retry interval: 2
- -- Leave all the other setting to their default
Deployment and testingDeploy the agreements (make sure you configure the capabilities correctly: Berlin is the sender and Paris the receiver in this scenario) on both sides (look
here how to configure capabilities and agreements). To test the ebXML configuration, I have used my previous
SCA example and modified it for this example. The modifications are in the mediator component, because I have to specify extra B2B adapter properties to allow the B2B engine to identify the agreement. For outbound communication there are two ways to identify an agreement using the B2B adapter in a OFM composite:
1. To and From party + document type and revision. B2B properties:
- b2b.documentTypeName
- b2b.documentProtocolRevision
- b2b.fromTradingPartnerId
- b2b.toTradingPartnerId
2. To and From party + ebMS Action, Service and Service Type:
- b2b.ebms.Service*
- b2b.ebms.ServiceType*
- b2b.ebms.action*
- b2b.fromTradingPartnerId
- b2b.toTradingPartnerId
(*) Those properties are not defined in the JDeveloper Assign activity wizard. You have to manually type in the names in the property selection panel
I used the second option with the following values:
- action = Order_Action
- Service = Order_Service
- Service Type = Order_Service_Type
- To party = Paris
- From party = Berlin
Deploy the SCA composite and use the Test functionality of the EM console to run a test case. You can see the exact ebMS message when you click the
packed message link in the
wire message details screen.