In this blog posting, I show you how to set up a XML document exchange configuration. It will also let you experience the renewed B2B Console based on ADF Faces technology. The case will consist of a custom XML document (Order), a single trading partner Acme and an agreement that specifies that MyCompany (the default host) is capable of sending out XML orders to Acme.
Log on to the B2B console. If you are familiar with the 10g console, you will immediately notice the new look-and-feel and the way things are organized (see figure 1).
Trading Partner
First we have to create a new trading partner. Click on the green plus sign on top of the Trading Partner (TP) panel on the left side of the screen. Name the new TP Acme and click on ok. The next thing we have to configure is the type of document that we want to exchange with Acme.
Document definition
Documents are managed in the Administration window. So click on the Adminstration link at the top of the screen and open the Documents tab on new page. The left panel shows the supported document protocols. Select the Custom protocol and click on the green plus sign to add a new Custom Revision. In the form set the name to Custom_1.0 and click on save. Select the Custom_1.0 revision in the left panel and again click on green sign to add a document type. In the form set the name to XMLDocumentType and click on save. In the left panel select the XMLDocumentType and click on the plus sign to add a document definition. In the form set the name to ComplexOrder_Def, the Identification Type to XML. In the Definition field you have to the set the xsd structure of the complexOrder. Can be anything and I assume you know how to define a XSD structure. Leave all the other fields untouched, because we don't need them for this simple case. See figure 3 for an example of the protocol tree in the left panel and the completed Document definition form.
Figure2
Ok, by know you have probably experienced the usability of the renewed B2B console. In my opinion the new Oracle Integration B2B 11g console enables you to keep a better overview of what you have configured and where you are in a specific configuration part, e.g. setting up new documents.
Document capability
Now we have to add a capability to the TP Acme to inform the B2B engine that Acme is capable of receiving XML orders from our side. Go back to the Partner page (Partner link at the top of the page). Select Acme in the trading partner and in the right panel select the Document tab and click on the green plus sign at the Documents overview to add new a document capability. In the Select document definition pop-up screen unfold the Custom tree and select the ComplexOrder_Def definition and click on Add. Make sure that only the receiver checkbox is checked; we are only going to send orders to Acme. Click on save to save the capability. B2B automatically adds a dual capability to MyCompany for the same document definition and the dual direction that you have specified at the trading partner side. Check it. Figure 3 shows the Trading Partner document screen
Delivery Channel
The next thing that we need to configure is the channel on which Acme wants to receive the orders. For simplicity, we use the file system as the transport protocol. Oracle B2B also supports e.g. FTP, JMS, Email, HTTP. Click on the channels tab in the right panel of Trading Partner Acme. Click on the green plus sign and set the protocol to file and the name to Acme_File_Channel. At the bottom of the page set the transport protocol parameters and the channel parameters to your own need. Note: you can use placeholders in the filename format field. I used this format:
order_%MSG_ID%.xml
More available placeholder can be found here. Click on save when you are done.
Agreement and deployment
At this point we have set uo the exchange document type, TP capabilities and the Acme delivery channel. We are now ready to create an agreement. On the Partner page click on the green plus sign to add a new agreement. Figure 4 shows you how to fill in all the fields in the Agreement form.
After you have completed the form, save the agreement. Before we can deploy the agreement we first have to validate it; click on validate and finally on deploy to make the agreement active. We are now ready to send out orders to Acme :)
This blog has shown how to setup a simple document exchange configuration in Oracle Fusion Middleware B2B 11g. In a next posting I will describe how the new B2B adapter in 11g can be used to construct and send out orders from a composite using a BPEL or Mediator component.
No comments:
Post a Comment