Sunteți pe pagina 1din 11

End-2-end-105-PO-Processing

I Integrating with Oracle B2B

I Integrating with Oracle B2B ................................................................................................... 1


I.1 Introduction....................................................................................................................... 1
I.2 Use Case ............................................................................................................................. 2
I.3 Configuring the Oracle B2B ............................................................................................ 3
Create a Document Definition ..........................................................................................................................3
I.3.1 Define the Trading Partners .................................................................................................................5
I.3.2 Create Listening Channel ......................................................................................................................5
I.3.3 Create Agreement ..................................................................................................................................6
I.4 Create composite: B2Bprocessing ................................................................................... 7
I.4.1 Create B2B Service: ReceivePO_B2B....................................................................................................8
I.4.2 Create Web Service: Send_PO ..............................................................................................................8
I.4.3 Create & Configure Mediator: Route_PO ...........................................................................................8
I.5 Testing the Process ........................................................................................................... 9

I.1 Introduction
Oracle B2B is an e-commerce gateway that enables the secure and reliable exchange of documents
between an enterprise and its trading partners. Documents are XML data such as a purchase orders or
invoices and are generally standard formats defined by an industry vertical. In any case, standard or not,
the format of the document being exchanged must be agreed upon by the trading partners exchanging
the document.
B2B is a binding component of and is shipped with SOA Suite. The SOA Suite platform enables
eCommerce business processes by providing the infrastructure for process orchestration, error mitigation,
data translation and transformation. It addresses the issues of security, compliance, visibility, and
management. The B2B component provides the means for managing the trading partners.

Section I-3 Integrating with Oracle B2B I-1


End-2-end-105-PO-Processing

I.2 Use Case


In this exercise the focus is on the basic concepts, the components, and how they interoperate.

 Oracle B2B – Manages the interactions with the remote partner:


o Document Management: Translation, Envelopes, Acknowledgments
o Communications: Security, Transports, Messaging Services
o Trading Partner Management: Profiles, Agreements
o System Management: Reports, Metrics, Enterprise Manager
In this exercise Oracle B2B will read an XML file, process it and pass it onto the B2B composite.

 B2B composite – Manages the interactions between Oracle B2B and the PO Composite:
o Routing, Transformation, Process Orchestration

In this exercise, this is simply a pass-through, but it illustrates the best practice for
interoperability. In a typical situation:
o Inbound: this composite, based on trading partner information, would perform
transformations, lookups, and process orchestration between Oracle B2B and the
middleware.
o Outbound: A companion composite would do all the above plus set the trading partner
information for Oracle B2B.

I-2 Integrating with Oracle B2B Section I.2


End-2-end-105-PO-Processing

 PO Composite
This is the existing middleware application that the eCommerce data is tying into via Oracle B2B:

 Error Mitigation Composite


This is out of scope for this exercise, but keep in mind that there is a need for an error mitigation
framework. This is a composite to mange errors between the applications, the Trading Partners,
and the middleware. There are two types of errors: In-Band and Out-of-Band:
o In-Band: An error occurs in a process: Example: An error occurs within composite
process and the appropriate action is taken.
o Out-of-Band: an error occurs outside of process: Example: How to mitigate the Oracle
B2B time out error in the middleware and/or application.

I.3 Configuring the Oracle B2B


The steps are:
1. Create a Document Definition: The Purchase Order
2. Define the Trading Partners and assign the new partner “MarketInc” the new document
3. Create the Host Listening Channel
4. Create and Deploy the Agreement

Create a Document Definition


To create a new Document Definition: Login to the Oracle B2B Console by selecting the B2B
Administration bookmark to go to http://localhost:7001/b2b. Use weblogic/welcome1
as login credentials
1. Select Administration at the top right of the screen.

Section I-3 Integrating with Oracle B2B I-3


End-2-end-105-PO-Processing

2. Select Custom, under Document Protocols in the left pane.


3. Create a new version by selecting the New Version button at the top right.
4. Enter Version Name: 1.0
5. Click Save.
6. Create a new type by selecting the New Type button at the top right.
7. Name the document type: PurchaseOrder
8. Click Save.
9. Create a new definition by selecting the New Definition button an the top right.
10. Name the Document Definition: PurchaseOrder_def
11. Click Save.
12. Select Browse next to the Definition field on the Document Definition pane and choose
po.xsd from ~/SOA11gFoundationTutorial/po/schemas.
13. Select Identification Type: XML
14. On the XML tab, set the Identification Expression: //*[local-name()='PurchaseOrder']
15. On the Routing tab, set the Document Routing ID: PurchaseOrder10
16. Click Save.

I-4 Integrating with Oracle B2B Section I.3


End-2-end-105-PO-Processing

I.3.1 Define the Trading Partners


To update the host and create partner MarketInc:
1. Select Partners at the top right
2. In the left-most pane, select the Edit Trading Parter icon (pencil) for the host trading
partner MyCompany and change the Partner Name to OracleServices. Click OK.
3. Create new trading partner using the Add New Trading Partner icon (plus sign). Set
the Partner Name to: MarketInc and click OK.
4. Select MarketInc in the left-most pane and then select the Documents tab.
 Add (plus icon) Custom > 1.0 > PurchaseOrder > PurchaseOrder_def
 Sender box Check
 Receiver box Un-Check

5. Click Save.

I.3.2 Create Listening Channel


To create the Host Listening Channel:
1. Select Administration in the upper-right part of the browser window.
2. Scroll the tab list to the right and select the Listening Channel tab
3. Select Add Channel to Trading Partner:
 Name File_ListeningChannel
 Protocol Generic File-1.0
4. Transport Protocol Parameters tab

Section I-3 Integrating with Oracle B2B I-5


End-2-end-105-PO-Processing

 Poling Interval 5
 Folder Name: /home/oracle/orclsrvs_in
5. Channel Attributes Tab
 Enable Channel Radio button
 Internal Uncheck

6. Click Save

I.3.3 Create Agreement


Now create a new Agreement.
1. Select Partners at the top-right area of the browser window.
2. Select the Create New Agreement icon (plus sign) in the Agreement section at the lower-
left:

I-6 Integrating with Oracle B2B Section I.3


End-2-end-105-PO-Processing

3. Click the Select Partner link in the image at the top of the screen.
 Select Partner MarketInc
4. Click the Select Document Definition link in the image at the top of the screen.
 Select document Custom-1.0-PurchaseOrder-PurchaseOrder_def and click OK.
5. Enter Agreement Id: OS_MI_1000
6. Enter Name: OracleService_MarketInc_Agr
7. Click Save.
8. Click Validate. You will see the validation message below the agreement name on the
top left of the Agreement window. For example, look for: Agreement
OracleService_MarketInc_Agr is valid.
9. Click Deploy. See the Deployment Successful message appear in a pop-up window.

I.4 Create composite: B2Bprocessing


Now, create the composite that will use this agreement. When completed, it will look like this.

Section I-3 Integrating with Oracle B2B I-7


End-2-end-105-PO-Processing

1. In JDeveloper, create a new SOA application called B2Bprocssing with a project called
B2Bprocessing starting with an empty composite.

I.4.1 Create B2B Service: ReceivePO_B2B


1. Drag and drop a B2B Service to the left swim lane and enter the following values:
 Service Name: ReceivePO_B2B
 B2B Integration Type: Default
 Pick server connection (choose MyAppServerConnection) and click the Test B2B
button. Look for the B2B server connection successful !! message.
 Click Next.
 Operation: Receive and click Next.
 Document Definition Handling: Basic and click Next.
 Document Definition: Custom, select (walk tree): PurchaseOrder_def and click
Next.
 Click Finish to complete the wizard sequence. The ReceivePO_B2B exposed
service appears on the composite diagram.

I.4.2 Create Web Service: Send_PO


1. In the Enterprise Console, select Test for the POProcessing composite. Copy the endpoint
URL of the WSDL. We’ll use it for the next step. Note the service should be
receivePO.wsdl. For example:
http://opnpgbp8.us.oracle.co:7001/soa-infra/services/default/POProcessing/receivePO?WSDL

2. Back in JDeveloper, drag and drop a Web Service to the right swim lane to create a new
external reference. Name the service: Send_PO. Paste the copied WSDL URL from the
previous step into the WSDL URL field. Tab and the Port Type field will be filled-in
automatically.
3. Click OK to finish creating the new web service. The Send_PO external reference is
added to the composite diagram.

I.4.3 Create & Configure Mediator: Route_PO


1. Drag and drop a mediator component into the Components swim lane. Call it Route_PO.
Elect to Define Interface Later. Click OK.
2. Wire the mediator to the B2B service on the left and to the PO service on the right
3. Edit the Route_PO mediator and create a new mapper file containing a simple one-to-one
transformation to map the PurchaseOrder input to the PurchaseOrder output.
4. Save All.

I-8 Integrating with Oracle B2B Section I.4


End-2-end-105-PO-Processing

I.5 Testing the Process


1. Deploy the B2Bprocessing project.
2. Copy one of the sample input files supplied (files starting with MarketInc…) in the
~/SOA11gFoundationTutorial/SOA11gFoundationTutorial/po/input directory into your B2B
input directory (/home/oracle/orclsrvs_in). You may need to create the orclsrvs_in directory
first. As soon as the file lands in orclsrvs directory, it is picked up by the B2B application
and is deleted from this directory.

Section I-3 Integrating with Oracle B2B I-9


End-2-end-105-PO-Processing

3. Use the browser’s B2B Administration bookmark to go to the Oracle B2B console to view
the metrics using the Reports and Metrics links on the top right.

 Review Reports – click on message Details link (plus/minus icon at left of row) to see
details
o Click the Wire Message link: Review details and URL
o Click the Payload Storage link: Review detail and data
o Click the Application Message link: Review details, Application Name, Composite
Name / Version, Reference & Service
 Review Metrics – If you place the a market into into the /home/oracle/orclsrvs_in directory
three times, your metrics may look like this:

I-10 Integrating with Oracle B2B Section I.5


End-2-end-105-PO-Processing

Section I-3 Integrating with Oracle B2B I-11

S-ar putea să vă placă și