Skip Headers
Oracle® Application Server Integration B2B User's Guide
10g Release 2 (10.1.2)
B19370-03
  Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
Next
Next
 

7 Custom XML Document Tutorial

The OracleAS Integration B2B tutorials guide you through the steps to design, deploy, and verify B2B scenarios. After using this tutorial, you should be able to create and deploy your own custom document over ebXML messaging service (ebMS) transaction.

This chapter contains the following topics:

7.1 About the Custom XML Document Tutorial

This tutorial depicts a scenario in which Acme sends a custom XML document using the ebMS exchange protocol to GlobalChips.


Note:

For this tutorial, you set up OracleAS Integration B2B on servers at both Acme and GlobalChips "sites;" that is, on:
  • The Acme server, where Acme is the host trading partner and GlobalChips is the remote trading partner.

  • The GlobalChips server, where GlobalChips is the host trading partner and Acme is the remote trading partner.

With this setup, you can verify that the custom XML document is sent and received.

On both servers, Acme is the buyer and GlobalChips is the seller.


7.2 Before You Begin the Tutorial

Before you begin the tutorial, see the following sections:


Note:

The path name delimiter used in this documentation, /, is for UNIX. If you are using Windows, assume that the path name delimiter is \.

7.3 Tutorial: Setting Up a Custom Document over ebMS Transaction

In the following tasks, you set up the Acme server first and then the GlobalChips server. If you are working through this tutorial with a partner, one person can do the tasks on the Acme server while the other does the tasks on the GlobalChips server.

One person does the following tasks:

In parallel, the other person does the following tasks:

After each partner finishes tasks 1 through 4 on the respective server, work together to do task 5:


Note:

Fields and checkboxes that you should accept default values for, or leave blank, are omitted in the following steps, although they appear on the screen. This is done to simplify the instructions and move you through the tutorial more quickly.


Note about ebMS:

OracleAS Integration B2B maps INREPLYTO_MSG_ID (see Table 4-1, "IP_MESSAGE_TYPE Parameters") to the ebMS conversation_id parameter.

7.3.1 Acme Server, Task 1: Creating the Business Action

In the following set of tasks, Acme is the host trading partner. You create the following business actions for this transaction.

  • Process_ebMSRequest—Acme uses the Process_ebMSRequest business action to send an XML document to GlobalChips.

See "Creating a Business Action" for more information.

7.3.1.1 Creating the Process_ebMSRequest Business Action—Acme Sends an ebMS Document

  1. Click Partners, then Protocols.

  2. Click Custom Document over ebMS.

  3. From Shortcut, click Create Business Action.

  4. On the Create Business Action: General page, provide the following information and click Next.

    Field Value
    Name Process_ebMSRequest
    Revision 1.0
    Is Nonrepudiation of Receipt Required No
    Is Nonrepudiation of Origin Required No
    Acknowledgement Mode Async

  5. On the Create Business Action: Document Protocol Revision page, provide the following information and click Next.

    Field Value
    Name ebMS Document Protocol Revision
    Revision 1.0

  6. On the Create Business Action: Document Type page, provide the following information and click Next.

    General Field Value
    Name ebMS doc type
    Revision 1.0

    Document Definition Field Value
    Name ebMS doc def
    Definition ebMSOrder.xsd

    Document Type Parameters Field Override Value
    Service Acme Service
    Service Type Acme Service Type
    From Role Acme From Role
    To Role Acme To Role

  7. Review the data and click Finish, or make changes using Back.

    You should see Business Action Process_ebMSRequest : 1.0 successfully created at the top of the page.

7.3.2 Acme Server, Task 2: Setting Up the Trading Partners

On the Acme server, Acme is the host trading partner and GlobalChips is the remote trading partner.

This section contains these topics:

If you have not already done so, change the default host trading partner name from MyCompany to:

  • Acme, if you are working on the Acme server

  • GlobalChips, if you are working on the GlobalChips server

See the following for more information:

7.3.2.1 Setting Up the Remote Trading Partner (GlobalChips)

As you set up GlobalChips, you associate it with the Process_A01-Responder business actions.

  1. Click Partners.

  2. From Shortcuts, click Create Trading Partner.

  3. On the Create Trading Partner: General page, provide the remote trading partner name, GlobalChips, and click Next.

  4. On the Create Trading Partner: Identification page, for the ebMS Identifier value, enter GlobalChips and click Next.

  5. On the Create Trading Partner: Operational Capability page, provide the following information and click Next.

    General Field Value
    Business Protocol Custom Document over ebMS
    Business Action Process_ebMSRequest
    Is Initiator False
    Functional acknowledgement required? No
    Is acknowledgement handled by Integration B2B? Yes

  6. Continuing on the Create Trading Partner: Operational Capability page, provide the following information and click Next.

    Document Information Field Value
    Document Type ebMS doc type
    Use Existing Document Protocol Parameter Values Check the box.
    Use Default Document Definition Check the box.

  7. On the Create Trading Partner: Delivery Channel page, provide the following information and click Next.

    Field Value
    Name GlobalChips ebMS DC
    Acknowledgement Mode Async

  8. On the Create Trading Partner: Document Exchange page, provide the following information and click Next.

    Field Value
    Name GlobalChips ebMS DocEx
    Exchange Protocol Revision ebMS - 2.0

  9. On the Create Trading Partner: Transport page, provide the following information.

    General Field Value
    Name GlobalChips ebMS Transport

    Transport Protocol Field Value
    Transport Protocol HTTP - 1.1

    Transport Server Field Value
    Name GlobalChips Transport Server
    Host Name GlobalChips_hostname

    The transport server host exchanging messages at the GlobalChips site.

    Port port_number

    1. Click Create New, provide the following information, and click Next.

    Endpoint Field Value
    URI b2b/transportServlet

  10. Review the data and click Finish, or make changes using Back.

    You should see Trading Partner GlobalChips successfully created at the top of the page.

7.3.2.2 Setting Up the Host Trading Partner (Acme)

In the following steps, you set up the host trading partner's ebMS identifier and communication capabilities. The host is automatically assigned a business protocol and operational capabilities that are compatible with the remote trading partner.

  1. Click Partners, then Trading Partners.

  2. Click Acme (Host).

  3. Under Trading Partner Identifications, click Create.

  4. For Trading Partner Identification Type, select ebMS Identifier.

  5. For Value, enter Acme.

  6. Click Apply.

  7. Click Capabilities.

  8. Click Custom Document over ebMS.

  9. Click Create Communication Capability.

  10. On the Create Trading Partner: Delivery Channel page, provide the following information and click Next.

    Field Value
    Name Acme ebMS DC
    Acknowledgement Mode Async

  11. On the Create Trading Partner: Document Exchange page, click Create New.

    1. Provide the following information and click Next.

    Field Value
    Name Acme ebMS DocEx
    Exchange Protocol Revision ebMS - 2.0

  12. On the Create Trading Partner: Transport page, do the following and click Next.

    1. Select Create New and provide the following information:

      General Field Value
      Name Acme ebMS Transport

      Transport Protocol Field Value
      Transport Protocol HTTP - 1.1

    2. Select Create New and provide the following information:

      Transport Server Field Value
      Name Acme Transport Server
      Host Name Acme_hostname

      The transport server host exchanging messages at the Acme site.

      Port port_number

    3. Select Use Existing and provide the following information:

    Endpoint Field Value
    URI b2b/transportServer

  13. Review the data and click Finish, or make changes using Back.

    You should see Communication Capability created successfully at the top of the page.

7.3.3 Acme Server, Task 3: Creating the Trading Partner Agreement

As the host trading partner, Acme is automatically included in the trading partner agreement. So, in the following steps, select GlobalChips as the remote trading partner in the agreement. Acme is also automatically assigned a business action that is compatible with the one assigned to GlobalChips.


Note:

You cannot create a trading partner agreement between more than two trading partners.

  1. Click Partners.

  2. From Shortcuts, click Create Trading Partner Agreement.

  3. From Trading Partner, select GlobalChips.

  4. From Supported Business Protocol, select Custom Document over ebMS.

  5. From Supported Business Action, select Process_ebMSRequest - Responder.

  6. For Trading Partner Identification, select ebMS Identifier - hostname for both GlobalChips and Acme.

  7. For Trading Partner Delivery Channel, select GlobalChips ebMS DC and Acme ebMS DC.

  8. In the Name field, enter ebMS Agreement.

  9. In the Agreement ID field, enter agr1.

    The same value for Agreement ID must be used for both trading partners.

  10. Click Apply.

    You should see Agreement ebMS Agreement successfully created at the top of the page.

  11. Click Validate.

    You should see Agreement ebMS Agreement is valid. The agreement is approved as part of the validation.

See "Creating a Trading Partner Agreement" for more information.

7.3.4 Acme Server, Task 4: Creating and Deploying the Configuration

After you have created the trading partner agreement, you are ready to create the configuration. A configuration consists of the data you defined in the previous tasks in this tutorial. A configuration enforces validation rules, ensuring that only valid, complete, and consistent data is available for deployment in a production environment.

  1. Click Deployment.

  2. Click Create.

  3. For Configuration Name, enter ebMS Configuration.

  4. Select ebMS Agreement.

  5. Click Apply.

  6. For ebMS Configuration, click Deploy.

  7. Review the list of configurations and click Deploy.

    You should see Deployment finished successfully for configuration ebMS Configuration.

See Chapter 13, "Creating and Deploying a Configuration" for more information.

7.3.5 Task 5: Verifying the Purchase Order Transaction

See "Both Servers, Task 5: Verifying the Transaction" for instructions.

7.3.6 GlobalChips Server, Task 1: Creating the Business Action

In the following set of tasks, GlobalChips is the host trading partner. You create the following business action for this transaction.

  • Process_ebMSRequest—GlobalChips uses the Process_ebMSRequest business action to send an XML document to Acme.

See "Creating a Business Action" for more information.

7.3.6.1 Creating the Process_ebMSRequest Business Action—GlobalChips Sends an ebMS Document

  1. Click Partners, then Protocols.

  2. Click Custom Document over ebMS.

  3. From Shortcut, click Create Business Action.

  4. On the Create Business Action: General page, provide the following information and click Next.

    Field Value
    Name Process_ebMSRequest
    Revision 1.0
    Is Nonrepudiation of Receipt Required No
    Is Nonrepudiation of Origin Required No
    Acknowledgement Mode Async

  5. On the Create Business Action: Document Protocol Revision page, provide the following information and click Next.

    Field Value
    Name ebMS Document Protocol Revision
    Revision 1.0

  6. On the Create Business Action: Document Type page, provide the following information and click Next.

    General Field Value
    Name ebMS doc type
    Revision 1.0

    Document Definition Field Value
    Name ebMS doc def
    Definition ebMSOrder.xsd

    Document Type Parameters Field Override Value
    Identification Value POReq
    Identification Expression (XPath) for XML Document /Query/DocType/text()
    Service GlobalChips Service
    Service Type GlobalChips Service Type
    From Role GlobalChips From Role
    To Role GlobalChips To Role

  7. Review the data and click Finish, or make changes using Back.

    You should see Business Action Process_ebMSRequest : 1.0 successfully created at the top of the page.

7.3.7 GlobalChips Server, Task 2: Setting Up the Trading Partners

On the GlobalChips server, GlobalChips is the host trading partner and Acme is the remote trading partner.

This section contains these topics:

If you have not already done so, change the default host trading partner name from MyCompany to:

  • Acme, if you are working on the Acme server

  • GlobalChips, if you are working on the GlobalChips server

See the following for more information:

7.3.7.1 Setting Up the Remote Trading Partner (Acme)

As you set up Acme, you associate it with the following business actions:

  • Process_A01-Initiator. Acme is the initiator of the Process_A01 business action when it sends the admission notification to GlobalChips.

  • Process_ACK-Responder. Acme receives an acknowledgment from GlobalChips.

  1. Click Partners.

  2. From Shortcuts, click Create Trading Partner.

  3. On the Create Trading Partner: General page, provide the remote trading partner name, Acme, and click Next.

  4. On the Create Trading Partner: Identification page, for the ebMS Identifier value, enter Acme and click Next.

  5. On the Create Trading Partner: Operational Capability page, provide the following information and click Next.

    General Field Value
    Business Protocol Custom Document over ebMS
    Business Action Process_ebMSRequest
    Is Initiator False
    Functional acknowledgement required? No
    Is acknowledgement handled by Integration B2B? Yes

    Document Information Field Value
    Document Type ebMS doc type
    Use Existing Document Protocol Parameter Values Check the box.
    Use Default Document Definition Check the box.

  6. On the Create Trading Partner: Delivery Channel page, provide the following information and click Next.

    Field Value
    Name Acme ebMS DC
    Acknowledgement Mode Async

  7. On the Create Trading Partner: Document Exchange page, provide the following information and click Next.

    Field Value
    Name Acme ebMS DocEx
    Exchange Protocol Revision ebMS - 2.0

  8. On the Create Trading Partner: Transport page, provide the following information.

    General Field Value
    Name Acme ebMS Transport

    Transport Protocol Field Value
    Transport Protocol HTTP - 1.1

    Transport Server Field Value
    Name Acme Transport Server
    Host Name Acme_hostname

    The transport server host exchanging messages at the Acme site.

    Port port_number

    1. Click Create New, provide the following information, and click Next.

    Endpoint Field Value
    URI b2b/transportServlet

  9. Review the data and click Finish, or make changes using Back.

    You should see Trading Partner Acme created successfully at the top of the page.

7.3.7.2 Setting Up the Host Trading Partner (GlobalChips)

In the following steps, you set up the host trading partner's ebMS Identifier and communication capabilities. The host is automatically assigned a business protocol and operational capabilities that are compatible with the remote trading partner.

  1. Click Partners, then Trading Partners.

  2. Click GlobalChips (Host).

  3. Under Trading Partner Identifications, click Create.

  4. For Trading Partner Identification Type, select ebMS Identifier.

  5. For Value, enter GlobalChips.

  6. Click Apply.

  7. Click Capabilities.

  8. Click Custom Document over ebMS.

  9. Click Create Communication Capability.

  10. On the Create Trading Partner: Delivery Channel page, provide the following information and click Next.

    Field Value
    Name GlobalChips ebMS DC
    Acknowledgement Mode Async

  11. On the Create Trading Partner: Document Exchange page, click Create New.

    1. Provide the following information and click Next.

    Field Value
    Name GlobalChips ebMS DocEx
    Exchange Protocol Revision ebMS - 2.0

  12. On the Create Trading Partner: Transport page, do the following information and click Next.

    1. Select Create New and provide the following information:

      General Field Value
      Name GlobalChips ebMS Transport

      Transport Protocol Field Value
      Transport Protocol HTTP- 1.1

    2. Select Create New and provide the following information:

      Transport Server Field Value
      Name GlobalChips Transport Server
      Host Name GlobalChips_hostname

      The transport server host exchanging messages at the GlobalChips site.

      Port port_number

    3. Select Use Existing and provide the following information:

    Endpoint Field Value
    URI b2b/transportServlet

  13. Review the data and click Finish, or make changes using Back.

    You should see Communication Capability created successfully at the top of the page.

7.3.8 GlobalChips Server, Task 3: Creating the Trading Partner Agreement

As the host trading partner, GlobalChips is automatically included in the trading partner agreement. So, in the following steps, select Acme as the remote trading partner in the agreement. GlobalChips is also automatically assigned a business action that is compatible with the one assigned to Acme.

  1. Click Partners.

  2. From Shortcuts, click Create Trading Partner Agreement.

  3. From Trading Partner, select Acme.

  4. From Supported Business Protocol, select Custom Document over ebMS.

  5. From Supported Business Action, select Process_ebMSRequest-Responder.

  6. For Trading Partner Identification, select ebMS - trading_partner_name for both Acme and Globalchips.

  7. For Trading Partner Delivery Channel, select Acme ebMS DC and GlobalChips ebMS DC.

  8. In the Name field, enter ebMS Agreement.

  9. In the Agreement ID field, enter agr1.

    The Agreement ID value here must match the ID used in the sender's agreement.

  10. Click Apply.

    You should see Agreement ebMS Agreement successfully created at the top of the page.

  11. Click Validate.

    You should see Agreement ebMS Agreement is valid. The agreement is approved as part of the validation.

See "Creating a Trading Partner Agreement" for more information.

7.3.9 GlobalChips Server, Task 4: Creating and Deploying the Configuration

After you have created the trading partner agreement, you are ready to create the configuration. A configuration consists of the data you defined in the previous tasks in this tutorial. A configuration enforces validation rules, ensuring that only valid, complete, and consistent data is available for deployment in a production environment.

  1. Click Deployment.

  2. Click Create.

  3. For Configuration Name, enter ebMS Configuration.

  4. Select ebMS Agreement.

  5. Click Apply.

  6. For ebMS Configuration, click Deploy.

  7. Review the list of configurations and click Deploy.

    You should see Deployment finished successfully for configuration ebMS Configuration.

See Chapter 13, "Creating and Deploying a Configuration" for more information.

7.3.10 Both Servers, Task 5: Verifying the Transaction

Table 7-1 lists the files that you use to verify the transaction.

Table 7-1 Files Used in the Tutorial

File Name Description

ebMSOrder.xml

The payload that the buyer sends to the seller

ebMSOrder.xsd

Describes the payload

enq_ebMSOrder.properties

Parameter file with information needed to enqueue the payload to IP_OUT_QUEUE on the B2B server

enq_order.bat

enq_order.sh

Calls IPEnqueue and passes it the enq_ebMSOrder.properties file.

See Chapter 16, "Utilities for Enqueuing and Dequeuing" for more information about IPEnqueue.


The files are found at

Oracle_Home/ip/tutorial/protocolname

  1. On the Acme server, go the directory that contains the tutorial files and run enq_order.bat or enq_order.sh.

  2. Using the OracleAS Integration B2B user interface on the Acme server, run a Business Message Status Report to see if the message was sent.

    1. Click Reports.

    2. Click Business Message.

    3. Click Run Report.

    If the message was sent, you see two lines in the report, one for the order and one for the acknowledgment. The state field should say complete.

You can run the same report from the GlobalChips server.

7.4 Summary

This chapter provides a tutorial for creating a Custom Document over ebMS configuration. The tutorial guides you through the steps to design, deploy, and verify the configuration.