Skip navigation.

Tutorials for Trading Partner Integration

  Previous Next vertical dots separating previous/next from contents/index/pdf Contents Index View as PDF   Get Adobe Reader

Tutorial: Building ebXML Solutions

The ebXML language (Electronic Business using eXtensible Markup Language) is a business protocol that enables enterprises to conduct business over the Internet. WebLogic Workshop uses ebXML controls for initiator processes and ebXML Participant Business Processes templates for participant processes to build business processes systems which exchange ebXML business messages between trading partners. The ebXML control provides the initiator business process with predefined customizable methods for sending and receiving ebXML messages in a conversation. The ebXML Participant Business Process template provides a head start for building public participant business processes for ebXML conversations. Although the template is not required to build ebXML participant business processes, it includes the nodes and business process annotations needed to integrate easily with ebXML initiator business processes. The purpose of this tutorial is to demonstrate the different options available for ebXML trading partner management in WebLogic Workshop and WebLogic Integration.

 


Before You Begin

This topic describes tasks that you should perform before you begin using this tutorial. It contains the following sections:

Prerequisites

To use this tutorial, you must have:

Suggested Reading

To gain a detailed understanding of how ebXML solutions are implemented in WebLogic Integration, consider reading the following material:

To learn how to build business processes and create data transformations in WebLogic Workshop, consider completing the following tutorials:

 


Tutorial Overview

In this tutorial, the first couple of examples contains detailed instructions of how to use the WebLogic Workshop user interface and the WebLogic Integration Administration Console user interface to perform the steps outlined in the example. The preceding examples build on the skills you learn in the first couple of sections, but do not outline the steps in quite as much detail.

The tutorial is organized into these parts:

Step 1: Getting Started

This section describes how to create the business process application in which you will create the business processes and other components required for the examples of the tutorial. It also describes how to import the sample data and schemas which are included in the zipped archive of the tutorial files.

Step 2: Sending an XML Message through an One-Way ebXML Exchange

This example demonstrates how to send an XML message from one trading partner to another through a simple one-way ebXML exchange. In this example, you will learn how to create participant and initiator business processes as well as, how to create and configure ebXML and file controls. The section also contains a detailed description of how to deploy and test business processes using the WebLogic Workshop Test Browser.

Step 3: Selecting the Trading Partner Information Dynamically Through Typed XML

This example is similar to the preceding one except for that this example demonstrates how to specify the trading partner information dynamically by using an XQuery selector, rather than specifying it statically in the ebXML control. It also describes how to configure the ebXML control to use typed XML data and specific method names.

Step 4: Sending Raw Data (Binary File) Through an ebXML Exchange

In this example, you learn how to use ebXML to send binary data between two trading partners through a Message Broker channel.

Step 5: Creating a Roundtrip ebXML Conversation

This section describes how to implement an ebXML conversation in which when a request message (order) is received, a response (invoice) message is sent back by adding a Client Response node to the participant business process and using the ebXML control callback feature to send the response message.

Step 6: Implementing the Public/Private Pattern

This example illustrates how to use subprocesses to implement the public/private pattern. The public/private pattern can be used to keep the details of backend integration contained to a private process definition, while the public process definitions are dedicated to trading partner interaction.

Step 7: Using the TPM Control and Callbacks

In this section, you learn how to at run time obtain trading partner information from the TPM repository. You also learn how to use the onAck callback of the ebXML control.

Step 8: Setting Partner ID Dynamically Based on Directory Name

In this example, you investigate the already built application included with the tutorial files to learn how to read the name of a sub-directory and use that as the partner ID. The business process sets the partner ID dynamically using the setProperties method included in the ebXML control.

Step 9: Creating a Distributed Setup

This example briefly explains how to move to a distributed setup where one trading partner operates in one WebLogic Integration instance while the other trading partner operates in another instance. This is the setup that you would use in a production scenario where the two trading partners are running on two physically separated systems.

Step 10: Configuring Non-Default Protocol Settings

In this section you will learn how to add a service and a service profile in the WebLogic Integration Administration Console, which will give you control over trading partner communications.

Step 11: Exchanging Messages with WebLogic Integration - Business Connect

This example describes how to send messages between WebLogic Integration and WebLogic Integration - Business Connect. WebLogic Integration - Business Connect is a separate application which enables you to securely exchange large volumes of documents with your trading partners. You must have a current license of WebLogic Integration - Business Connect to be able to complete this example.

 


Step 1: Getting Started

Before you start the ebXML tutorial, you have to complete the procedures described in Setting Up the Tutorials. If you have not yet completed these procedures, please do so before proceeding with this section.

In this step, you use WebLogic Workshop to create application, in which you build the ebXML tutorial business processes. You then import the sample data and schemas provided in the zipped archive that came with the tutorial files (see, Step 3: Install the Tutorial Files). The sample data and schemas are used to illustrate the functionality of the ebXML tutorial examples. Lastly, you create two directories on your hard drive which are used throughout the tutorial to read files from and to write files to.

This section contains the following procedures:

Creating the Business Process Application

WebLogic Integration extends the WebLogic Workshop to allow the building of integrated enterprise applications. An application in turn contains projects and files. A project can contain several components including, business processes, Web services, and XML files. In this section, you will create the Business Process Application in which you will later build the ebXML tutorial processes and process components.

To Create a Business Process Application

  1. Start WebLogic Workshop:
  2. To Start WebLogic Workshop on Windows:

    1. Invoke WebLogic Workshop from the Start menu by choosing:
    2. Start—>Programs—>BEA WebLogic Platform 8.1—>WebLogic Workshop 8.1.

      If this is the first time WebLogic Workshop is started since it was installed, the samples project, which contains sample services installed with WebLogic Workshop, is displayed. Otherwise, the project which was opened last is displayed.

    To Start WebLogic Workshop on Linux:

    1. Using a file system browser or shell, locate the Workshop start script at:
    2. $HOME\bea\weblogic81\workshop\Workshop.sh

      Where HOME is your Workshop install directory.

    3. Start WebLogic Workshop using one of the following methods:
    4. -Use the following command from the command line:

       sh Workshop.sh

      -From a file system browser, double-click Workshop.sh.

  3. From the WebLogic Workshop menu, click File—>New—>Application. The New Application dialog box is displayed.

  4.  
  5. In the New Application dialog box, select Process in the left pane, and select Process Application in the right pane.
  6. In the Directory field, select the directory in which you want to create your application. The examples in this tutorial assumes that the application will be created in: C:\myapps\tptutorialapps. If you create the directory in a different location or use another name, adjust the instructions accordingly.
  7. In the Name field, enter ebXML.
  8. Click the arrow beside the Server field to display a list of servers. Then choose the server which you created when you set up your domain in Step 1: Create a New WebLogic Integration Domain.
  9. Click Create.
  10. Your Process Application is created and displayed in the Application pane. If the Application pane is not visible in WebLogic Workshop, choose View—>Application from the menu bar.

  11.  

    The Application pane displays a hierarchical representation of the files and resources available in your application. The components we will work with in this tutorial includes the following:

    ebXML—The application folder.

    ebXMLWeb—A Web application project folder. Every application contains one or more projects. Projects represent WebLogic Server Web applications. In other words, when you create a project, you are creating a Web application. (The name of your project is included in the URL your clients use to access your application.)

    Web Applications are J2EE deployment units that define a collection of Web resources such as business processes, Web services, JSPs, servlets, HTML pages, and can define references to external resources such as EJBs.

    Note: The Web application project folder is named by appending Web to the name you gave your application.

    Schemas—A Schemas project that contains the XML Schemas and the Message Broker channel file used in the application. It also contains ebXML envelope schemas that are used to package ebXML messages.

  12. Expand the ebXMLWeb folder.
  13. The processes folder inside the ebXMLWeb folder is created when you created your business process application. Since we do not need it for our tutorial, you can delete it:

  14. Right-click on the processes folder and select Delete from the drop-down menu.
  15. Click Yes in the confirmation dialogue.

You have now completed the first step in this tutorial and are ready to start creating the tutorial ebXML business processes. For more information about business process applications, see Guide to Building Business Processes available at: http://download.oracle.com/docs/cd/E13226_01/workshop/docs81/doc/en/integration/wfguide/wfguideIntro.html

Importing the Tutorial Sample Data

In this tutorial, we use sample data files to send in the ebXML messages. You can use your own XML data files if you wish, but some sample data files have been provided for you in the tptutorial.zip archive that you downloaded from the http://dev2dev.bea.com web site (see, Step 3: Install the Tutorial Files).

To Import the Sample Data Into Your Project Application

  1. In the Application pane, right click on ebxmlWeb.
  2. Select Import... from the drop-down menu.
  3. The Import File window opens.

  4. In the Import File window, navigate to [unzip location]\tptutorialapps\ebxml\ebxmlWeb\sampledata where [unzip location] is the directory to which you unzipped the files from the tptutorial.zip (see, Step 3: Install the Tutorial Files).
  5. Click Import.
  6. A folder named sampledata which contains the files sampleinvoice.xml and sampleorder.xml is added to your Application pane.

Note: Instead of the preceding steps, you could simply drag and drop the sampledata folder from any file browser directly into your Application pane in Weblogic Workshop.

Importing the Tutorial Schemas

In this tutorial, specific schemas are used for the XML data that is sent by the ebXML messages. This section describes how to import the schemas into your schemas folder in your ebXML application.

To Import the Tutorial Schemas

  1. In the Application tab, right-click on a Schemas folder. (If the Application tab is not visible in WebLogic Workshop, choose View—>Application from the menu bar.)
  2. From the drop-down menu, select Import....
  3. The Import Files dialog box is displayed.

  4. Navigate to: [unzip location]\tptutorialapps\ebxml\Schemas. Where [unzip location] is the directory to which you unzipped the files from the tptutorial.zip file (see,Step 3: Install the Tutorial Files).
  5. Select b2bborder.xsd and b2binvoice.xsd by clicking on the files while holding down the ctrl key.
  6. Click Import.

When a XSD or MFL file is imported, a build of the current Schemas project folder is triggered. (The build verifies that the schema file is well formed. For XSD files, it also verifies that the element and attribute names in the XML Schema do not conflict with the XSD files that have already been imported into the current Schemas project folder.) For more information about what gets generated when you import schemas, see Importing Schemas available at http://download.oracle.com/docs/cd/E13226_01/workshop/docs81/doc/en/integration/dtguide/dtguidemapperimportschemas.html.

Creating the Read and Write Directories

To demonstrate how messages can be exchanged by ebXML, several of the examples in this tutorial write out files to and read files from directories on your hard drive. Before you start working with any of the examples in this tutorial, create the following two directories on your hard drive:

Note: This is assuming that you created your application in Creating the Business Process Application on the C drive. If you created the application on another drive, please place the above directories at the root level of that drive.

 


Step 2: Sending an XML Message through an One-Way ebXML Exchange

In this example, you will learn how to send an XML message from one trading partner to another using ebXML. Imagine that one of the trading partners is accepting and processing orders. We refer to this partner as the seller and it is the participator of the ebXML conversation. The other trading partner, which we call the buyer, sends an XML order to the seller. The buyer is the initiator of the conversation. The seller accepts the message and simply writes it out to a file. This section contains the following procedures:

Building the Seller Business Process

The Seller business process is the participator of our ebXML conversation. When building ebXML participator processes, you can use the ebXML Participant Process file which comes pre-configured with the nodes, variables, and other components necessary for building participants processes. In this example, you add a File control to the business process which writes the test data out to a file located on your hard drive. This section includes the following tasks:

To Create the Seller Business Process File

  1. In the Application pane, right-click ebxmlWeb and select New—>Folder....
  2. The New Folder dialogue opens.

    Note: If the Application pane is not visible in WebLogic Workshop, choose View—>Application from menu bar.

  3. In the New Folder dialogue, enter ebxml as the name of your new folder.
  4. Click OK.
  5. A new folder named ebxml is added as a sub folder under ebxmlWeb in the Application pane.


     
  6. In the same way as described in the preceding steps, create another new folder as a sub folder under ebxml and name it oneway.
  7. Right-click on oneway and select New—>Process File in the drop-down menu.
  8. The New File window opens.


     
  9. In the New File window, select Processes from the left pane and ebXML Participant Process File from the right pane.
  10. In the File name field, enter Seller.jpd.
  11. Click Create.
  12. A new ebXML participant process file is created in your oneway folder in the Application pane and is displayed in Design View.


     


     

    The ebXML participant process file is created pre-configured with the nodes and business process annotations needed to integrate easily with ebXML initiator business processes. For more information about ebXML participant process files, see Building ebXML Participant Business Processes available at http://download.oracle.com/docs/cd/E13226_01/workshop/docs81/doc/en/integration/wfguide/wfguideEbXML.html.

  13. In this example, we will not respond to the buyer process, so we can delete the Respond to request node: right-click on the node and select Delete from the drop-down menu.

In this example, instead of responding to the buyer process, we add a File control which will write out the incoming ebXML messages to a file. This File control is then added to the business process as a Control Send with Return node.

To Create the File Control and the Control Node

  1. In the Controls section of the Data palette, select Add—>Integration Controls—>File.
  2. The Insert Control - File window opens.


     
  3. In the Insert Control - File window, enter the following:
    1. In the STEP 1, enter file as the name of the variable to use for the File control. This name must be a valid Java identifier.
    2. In STEP 2, select the Create a new File control to use option and enter File as the name of the new JCX file that will be created.
    3. In STEP 3, enter /tptutorial as the directory-name. This is the directory to which the message received by the Seller.jpd will be written. In this tutorial, we always use the tptutorial directory that you created in the Creating the Read and Write Directories section as the directory to read from and write to.
    4. In STEP 3, enter order.xml as the file mask This is the name of the file to which the message received by the Seller.jpd will be written.
    5. In STEP 3, select XmlObject as the type of data contained in the received message from the file-type drop-down menu.
  4. Click Create.
  5. The File control instance is added to your list of controls in the Data palette, and a JCX file corresponding to the File control is added to the Application palette. For more information about File controls, see File Control available at http://download.oracle.com/docs/cd/E13226_01/workshop/docs81/doc/en/integration/controls/controlsFile.html. For more information about JCX files, see JCX Files: Extending Controls available at http://download.oracle.com/docs/cd/E13226_01/workshop/docs81/doc/en/workshop/guide/devenv/conJwiFiles.html.

  6. In the Data palette, expand the File control by clicking on the + next to it.
  7. The methods associated with the File control are displayed.

  8. Select the FileControlPropertiesDocument write(XmlObject someData)method.
  9. Drag the selected method into Design View and drop it on the which appears immediately following the Receive request node.
  10. A new Control Send with Return node named write is added to your business process. For more information about Control Send with Return nodes, see Interacting With Resources Using Controls available at http://download.oracle.com/docs/cd/E13226_01/workshop/docs81/doc/en/integration/wfguide/wfguideControls.html.

The next step in our procedure is to configure the Control Node we just created with the correct variables and method assignments.

To Configure the Control Node

  1. Double-click the new write node.
  2. The write node builder is invoked.

  3. Click Send Data.
  4. From the Select variables to assign drop-down menu, select payload as the variable to assign to the write method.
  5. Click Apply to apply your selection.
  6. Click Close to close the node builder.
  7. Select File—>Save or enter Ctrl+S to save your work.

Your seller side ebXML process is now complete. The process is invoked when an XML message is received from the Buyer initiator process by the Receive request node, the Receive request node assigns the XML to a variable, and the write node writes the XML message to a file named order.xml via the File control.

Note: The grey check box icon is there because the receive data tab of the node has not been configured which marks the node as incomplete. However, since the example is not receiving any data, no more configuration is necessary for the business process to run properly.

To View the ebXML Source View Parameters

The ebXML binding information and service name of the business process is displayed in the Property Editor in Source View. To view these properties:

  1. Click the Source View tab.
  2. Click on public class Seller implements com.bea.jpd.ProcessDefinition to display the Property Editor for the Seller class.
  3. In the Property Editor, note the following:

For more information about Source View ebXML process annotations, see @jpd:ebxml Annotation available at http://download.oracle.com/docs/cd/E13226_01/workshop/docs81/doc/en/integration/javadoc-tag/jpd/ebxml.html.

We are now ready to test the Seller business process. WebLogic Workshop provides a browser-based interface through which you can test the functionality of your business process. Using this Test View interface, you play the role of the client, invoking the business process's methods and viewing the responses.

To Test the Seller Process

  1. If it is not already running, start WebLogic Server. to do so, choose Tools—>WebLogic Server—>Start WebLogic Server—>from the WebLogic Workshop menu.
  2. If WebLogic Server is running, the following indicator is visible in the status bar at the bottom of the WebLogic Workshop visual development environment:


     
  3. Click on the WebLogic Workshop menu.
  4. WebLogic Workshop builds your project. If there are no errors in the project, a Web browser is launched to display the Workshop Test Browser, through which you can test your business process using sample input values.

    Note: It may take a while before the Test Browser window is launched after the application has completed the built process.

  5. If not already displayed in the Test Browser window, click Test Form.
  6. To enter test data, do one of the following:
  7. Click request.
  8. The Test Form page refreshes to display a summary of your request parameters.

  9. Click Refresh to refresh the summary.
  10. Scroll down to the Operation request section to see the content of the sampleorder.xml file.
  11. Using a file browser or command line tool, navigate to your C:\tptutorial directory.
  12. It now contains a file named order.xml with identical content to that of sampleorder.xml. This file was written by the File control that you created and configured in the section To Create the Seller Business Process File.

  13. Return to WebLogic Workshop and click on the tool bar to stop and close the Test Browser.

For more information about the different options in the Test Browser and how to use it to test your business processes, see Running and Testing Your Business Process available at http://download.oracle.com/docs/cd/E13226_01/workshop/docs81/doc/en/integration/wfguide/wfguideTest.html.

Your Seller business process is now deployed and ready to accept ebXML messaged. By default the protocols specified in the default ebXML 2.0 binding will be used, so no additional configurations are required. In production scenarios however, you typically create a TPM service profile using the WebLogic Workshop Administration Console. For more information about creating service profiles, see Adding Service Profiles to a Service in Trading Partner Management (available at http://download.oracle.com/docs/cd/E13214_01/wli/docs81/manage/tpm.html) in Managing WebLogic Integration Solutions.

Building the Buyer Business Process

The Buyer business process is the initiator of our ebXML conversation. After creating the Buyer business process, we will use an ebXML control to communicate with the Seller participator business process. This section contains the following procedures:

To Create the Buyer Business Process File

  1. In the Application pane, right-click on oneway and select New—>Process File.
  2. The New File window opens.


     

    Since we are creating a initiator business process file this time and will use a ebXML file control to communicate with the participator process, we will create a default process file rather than an ebXML participant process file.

  3. In the New File window, select Processes from the left pane and Process File from the right pane.
  4. Enter Buyer.jpd in the File name field.
  5. Click Create.
  6. A new Buyer.jpd file is added to your Application pane and displayed in Design View.


     

    The Buyer.jpd file contains a Start node, a Starting Event place holder and a Finish node.

  7. Double-click on the Starting Event place holder.
  8. The Starting Event selection window is displayed.

  9. Select Invoked via a Client Request.
  10. Click OK.
  11. A Client Request node is added as the Starting Event to your business process.

We will now configure the Client Request node with the correct methods and variable types.

To Configure the Client Request Node

  1. Double-click the Client Request node.
  2. The Client Request node builder is invoked.

  3. In the General Settings tab:
    1. Change the method name from clientRequest to startBuyer.
    2. Click Add.
    3. If not already selected, select the XML option.
    4. Scroll down to the un-typed XML types.
    5. Select XmlObject.
    6. Click OK
    7. The XmlObject parameter type is added to the pane.

    8. Click Apply to specify the XMLObject type as the expected type of the startBuyer method.
  4. Click Receive Data.
  5. In the Receive Data tab:
    1. Select Create New Variable... from the Select Variables to Assign drop-down menu.
    2. The Create Variable window opens.

    3. Enter order as the variable name.
    4. Note that the type XmlObject is preselected for you since this is the type you specified on the General Settings tab.
    5. Click OK.
    6. The new order variable is added to the Select variables to assign drop-down list.

    7. Click Apply.
    8. Click Close.

    Your Client Request node is completed. To learn more about Client Request nodes, see Receiving Messages From Clients available at http://download.oracle.com/docs/cd/E13226_01/workshop/docs81/doc/en/integration/wfguide/wfguideClientsReceiveNode.html. To learn more about variables and data types, see Working with Data Types available at http://download.oracle.com/docs/cd/E13226_01/workshop/docs81/doc/en/integration/wfguide/wfguideDataTypesWorking.html.

It is now time to add the ebXML control which will be used to communicate with the Seller process. This control represents what would normally be the remote service we are trying to contact, although in this example, the service runs on the same machine as the Buyer process.

To Create the ebXML Control and Control Node

  1. In the Controls section of the Data palette, select Add—>Integration Controls—>ebXML.
  2. The Insert Control - ebXML window opens.


     
  3. In the Insert Control - ebXML window, enter the following:
    1. In the STEP 1, enter sellerControl as the name of the variable to use for the control. This name must be a valid Java identifier.
    2. In STEP 2, select the Create a new File control to use option and enter SellerControl as the name of the new JCX file that will be created.
    3. In STEP 3, enter Seller as the ebxml-service-name. This value must always match the value in the participant (in our case the Seller) business process. This service name corresponds to the eb:Service entry in the ebXML message envelope.
    4. In STEP 3, leave the from field blank. This will default to the 000000001 at runtime, the default trading partner.
    5. In STEP 3, enter 000000002 in the to field. This sets the participating trading partner id as a static value.
    6. In STEP 3, select XmlObject as the type of data contained in the received message from the message-arg-type drop-down menu.
  4. Click Create.
  5. The ebXML control instance is added to your list of controls in the Data palette, and a JCX file corresponding to the ebXML control is added to the Application palette. You can double-click on the JCX file to open it in Design View and review the values which you just entered. For more information about ebXML controls, see ebXML Control. available at http://download.oracle.com/docs/cd/E13226_01/workshop/docs81/doc/en/integration/controls/controlsebXML.html. For more information about JCX files, see JCX Files: Extending Controls available at http://download.oracle.com/docs/cd/E13226_01/workshop/docs81/doc/en/workshop/guide/devenv/conJwiFiles.html.

  6. In the Data palette, expand the ebXML control by clicking on the + next to it.
  7. The methods associated with the ebXML control are displayed.

  8. Select the void request(XmlObject payload)method. The name of the method on this control must match the method name of the Receive request node in the participant process.
  9. Drag the selected method into Design View and drop it on the which appears immediately following the Client Request node.
  10. A new Control Send node named request is added to your business process. For more information about Control Send nodes, see Interacting With Resources Using Controls available at http://download.oracle.com/docs/cd/E13226_01/workshop/docs81/doc/en/integration/wfguide/wfguideControls.html.

We will now configure the request node with the correct variable assignment.

To Configure the Request Node

  1. Double-click the new request node.
  2. The request node builder is invoked.

  3. Click Send Data.
  4. From the Select variables to assign drop-down menu, select order as the variable to assign to the request method.
  5. Click Apply to apply your selection.
  6. Click Close to close the node builder.
  7. Select File—>Save or enter Ctrl+S to save your work.

Your buyer side ebXML process is now complete. The process sends a message to the Seller business process which is then written to a file named order.xml via the File control in the Seller process.

To Test the Buyer Business Process

  1. Click on the WebLogic Workshop menu. (For more detailed instructions refer back to, To Test the Seller Process.)
  2. To enter test data, do one of the following:
  3. Confirm that the order.xml file was written out correctly to the C:\tptutorial directory by checking that the time stamp of the file is current.

This part of the tutorial is now complete. You have successfully sent an XML message over ebXML from one trading partner to another. The participant (Seller) process wrote the XML out to the file system.

 


Step 3: Selecting the Trading Partner Information Dynamically Through Typed XML

In this example we build on what you learned in the previous exercise, Step 2: Sending an XML Message through an One-Way ebXML Exchange. You will learn how to specify the trading partner information dynamically using an XQuery selector rather than specifying it statically in the ebXML control. Then you will customize the ebXML control in the initiator (buyer) process and the participant process file (Seller) to use typed XML and business specific method names.

This step contains the following procedures:

Building the SelectorSeller Business Process

In this procedure, you create an ebXML participant business process which will accept typed XML data instead of the XmlObject variable you used in the previous example's participant process. This section contains the following tasks:

To Create the SelectorSeller Business Process File

  1. Create a sub folder named selector under \ebxml\oneway in your Application tab. (For detailed instructions, refer back to To Create the Seller Business Process File.)
  2. Create a new ebXML Participant Process File named SelectorSeller.jpd.
  3. Your Application tab should look similar to the following.


     
  4. As in the previous example, remove the Respond to request node.

The next step involves configuring the Receive request node to accept XML data of a type that is specified in the Schemas which you imported into your application in Importing the Tutorial Schemas.

To Configure the Receive Request Node

  1. Double-click the Receive request node.
  2. The Receive request node builder is invoked.

  3. In the General Settings tab:
    1. Change the method name from request to processOrder.
    2. Select XmlObject payload.
    3. Click Remove
    4. Click Add.
    5. If not already selected, select the XML option.
    6. Expand the b2border.xsd by clicking on the + next to it.
    7. Select Order from the expanded list.
    8. Click OK
    9. The OrderDocument parameter type is added to the pane.

    10. Click Apply to specify the OrderDocument type as the expected type of the processOrder method.
  4. Click Receive Data.
  5. In the Receive Data tab:
    1. Select Create New Variable... from the Select Variables to Assign drop-down menu.
    2. The Create Variable window opens.

    3. Enter order as the variable name.
    4. Note: The type of the variable is already specified to be com.bea.tutorial.order.OrderDocument which is what you specified in the preceding steps.

    5. Click OK.
    6. The new order variable is added to the Select variables to assign drop-down list.

    7. Click Apply.
    8. Click Close.

    Your Client Request node is completed. To learn more about Client Request nodes, see Receiving Messages From Clients available at http://download.oracle.com/docs/cd/E13226_01/workshop/docs81/doc/en/integration/wfguide/wfguideClientsReceiveNode.html. To learn more about variables and data types, see Working with Data Types available at http://download.oracle.com/docs/cd/E13226_01/workshop/docs81/doc/en/integration/wfguide/wfguideDataTypesWorking.html.

    As in the previous example, you will add a file control to the business process file, which will write the order variable out to a file.

To Create the File Control and Control Node

Refer to the instructions in To Create the File Control and the Control Node to create a new File control. To save time, you can also drag and drop File.jcx from the \ebxml\oneway folder in the Application tab directly on to the Design View of the SelectorSeller. The control definitions you created earlier will be reused in a new instance for this business process.

To Configure the Control Node

  1. Double-click the new write node.
  2. The write node builder is invoked.

  3. Click Send Data.
  4. From the Select variables to assign drop-down menu, select order as the variable to assign to the write method.
  5. Click Apply to apply your selection.
  6. Click Close to close the node builder.
  7. Select File—>Save or enter Ctrl+S to save your work.

This concludes the creation of the SelectorSeller business process.

To Test the SelectorSeller Process

  1. Click on the WebLogic Workshop menu. (For more detailed instructions refer back to, To Test the Seller Process.)
  2. To enter test data, do one of the following:
  3. Confirm that the order.xml file was written out correctly to the C:\tptutorial directory by checking that the time stamp of the file is current

You are now ready to go on and create a SelectorBuyer initiator process.

Building the SelectorBuyer Business Process

For the initiator process in this example you use an XQuery selector to retrieve the trading partner ID dynamically rather than specifying it statically in the ebXML control as done in the previous example. This section contains the following tasks:

To Create the SelectorBuyer Business Process File

Create a business process file named SelectorBuyer.jpd in the selector folder by following the instructions in To Create the Buyer Business Process File.

To Configure the Client Request Node

  1. Double-click the Client Request node.
  2. The Client Request node builder is invoked.

  3. In the General Settings tab:
    1. Click Add.
    2. If not already selected, select the XML option.
    3. Expand the b2border.xsd by clicking on the + next to it.
    4. Select Order from the expanded list.
    5. Click OK
    6. The OrderDocument parameter type is added to the pane.

    7. Click Apply to specify the OrderDocument type as the expected type of the processOrder method.
  4. Click Receive Data.
  5. In the Receive Data tab:
    1. Select Create New Variable... from the Select Variables to Assign drop-down menu.
    2. The Create Variable window opens.

    3. Enter order as the variable name.
    4. Note: The type of the variable is already specified to be com.bea.tutorial.order.OrderDocument which is what you specified in the preceding steps.

    5. Click OK.
    6. The new order variable is added to the Select variables to assign drop-down list.

    7. Click Apply.
    8. Click Close.

    Your Client Request node is completed. To learn more about Client Request nodes, see Receiving Messages From Clients available at http://download.oracle.com/docs/cd/E13226_01/workshop/docs81/doc/en/integration/wfguide/wfguideClientsReceiveNode.html. To learn more about variables and data types, see Working with Data Types available at http://download.oracle.com/docs/cd/E13226_01/workshop/docs81/doc/en/integration/wfguide/wfguideDataTypesWorking.html.

In the next step you add a ebXML control and configure this control with an XQuery selector.

To Create the ebXML Control

  1. In the Controls section of the Data palette, select Add—>Integration Controls—>ebXML.
  2. The Insert Control - ebXML window opens.

  3. In the Insert Control - ebXML window, enter the following:
    1. In the STEP 1, enter selectorSellerControl as the name of the variable to use for the control. This name must be a valid Java identifier.
    2. In STEP 2, select the Create a new ebXML control to use option and enter SelectorSellerControl as the name of the new JCX file that will be created.
    3. In STEP 3, enter SelectorSeller as the ebxml-service-name. This value must always match the value in the participant (in our case the SelectorSeller) business process. This service name corresponds to the eb:Service entry in the ebXML message envelope.
    4. In STEP 3, leave the from field blank. This will default to the 000000001 at runtime, the default trading partner.
    5. In STEP 3, leave the to field blank. This will be determined at runtime by the XQuery selector which you will define in the next section.
    6. In STEP 3, select XmlObject as the type of data contained in the received message from the message-arg-type drop-down menu.
  4. Click Create.
  5. The ebXML control instance is added to your list of controls in the Data palette, and a JCX file corresponding to the ebXML control is added to the Application palette. You can double-click on the JCX file to open it in Design View and review the values which you just entered. For more information about ebXML controls, see ebXML Control available at http://download.oracle.com/docs/cd/E13226_01/workshop/docs81/doc/en/integration/controls/controlsebXML.html. For more information about JCX files, see JCX Files: Extending Controls available at http://download.oracle.com/docs/cd/E13226_01/workshop/docs81/doc/en/workshop/guide/devenv/conJwiFiles.html.

You will now modify the control definition file of the ebXML control. In the next section, you change the method name, change the message type, and add an XQuery selector.

To Modify the ebXML Control Definition File

  1. In the Data Palette, right-click on the ebXML selectorSellerControl.
  2. Select Edit from the drop-down menu.
  3. The SelectorSellerControl is displayed in Design View.

  4. Right-click on the arrow going to the request method, as illustrated in the following graphic.

  5.  
  6. Select Rename from the drop-down menu.
  7. Enter processOrder.
  8. Press the Enter key.
  9. The method name now matches the name of the method on the participant business process. This method name corresponds to the eb:Action element in the ebXML message envelope.

  10. Right-click on the arrow going away from the response method.
  11. Select Delete from the drop-down menu.
  12. You deleted the pre-configured response method since we are not sending a response in this example.

  13. Click on processOrder.
  14. The ebXML Source View opens.

  15. Change the line void processOrder(XmlObject payload); to void processOrder(OrderDocument payload);
  16. The tooltip editor displays a suggested package to import, press Alt+Enter to accept.
  17. This ebXML control is now set up to use XML typed according to the schema you imported in To Import the Tutorial Schemas rather than generic untyped XML.

  18. Click the Design View tab.
  19. Double-click the arrow which points to processOrder.
  20. The Property Editor window opens with a graphical representation of the Start Method Schema. In this example, we assume that the target trading partner ID is contained in the Supplier ID element.

  21. Click Supplier_ID to select it.
  22. A selector XQuery statement is generated.

  23. Click OK.
  24. Select File—>Save or enter Ctrl+S to save your work.
  25. Close the SelectorSellerControl.jcx by clicking the x in the top right corner of the window.

The ebXML control is now configured to pick out the trading partner ID from the message according to the specifications of the XQuery statement you generated in the selector. The next step is to add a processOrder Control Send node to the business process.

To Create the processOrder Control Send Node

  1. In the Data Palette, expand the selectorSellerControl by clicking on the + next to it.
  2. Select the void processOrder(OrderDocument payload) method. The name of the method on this control must match the method name of the Receive request node in the participant process.
  3. Drag the selected method into Design View and drop it on the which appears immediately following the Client Request node.
  4. A new Control Send node named processOrder is added to your business process. For more information about Control Send nodes, see Interacting With Resources Using Controls available at http://download.oracle.com/docs/cd/E13226_01/workshop/docs81/doc/en/integration/wfguide/wfguideControls.html.

  5. To specify the order variable as the input variable:
    1. In the Data Palette, select order from the list of XML variables.
    2. Drag and drop it onto the processOrder Control Send node.

This concludes the creation of the SelectorBuyer business process. In this section, you learned how to customize the participant and initiator processes to use typed XML and custom method names. You also learned how to use and XQuery selector to extract the target trading partner ID form the payload message rather than declaring it statically. The next section describes how to test your business processes.

To Test the SelectorBuyer Process

  1. Click on the WebLogic Workshop menu. (For more detailed instructions refer back to, To Test the Seller Process.)
  2. To enter test data, do one of the following:
  3. Confirm that the order.xml file was written out correctly to the C:\tptutorial directory by checking that the time stamp of the file is current.

 


Step 4: Sending Raw Data (Binary File) Through an ebXML Exchange

In this example, we will use ebXML to send binary data between two trading partners through a Message Broker channel. This example builds on the examples describes in previous sections. If at any time you need more information about how to complete a task that was previously explained, refer back to the preceding sections. This section contains the following procedures:

Building the BinarySeller Business Process

This example builds on what you have learned in the previous examples. If at any time you need more detailed instructions, refer back to Building the Seller Business Process. This section contains the following tasks:

To Create the BinarySeller Business Process

  1. Create a new folder in your application under \ebxml\oneway\binary.
  2. Create a new ebXML participant process in this folder named BinarySeller.jpd.
  3. Remove the Respond to request node.
  4. Modify the Receive request node as follows:
    1. Remove the XmlObject parameter data type.
    2. Add a RawData parameter data type (found in NonXML option).
    3. Create a new variable named data of type RawData.
    4. Specify the new variable as the one to assign to the request method.
  5. Create a new File control with the following values specified:
  6. Drag and drop the write method of the file control after the Receive request node in the business process.
  7. Double-click the write node and on the Send Data tab, specify data as the variable to assign to the write method.

To Test the BinarySeller Business Process

  1. Click on the WebLogic Workshop menu. (For more detailed instructions refer back to, To Test the Seller Process.)
  2. Use any binary file (for example an image file) as binary payload test data.
  3. Confirm that the data.bin file was written out correctly to the C:\tptutorial\binary-in directory by checking that the time stamp of the file is current.

Building the BinaryBuyer Business Process

For the initiator side of this example, the process will look very similar to those in previous examples, except that it will be invoked through a subscription to a file event which will cause the process to pick up a file from a directory. This section contains the following tasks:

To Create the BinaryBuyer Business Process File

Use the instructions outlined in detail in Building the Buyer Business Process to complete the following tasks:

  1. In the ebxml\oneway\binary folder, create a new business process named BinaryBuyer.jpd.
  2. Double-click the Starting Event and select the Subscribe to a Message Broker channel and start via an event (Timer, Email, File, Adapter, etc.) option.

Before you can start to configure the Message Broker Subscription node, you need to create a subscription channel file to which the subscription node can listen for events.

To Create the Channel File

  1. In the Application tab, right-click on the Schemas folder.
  2. Select New—>Channel File
  3. Enter tptutorial.channel as the file name.
  4. Click Create.
  5. The new channel file is created, added under the Schemas folder in the Application tab, and displayed on screen. An application build is also started automatically to build the Schemas project.

  6. In the channel file code, locate the following line:
    <channel name="SampleRawDataChannel" messageType="rawData"/>
  7. Remove the comment tags <!-- and --> preceding and following the line.
  8. Select—>File—>Save or enter Ctrl+S to save the channel file.
  9. The Schemas project builds again.

  10. Close the Channel file by clicking the x in the top right corner of the window.

The sample channels defined in the file are now available for selection in the subscription node. For more information about channels, see Publishing and Subscribing to Channels available at http://download.oracle.com/docs/cd/E13226_01/workshop/docs81/doc/en/integration/howdoI/howPubSub.html.

To Configure the Subscription Node

  1. Double-click the Subscription node.
  2. The Subscription node builder is invoked.

  3. On the General Settings tab, select the SampleRawDataChannel from the Channel name drop-down list.
  4. In the Receive Data tab:
    1. Create a variable named data of type RawData
    2. Select it to be the variable to assign to the subscription method.
  5. Click Apply.
  6. Click Close.

You have now completed the configuration of your subscription node. To learn more about subscription nodes, see Subscription Start (Asynchronous) available at http://download.oracle.com/docs/cd/E13226_01/workshop/docs81/doc/en/integration/wfguide/wfguideStartSub.html and Subscription Start (Synchronous) available at http://download.oracle.com/docs/cd/E13226_01/workshop/docs81/doc/en/integration/wfguide/wfguideStartSyncSub.html.

In the next section, you create a ebXML control to be used to communicate with the participator business process.

To Create the ebXML Control

  1. Use the instructions in To Create the ebXML Control and Control Node to create an ebXML with the following values:
  2. Click Create.
  3. From the Data Palette, drag and drop the void request(RawData payload) method on the target appearing in the business process below the Subscription node.
  4. From the Data Palette, drag and drop the data variable in the Non-XML list onto the request node.

The BinaryBuyer business process is now complete, run and test it to ensure that it is working properly.

To Test the BinaryBuyer Business Process

  1. Click on the WebLogic Workshop menu. (For more detailed instructions refer back to, To Test the Seller Process.)
  2. Use an image file as the binary payload test data.
  3. Confirm that the data.bin file was written out correctly to the C:\tptutorial\binary-in directory by checking that the time stamp of the file is current.

Note: Before you test your business process, make sure that you have completed the To Create the Channel File section. If you do not create a channel file before testing the process, you will encounter an error.

Creating a File Event Generator

In this section you create the file event which will invoke the BinayBuyer business process when a raw data type file is dropped in a directory.

To Create the File Event

  1. Create the following new directory on your hard drive:
  2. If not already running, start your WebLogic Server by selecting Tools—>WebLogic Server—>Start WebLogic Server.
  3. After the Server is running, open the WebLogic Administration Console by selecting Tools—>WebLogic Integration—>WebLogic Administration Console.
  4. Log in to the console using the server user name and password that you specified in the Step 1: Create a New WebLogic Integration Domain section.
  5. Click Event Generators.
  6. The Event Generators page opens.

  7. Click Create New.
  8. Enter TPTutorial as the Generator Name.
  9. Click Submit.
  10. The File Event Generator Definition page opens

  11. Click Define a New Channel Rule.
  12. The File Generator Channel Rule Definition page opens.

  13. Enter the following parameters:
  14. Click Submit.

You have completed creating the File Event. For more information about the WebLogic Administration Console and Event Generators, see Event Generators available at http://download.oracle.com/docs/cd/E13214_01/wli/docs81/manage/evntgen.html.

To Test the Sending Raw Data Example

  1. Click on the WebLogic Workshop menu to deploy and run the BinaryBuyer business process.
  2. Put a binary file in the binary-out directory you created earlier. In a few seconds it should disappear and a file named data.bin should appear in the binary-in directory.

Note: About Message Tracking: In this and previous examples, all messages sent via ebXML are tracked in the tracking database. In the WebLogic Administration Console, navigate to Trading Partner Management—>Message Tracking to look at the messages. Basic message information and payload information are both tracked. You can also navigate from the message to the process that created or consumed the message. For more information see, Trading Partner Management (available at http://download.oracle.com/docs/cd/E13214_01/wli/docs81/manage/tpm.html) in Managing WebLogic Integration Solutions.

 


Step 5: Creating a Roundtrip ebXML Conversation

This example illustrates how to implement an ebXML conversation in which a request message (order request) is followed by a response message (invoice). The first part of the conversation is identical to the one-way scenario you developed earlier. In this example, you add a Client Response node to the participant business process and use the ebXML control callback for the response message. This section contains the following procedures:

Building the RoundtripSeller Business Process

This example builds on the previous examples that you have completed. If at any time you need more detailed instructions, refer back to Building the Seller Business Process to complete the following sections:

To Create the Business Process File and Configure the Receive Request Node

  1. Create a new folder in your application named roundtrip as a sub folder of the ebxml folder.
  2. In the roundtrip folder, create a new ebXML participant process named RoundtripSeller.jpd, but do not delete the Respond to request node.
  3. Double-click the Receive request node and configure as follows:
    1. Rename the method to processOrder.
    2. Remove the XmlObject payload parameter type.
    3. Add the parameter type OrderDocument (from b2border.xsd)
    4. Create a new variable named order of type OrderDocument and select it as the variable to be assigned to the method.
    5. Click Apply, then click Close.

For illustration purposes, this example simplifies the order/invoice process.The seller will again write the incoming order out to file and for the response, the seller will read an invoice document from the file system. The invoice will be the same for each order. In production scenarios, the seller process could instead read the information from a database, obtain it from a message queue, or get it from a backend application as an event from an Application View control. The process could also delegate processing of the order to a subprocess, which is illustrated in the next example Step 6: Implementing the Public/Private Pattern. For more information about Application View controls, see Application View Control available at http://download.oracle.com/docs/cd/E13226_01/workshop/docs81/doc/en/integration/controls/controlsAppView.html.

To Create the File Controls and Configure the Control Nodes

  1. Add a new File control named file and configure it to write out order.xml to C:\tptutorial\
  2. Note: To save time, you can drag and drop the File.jcx in the oneway folder onto the RoundtripSeller.jpd Design View. This will create a new instance of the File.jcx.

  3. Drag and drop the write method to the target that appears below the Receive request node.
  4. Double-click on the write node.
  5. Configure the node to send the order variable to the write method.
  6. Create a new directory on your hard drive named C:\tptutorial\invoice.
  7. Copy the file C:\myapps\tptutorialapps\ebxml\ebxmlWeb\sampledata\sampleinvoice.xml to the C:\tptutorial\invoice directory
  8. Rename sampleinvoice.xml to invoice.xml.
  9. Create a second new File control named invoiceFile and configure it to read an XmlObject (invoice.xml) from the C:\tptutorial\invoice directory by using the following configurations:
  10. Drag and drop the read method to the target that appears below the write node.
  11. Double-click the read node.
  12. Click Receive Data.
  13. The method expects untyped XML (XmlObject) but our invoice.xml file contains typed XML so we will need to do a simple transformation between the two.

  14. Select the Transformation Option.
  15. Click Select Variable—>Create New Variable....
  16. The Create Variable window opens.

  17. Enter invoice as variable name.
  18. Expand b2binvoice.xml and select Invoice.
  19. Click OK.
  20. The Create Variable window closes and your new variable is listed in the variable pane of the node builder.

  21. Click Create Transformation.
  22. The Transformation Tool window opens.

  23. Drag and drop the XmlObjectDoc in the Source Schema pane to the Invoice root in the Target Schema pane.
  24. An XQuery transformation is created a corresponding transformation control is created and stored in the RoundtripSellerTransformation.dtf file, which was created in your Application pane when you opened the Transformation tool.

  25. Close the Transformation Tool window by clicking on the x in the top right corner of the window.
  26. Click Yes in the Save Before Closing dialogue window.
  27. Click Close in the node builder.

The transformation you created in the preceding steps, only transforms from one data type to another. In production scenarios, you would use the Transformation Tool to convert from the backend system format to the format expected by the trading partner. You can also use the Transformation Tool to manipulate data. For more information about the Transformation Tool, see Guide to Data Transformation available at http://download.oracle.com/docs/cd/E13226_01/workshop/docs81/doc/en/integration/dtguide/dtguideIntro.html.

The next step in this example is to configure the Respond to request node.

To Configure the Respond to Request Node

  1. Double-click the Respond to request node.
  2. Rename the method name to onInvoice.
  3. Remove the XmlObject payload parameter type.
  4. Add a parameter of type Invoice from the b2binvoice.xsd schema.
  5. Click Apply.
  6. Click Send Data.
  7. Select invoice from the Select variables to assign drop-down list.
  8. Click Apply.
  9. Click Close.

You have completed building the seller (participant) side of this example. The seller will receive an order document from the buyer, write it out to file, read in an invoice file and send it to the buyer. The name of the ebXML service created for this transaction is RoundtripSeller. The message exchange will be carried out as a single ebXML conversation. The Trading Partner Integration (TPI) system automatically manages the ebXML conversation and ensures that the same conversation ID is used within the same participant process instance.

To Deploy the RoundtripSeller Business Process

  1. Click on the WebLogic Workshop menu to deploy the business process.
  2. Close the Test Browser window.

Testing the process at this point would create an exception on the callback method since you have not yet created the initiator process. That is why you only deploy the process so that it will run properly when you test the initiator process later on.

Building the RoundtripBuyer Business Process

This section builds on the tasks that you have learned in previous examples. If at any time you need more detailed descriptions, refer back to Building the Buyer Business Process while completing the following tasks:

To Create the Business Process and Configure the Client Request Node

  1. In the roundtrip folder, create a new business process named RoundtripBuyer.jpd.
  2. Double-click the Starting Event.
  3. Select Invoked via a Client Request.
  4. Click OK.
  5. Double-click the Client Request node and configure as follows:
    1. Change the method name to startBuyer.
    2. Add a parameter type of type Order from the b2border.xsd schema
    3. On the Receive Data tab, create a new variable named order of type Order and specify it to be assigned to the method.
    4. Click Apply, then click Close.

To Create and Configure the ebXML Control

  1. Add a new ebXML control and configure it as follows:
  2. In the Data Palette, right-click on the ebXML control and select Edit.
  3. Right-click on the arrow pointing to request and select rename.
  4. Enter processOrder and press the enter key.
  5. In a similar fashion, rename response to onInvoice.
  6. Click processOrder.
  7. In processOrder, change XmlObject to OrderDocument.
  8. Press Alt+Enter to import the suggested package.
  9. In onInvoice, replace XmlObject with InvoiceDocument.
  10. Press Alt+Enter to import the suggested package.
  11. Save your work by selecting File—>Save or enter Ctrl+S
  12. Close the ebXML Source View by clicking the x in the top right corner of the window.

You have now completed the ebXML control configuration. In the next step, you create control nodes associated with the methods of your ebXML control.

To Create and Configure the ebXML Control Nodes

  1. In the Data Palette, expand the ebXML control.
  2. Drag and drop the processOrder method to the target that appears below the Client Request node.
  3. Drag and drop the order variable onto the processOrder node.
  4. Drag and drop the onInvoice callback to the target that appears below the processOrder node.
  5. Double-click the onInvoice node.
  6. Click Receive Data.
  7. Select Create New Variable... from the Select variables to assign drop-down list.
  8. Create a new variable named invoice of type Invoice.
  9. Click OK.
  10. In the node builder, click Apply.
  11. Click Close.

You have completed adding the ebXML controls. The next step is to add a Client Response node and configure it to return the contents of the invoice variable.

To Create and Configure the Client Response Node

  1. Drag and drop a Client Response node from the Palette to the target that appears below the onInvoice node.
  2. Double-click the Client Response node.
  3. Change the method name to onBuyerComplete.
  4. Add a parameter type of type Invoice (under b2binvoice.xsd).
  5. Click Send Data.
  6. Select the invoice variable from the Select variables to assign drop-down list.
  7. Click Apply.
  8. Click Close.

The buyer side of this example is almost complete, but you have not yet specified the ID of the trading partner. In the previous examples, you provided it as a static value in the ebXML control and also configured the control to pick the ID out at runtime from the payload. In this example, you specify the ID in a process XML variable using an XQuery selector.

To Specify the Trading Partner ID in an XML Variable

  1. In the Data Palette, click on roundtripSellerControl.
  2. In the Property Editor, locate the ebxml attribute section.
  3. In the previous examples, we specified the ebXML attributes in the control definition (the JCX file). The values of those attributes apply wherever the control is used. Here you specify the control instance attributes, which only apply to the instance of the control declared in this business process. For more information about control properties for control types and control instances, see Setting Control Properties available at http://download.oracle.com/docs/cd/E13226_01/workshop/docs81/doc/en/integration/wfguide/wfguideControlsProperties.html

  4. In the ebxml-service-name filed, enter RoundtripSeller.
  5. Note: This value has to be specified again although it exists in the controls definition JCX file. This is because any required fields in the configuration will not be inherited from the controls definition file but instead needs to be specified in each instance of the control.

  6. In the to-selector field, click on....
  7. The Property Editor window opens with a graphical representation of the schemas of the typed variables in the business process.

  8. Click on Supplier_ID in the order schema.
  9. An selector XQuery is generated in the Selected Element pane. Based on this XQuery, the trading partner ID will be determined at runtime.

  10. Click OK.

The buyer side is now complete. You can run and test your processes using the WebLogic Test Browser.

To Test the Business Processes

  1. Click on the WebLogic Workshop menu. (For more detailed instructions refer back to, To Test the Seller Process.)
  2. To enter test data, cut and paste the content of C:\myapps\tptutorialapps\ebXML\ebXMLWeb\sampledata\sampleorder.xml into the xml variable (payload) field.
  3. Confirm that the Supplier_ID field in the test data has the correct trading partner ID (000000002).
  4. Click the Refresh link to see the callback method.
  5. Confirm that the order.xml file was written out correctly to the C:\tptutorial directory by checking that the time stamp of the file is current.

 


Step 6: Implementing the Public/Private Pattern

This example illustrates how to use subprocesses to implement the public/private pattern. You can use this pattern to keep the details of backend integration confined to a private process definition and keep the public process definitions dedicated to trading partner interaction. This example contains the following procedures:

Building the PublicBuyer Business Process

In this example we reuse some of the files that you have created in the previous examples.

  1. Create a new folder under the ebxml folder in the Application pane named publicprivate.
  2. Click on the RoundtripBuyer.jpd in the roundtrip folder and drag it to the publicprivate folder while holding down your Ctrl key.
  3. Release your mouse button.
  4. A copy of the RoundtripBuyer.jpd file is created in the publicprivate folder.

    Note: Whenever you duplicate a business process file, the new copy still reference the same (old) controls, even if you duplicate folders which include control files.

  5. Right-click on the new business process and select rename.
  6. Note: You may have to stop the WebLogic Server before you can rename the business process. To do so, select Tools—>WebLogic ServerStop—>WebLogic Server.

  7. Enter PublicBuyer.jpd.
  8. Right-click on PublicBuyer.jpd and select Generate Process Control.
  9. A new JCX control definition file is created in your publicprivate folder. This control can be used in other processes to invoke the PublicBuyer.jpd business process. You use this control in the PrivateBuyer business process to invoke the PublicBuyer process.

Building the PrivateBuyer Business Process

This section builds on the tasks you learned in previous examples. If at any time you need more detailed information, refer back to Building the Buyer Business Process while completing the following tasks:

  1. Create a new business process in the publicprivate folder named PrivateBuyer.jpd.
  2. Configure the process to be invoked by a Client Request node.
  3. Configure the Client Request node according to the following:
  4. Add a Client Response node.
  5. Configure the Client Response node according to the following:
  6. Drag and drop the PublicBuyerControl.jcx from the Application palette onto the Design View.
  7. An instance of the publicBuyerControl is added to your Controls list in the Data Palette.

  8. Expand the new process control.
  9. Drag and drop the startBuyer method onto the target that appears after the Client Request node.
  10. Drag and drop the order variable onto the startBuyer node.
  11. Drag and drop the onBuyerComplete method onto the target that appears after the startBuyer node.
  12. Drag and drop the invoice variable onto the onBuyerComplete node.
  13. Save your work.

The buyer side business processes are now complete.

Building the PrivateSeller Business Process

If at any time you need detailed instructions while completing the tasks in the section, refer back to Building the Seller Business Process.

  1. In the publicprivate folder, create a new business process named PrivateSeller.jpd.
  2. Configure it to be invoked by a Client Request node.
  3. Configure the Client Request node as follows:
  4. Add a Client Response node to the business process, following the Client Request node.
  5. Configure the Client Response node as follows:
  6. There are several options for processing a private process. For example, you may choose to send the order to an ERP system (most likely having transformed it first) via an Application View control, and then subscribe to an event from the backend system with invoice information. Since this example is for illustration purposes only, you use a simple file control to read and write the data from and to the file directory system.

  7. Drag and drop File.jcx from the oneway folder in the Application pane onto the Design View.
  8. Drag and drop the write method onto the target that appears below the Client Request node.
  9. Configure the node to send the order variable to the write method.
  10. Drag and drop InvoiceFile.jcx from the roundtrip folder in the Application pane to the Design View.
  11. Drag and drop the read method to the target that appears below the write node.
  12. Double-click the read node.
  13. Click Receive Data.
  14. The method expects untyped XML (XmlObject) but our invoice.xml file contains typed XML so we will need to do a simple transformation between the two.

  15. Select the Transformation Option.
  16. Click Select Variable and select invoice from the drop-down menu.
  17. Click Create Transformation.
  18. The Transformation Tool window opens.

  19. Drag and drop the XmlObjectDoc in the Source Schema pane to the Invoice root in the Target Schema pane.
  20. An XQuery transformation is created a corresponding transformation control is created and stored in the PrivateSellerTransformation.dtf file, which was created in your Application pane when you opened the Transformation tool.

  21. Close the Transformation Tool window by clicking on the x in the top right corner of the window.
  22. Click Yes in the Save Before Closing dialogue window.
  23. Click Close in the node builder.
  24. Save your work.
  25. Right-click on PrivateSeller.jpd and select Generate Process Control.

You have completed building the PrivateSeller business process. In the next section, you will create the public process for the seller side of the conversation.

Building the PublicSeller Business Process

To create the PublicSeller business process, you re-use some of the files that you created in the previous example. You can refer back to the detailed instruction in Building the Seller Business Process to complete the tasks in this section.

  1. Drop and drag the RoundtripSeller.jpd file from the roundtrip folder to the publicprivate folder while holding down your ctrl key.
  2. Right-click on the new process file and select rename.
  3. Enter PublicSeller.jpd.
  4. Double-click on PublicSeller.jpd.
  5. Click the Source View tab.
  6. In the Property Editor, change the ebxml-service-name to PublicSeller.
  7. Click Design View.
  8. Delete the write node.
  9. Delete the read node
  10. In the Data Palette Controls section, delete all three control instances (file, invoiceFile, and transformations).
  11. Drag and drop the PrivateSellerControl.jcx file from the Application pane onto Design View.
  12. Expand the privateSellerControl in the Data Palette.
  13. Drag and drop the privateProcessOrder method onto the target that appears just below the Receive request node.
  14. Drag and drop the order variable onto the privateProcessOrder node.
  15. Drag and drop the onPrivateInvoice method onto the target that appears just below the privateProcessOrder node.
  16. Drag and drop the invoice variable onto the onPrivateInvoice node.

You have completed the seller side of the conversation. The public process receives a message via ebXML and passes it on to the private process. When the private process responds, it calls back to the public process, which returns the invoice information via ebXML to the initiating trading partner.

You need to do one final adjustment before running and testing this example:

  1. Double-click on PublicBuyer.jpd.
  2. In the Data Palette, select the roundtripSellerControl.
  3. In the Property Editor, change the ebxml-service-name to PublicSeller to match the participant side.

Testing the Public/Private Pattern Example

  1. Open PublicSeller.jpd.
  2. Click on the WebLogic Workshop menu. (For more detailed instructions refer back to, To Test the Seller Process.)
  3. Switch back to WebLogic Workshop and open PrivateBuyer.jpd.
  4. Click on the WebLogic Workshop menu.
  5. To enter test data, do one of the following:
  6. Refresh the browser after a few seconds. The log entry for callback.onPrivateBuyerComplete will have the content of the response with the Invoice document.
  7. Confirm that the order.xml file was written out correctly to the C:\tptutorial directory by checking that the time stamp of the file is current.

 


Step 7: Using the TPM Control and Callbacks

This example illustrates how to obtain trading partner information from the Trading Partner Management (TPM) repository at runtime by using the TPM control. It will also show you how to use the onAck callback of the ebXML control. In the example you send an ebXML message and wait for the ebXML acknowledgement. If the acknowledgement times out, for example, because the remote partner is offline, and the TPM protocol binding for both local and remote trading partners have "once and only once" or "at least once" delivery schematics, an email alert is sent to that remote trading partner. You obtain the email address by querying the TPM database using a TPM control.

This example contains the following sections:

Building the BuyerAlert Business Process

Use the skills you have learned in previous sections to complete the following tasks:

To Create the BuyerAlert Business Process

  1. Create a new folder named tpm off the root (ebxmlWeb) of your project.
  2. Add a new process file named BuyerAlert.jpd.
  3. Configure the business process to be invoked by a Client Request node.
  4. Configure the Client Request node as follows:
  5. Add an ebXML control and configure it as follows:
  6. From the Data Palette, drag and drop the request method of the sellerControl onto the target that appear below the Client Request node.
  7. Drag and drop the payload variable onto the request node.
  8. Drag and drop the onAck callback onto the target that appears below the request node.
  9. This callback will occur when the ebXML message sent in the previous step is acknowledged. In case the acknowledgement does not arrive, you add logic in the next steps that alerts the trading partner.

  10. Right-click on the onAck node.
  11. Select Add Timeout Path from the drop-down menu.
  12. In the Property Editor for the timer, provide a duration value of 10 seconds by typing 10s.

To Create and Add the TPM Control to the Process

  1. Create a new TPM control by selecting Add—>Integration Controls—>TPM in the Controls section of the Data Palette.
  2. Enter tpm as the variable name.
  3. Click Create.
  4. For more information about the TPM control, see TPM Control available at http://download.oracle.com/docs/cd/E13226_01/workshop/docs81/doc/en/integration/controls/controlsTPM.html

  5. Expand the new TPM control.
  6. Drag and drop the TradingPartnerDocument getBasicProperties(String partnerId) onto the target that appears in the timeout path below the timer.
  7. Double-click the getBasicProperties node.
  8. Click Send Data.
  9. Select partnerId from the Select variables to assign drop-down list.
  10. Click Receive Data.
  11. Create a new variable named basicPartnerInfo of type TradingPartnerDocument and specify it to be assigned to the method.
  12. Click Apply.
  13. Click Close.

To Create and Add an Email Control to the Business Process

  1. Create a new Email control by selecting Add—>Integration Controls—>Email in the Controls section of the Data Palette.
  2. Configure the Email control as follows:
  3. For more information about the Email control, see Email Control available at http://download.oracle.com/docs/cd/E13226_01/workshop/docs81/doc/en/integration/controls/controlsEmail.html.

  4. Expand the new Email control.
  5. Drag and drop the sendEmail method onto the target that appears after the getBasicProperties node in the timeout path.
  6. Double-click the sendEmail node.
  7. Click on Send Data.
  8. Select the Transformation option.
  9. Click Select Variable and select basicPartnerInfo.
  10. Click Create Transformation.
  11. Drop and drag the email leaf from the Source Schema onto the arg1 (corresponds to the email `To' filed) leaf in the Target Schema.
  12. Right-Click on arg4 (corresponds to the email `Subject' field).
  13. Select Create Constant.
  14. Enter Problem Sending Order.
  15. Click OK.
  16. Right-Click on arg5 (corresponds to the email body).
  17. Select Create Constant.
  18. Enter We encountered a problem while sending you an order.
  19. Click OK.
  20. Close the Transformation Tool by clicking the x in the top right corner.
  21. Click Yes in the Save Before Closing? dialogue.
  22. Click Close in the node builder.

The last step in this example is to specify the ID of the target trading partner in our ebXML control. In this example, you use the setProperties method of the control to accomplish this.

To Specify the Target Trading Partner ID

  1. Select the setProperties method under the ebXML control in the Data Palette.
  2. Drop and drag the method onto the target that appear between the Client Request node and the request node.
  3. Double-click on the setProperties node.
  4. Click Send Data.
  5. Select the Transformation option.
  6. Select partnerId as the variable.
  7. Click on Create Transformation.
  8. Drag the string variable from the Source Schema pane to the `to' element in the Target Schema pane.
  9. Close and Save your transformation.
  10. Close the node builder

Before you can test the example, you need to specify the email address in the trading partner profile.

To Specify the Email Address for the Trading Partner Profile

  1. If not already running, start your WebLogic Server by selecting Tools—>WebLogic Server—>Start WebLogic Server.
  2. After the Server is running, open the WebLogic Administration Console by selecting Tools—>WebLogic Integration—>WebLogic Administration Console.
  3. Log into the console using your server user name and password you specified in the Step 1: Create a New WebLogic Integration Domain section.
  4. Click Trading Partner Managment.
  5. Click Profile Management.
  6. Click Test_TradingPartner_2.
  7. Click Edit profile.
  8. In the Email field, enter you email. This is where the alert messages will be deliver.
  9. Click Submit.
  10. Close the console.

Testing the BuyerAlert Business Process

  1. Click on the WebLogic Workshop menu to test the BuyerAlert business process.
  2. Specify any XML data as the payload.
  3. Enter 000000002 for the string parameter.
  4. After the process completes, check your email for the alert message.
  5. These emails where sent since an error occurred and triggered the email control to send an email to the address you specified when you set up the control.

 


Step 8: Setting Partner ID Dynamically Based on Directory Name

In this example you look at the already built application which was distributed with the zipped archive that contained this tutorial (see, Step 3: Install the Tutorial Files). This example demonstrates how to use the name of a sub-directory on your hard drive as the partner ID and set it dynamically using the setProperties method in the ebXML control. This example contains the following sections:

Reviewing the Initiator Side of the Example

In this example you begin with looking at the initiator side of the application. Use the skills you learned in previous sections to complete the following tasks:

To Set Up the Initiator Side of the Example

  1. Create the following two directories on your hard drive:
  2. Open up your file browser and navigate to
  3. Select File—>Open—>Application.
  4. Locate the advanced folder in the [unzip location]\tptutorialapps\ebxml\ebxmlWeb\ebxml\oneway\binary directory where [unzip location] is the location where you unzipped the tutorial archive in Step 3: Install the Tutorial Files.
  5. Drag and drop the advanced folder from the file browser onto the binary folder in your Application tab.
  6. WebLogic Workshop will update your class and package names.

  7. In the Application pane, navigate to and expand the ebxml\ebxmlWeb\ebxml\oneway\binary\advanced folder.
  8. Double-click on DynamicBinaryBuyer.jpd
  9. DynamicBinaryBuyer.jpd opens in Design View.

To Review the Configuration of the DynamicBinaryBuyer Process

  1. This application uses the name of a sub directory as the partner ID and sets it dynamically using the setProperties method in the ebXML control. You can double-click on any of the nodes to note the following:
  2. In the Application pane, double-click on the ebxml\Schemas\tptutorial.channel file.
  3. The channel file opens in Source View.

  4. Add the following line to your channel file:

The next step in the process is to add a new rule in the File Even Generator in the WebLogic Integration Administration Console to listen to the correct folder on your hard drive.

To Add a New Rule in the File Event Generator

  1. If not already running, start your WebLogic Server by selecting Tools—>WebLogic Server—>Start WebLogic Server.
  2. After the Server is running, open the WebLogic Administration Console by selecting Tools—>WebLogic Integration—>WebLogic Administration Console.
  3. Log into the console using your server user name and password you specified in the Step 1: Create a New WebLogic Integration Domain section.
  4. Click Event Generators.
  5. Click TPTutorial in the Name column.
  6. Click Define a New Channel Rule.
  7. Enter the following parameters:
  8. Click Submit.
  9. Close the WebLogic Integration Administration Console.

You are now ready to build and test the application.

To Test the DynamicBinaryBuyer Process

  1. Click on the WebLogic Workshop menu to build and deploy the DynamicBinaryBuyer.jpd business process.
  2. Place a binary file in the C:\tptutorial\binary-out\dynanmic\000000002 directory.
  3. The file disappears is delivered to the trading partner.

You have completed the steps for the initiator side of this example.

Reviewing the Participant Side of the Example

The next step involves reviewing the participant side. Use what you have learned in previous examples to complete the following tasks:

To Review the Participant Side of the Example

  1. Double-click on DynamicBinarySeller.jpd
  2. The DynamicBinarySeller.jpd opens in Design View.

  3. Double-click on the Receive request node and note that there are two parameter types; one for the payload and the other for the ebXML envelope.
  4. Close the node builder.
  5. Right-Click on the Receive request node and select View Code.
  6. Select the request method and look at the Property Editor parameter entered for the ebxml-method envelope. The {env} parameter indicates that the ebXML envelope will be placed in the second parameter, env.
  7. Click the Design View tab.
  8. In the Data Palette, select the baseDirectory variable. In the Property Editor, note that the value of the variable is "/tptutorial/binary-in/dynamic/". This is the base directory from which the application will read the sub-directory name and use it as the trading partner ID.
  9. The remaining two nodes:

To Test the Example

  1. Click on the WebLogic Workshop menu to run and deploy the process.
  2. Drop a file into the C:\tptutorial\binary-out\dynamic\000000002 directory and watch it appear in a few moments in the C:\tptutorial\binary-in\dynamic\000000001 directory.

 


Step 9: Creating a Distributed Setup

In all of the examples so far, the initiator (000000001) and the participant (000000002) are both located in the same WebLogic Integration instance and are using the same database repository. In practice, the two sides will operate on two physically separated systems. This examples briefly describes how to move to a distributed setup where 000000001 operates in one WebLogic Integration instance and the 000000002 in another.

  1. Install and configure a second WebLogic instance on another machine.
    1. Complete the procedure described in Step 1: Create a New WebLogic Integration Domain.
  2. In the WebLogic Integration Administration Console navigate to the Trading Partner Management—>Profile Management, for the first WebLogic Integration Server, modify the Test_Trading Partner_2 (000000002) trading partner information as follows:
    1. Change Test_TradingPartner_2(000000002) to remote instead of local.
    2. Modify the ebXML 2.0 binding by changing the EndPoint URL to include the correct server/port of the second WebLogic Integration server. The examples use ebXML 2.0 binding by default, modify this to other bindings if you use them.
  3. For the second WebLogic Integration server modify the Test_TradingPartner_1 (000000001) as follows:
    1. Deselect the default option.
    2. Change local to remote.
    3. Modify the ebXML 2.0 binding by changing the EndPoint URL to include the correct server/port of the first WebLogic Integration server.
  4. On each of the servers, start WEbLogic Workshop and open the tutorial application.
  5. Navigate to Tools—>Application Properties—>WebLogic Server and ensure that the Server Home Directory field is set to the correct path.
  6. Before testing any of the examples: use the WebLogic Test Browser to run the participant side processes to force them to build and deploy.

 


Step 10: Configuring Non-Default Protocol Settings

In the previous examples, default values were used for the initiator trading partner and the protocol information. The default values were used as follows:

In production scenarios, you will typically add a service and service profile entry which gives you control over the trading partner communication. This example illustrates how to add a service and a service profile by using the Seller and Buyer business processes which you created in Step 2: Sending an XML Message through an One-Way ebXML Exchange. It contains the following sections:

Configuring the Participant Side

The Seller business process is the participant of the ebXML communication.

  1. If not already running, start your WebLogic Server by selecting Tools—>WebLogic Server—>Start WebLogic Server.
  2. After the Server is running, open the WebLogic Administration Console by selecting Tools—>WebLogic Integration—>WebLogic Administration Console.
  3. Log in to the console using the server user name and password that you specified in the Step 1: Create a New WebLogic Integration Domain section.
  4. Click Trading Partner Management.
  5. Click Service Management.
  6. In the Services panel, click View All.
  7. A list of all participant processes which are currently deployed on your server is displayed.

  8. Click on ebxmlWeb\ebxml\oneway\Seller.jpd
  9. The View And Edit Service Details window opens.

  10. Click Add Service Profile.
  11. The Add Service Profile window opens.

  12. In the Name row, select Test_TradingPartner_2 as the LOCAL trading partner. This is the partner actually hosting the Seller service.
  13. In the Name row, select Test_TradingPartner_1 as the REMOTE trading partner. This is the partner who will use the service.
  14. Select ebXML 2.0 bindings for both the LOCAL and REMOTE binding.
  15. Click Submit.

Configuring the Initiator Side

For the initiator side, service configuration information is added to the ebXML control that represents the remote service.

  1. Go back to the Service Management page by clicking on Service Management in the navigation tool bar.
  2. In the Services pane, click Create New.
  3. Next to the name filed, click Browse.
  4. A list of currently deployed participant business processes on your server and controls which are referenced from currently deployed processes is displayed.

  5. Click on ebxml.oneway.SellerControl.
  6. Click Add Service.
  7. Click Add Service Profile.
  8. In the Name row, select Test_TradingPartner_1 as the LOCAL trading partner. This is the initiator partner on the local system.
  9. In the Name row, select Test_TradingPartner_2 as the REMOTE trading partner. This is the remote partner who hosts the actual service.
  10. Select ebXML 2.0 bindings for both the LOCAL and REMOTE binding.
  11. Click Submit.

You have now completed setting up the protocol settings. For each of the examples in this tutorial, you can create a corresponding service entry for each participant and initiator side. There is no limit to how many service profiles you enter, you can create as many as you need for each service entry to reference different protocol bindings.

 


Step 11: Exchanging Messages with WebLogic Integration - Business Connect

WebLogic Integration - Business Connect is a separate application which enables you to securely exchange large volumes of documents with your trading partners. The application packages documents in secure envelopes that are transmitted among trading partners according to schedules.

Note: You must have WebLogic Integration - Business Connect installed to complete this example.

To learn more about WebLogic Integration - Business Connect, see the Using WebLogic Integration - Business Connect, available at http://download.oracle.com/docs/cd/E13215_01/wlibc/docs81/admin/index.html.

This example contains the following sections:

Configuring WebLogic Integration - Business Connect with Trading Partner Information.

To avoid typing the trading partner information by hand, you can export it directly from WebLogic Integration and then import it into WebLogic Integration - Business Connect.

To Export the Trading Partner Information

  1. If not already running, start your WebLogic Server by selecting Tools—>WebLogic Server—>Start WebLogic Server.
  2. After the Server is running, open the WebLogic Administration Console by selecting Tools—>WebLogic Integration—>WebLogic Administration Console.
  3. Log in to the console using the server user name and password that you specified in the Step 1: Create a New WebLogic Integration Domain section.
  4. Navigate to Trading Partner Management—>Partner Profile Import/Export.
  5. The Import Trading Partner Management Data window opens.

  6. In the Import/Export pane, select Export.
  7. Select the Trading Partner option.
  8. Click Browse next to Trading Partner.
  9. Deselect Test_TradingPartner_2.
  10. Click Done.
  11. For the Format option, select Business Connect.
  12. Click Export.
  13. If a File Download dialogue opens, click Save.
  14. In the Save As window navigate to the location which you want to save the exported file to.
  15. Enter a filename and click Save.
  16. Note: Remember the navigation path to the file or copy it to the clipboard. You will need this in the next procedures.

To Import the Trading Partner Information

  1. Start the Weblogic Integration - Business Connect Administration tool by selecting Start—>Programs—>BEA WebLogic Integration - Business Connect 8.1—>Administrator.
  2. Use Administrator as the user name and leave the password field blank.
  3. Click Partner Profiles.
  4. Right-click in the white area and select Import from the menu.
  5. Enter the path to the exported file location or paste it from the clipboard.
  6. When prompted to select active protocol, click OK.

You have now imported the information about the trading partner hosted on the WebLogic Integration server into WebLogic Integration - Business Connect. The next step is to configure WebLogic Integration with the trading partner information of the partner which is using WebLogic Integration - Business Connect.

Configuring WebLogic Integration with Trading Partner Information

In this section you create a trading partner in WebLogic Integration - Business Connect and export the trading partner profile to a file which will be imported into WebLogic Integration.

To Create and Export the Trading Partner Profile

  1. In the Weblogic Integration - Business Connect Administration tool, click Company Profiles.
  2. Click New and enter BCTradingPartner as the name and BCTP-id as the ID.
  3. Fill out the basic profile contact information.
  4. In the Inbound Protocols tab, add ebXML to the list.
  5. Click OK.
  6. In the Do you want to setup a certificate for this company? window, click No. Since we are not testing the security in this example, there is no need to set up a certificate.
  7. Right-click on the profile entry and select Export from the menu.
  8. Accept the defaults.
  9. Remember the path to the export file location or copy it to the clipboard.
  10. Click OK.

To Import the Trading Partner Profile

  1. On the WebLogic Integration Administration Console—>Trading Partner Management—>Partner Profile Import/Export screen, in the Import/Export pane, click Import.
  2. In the File Name field, enter the location to the file you exported from WebLogic Integration - Business Connect or paste the path from the clipboard.
  3. Select Business Connect as the Import Format.
  4. Click Import.

You have now completed the configuration of WebLogic Integration and WebLogic Integration - Business Connect. If for any reason you have to create the WebLogic Integration - Business Connect trading partner by hand in the WebLogic Integration Administration Console, use the following values:

Setting Up a Trading Partner Service Profile

In this example you set up a trading partner service profile between the 000000001 trading partner in WebLogic Integration and the BCTP-id trading partner in WebLogic Integration - Business Connect. Service profiles specify the protocol binding and URL endpoints for the local and remote trading partners that offer and call the service.

To Set Up the Trading Partner Service Profile

  1. If not already running, start your WebLogic Server by selecting Tools—>WebLogic Server—>Start WebLogic Server.
  2. After the Server is running, open the WebLogic Administration Console by selecting Tools—>WebLogic Integration—>WebLogic Administration Console.
  3. Log in to the console using the server user name and password that you specified in the Step 1: Create a New WebLogic Integration Domain section.
  4. Navigate to Trading Partner Management—>Service Management.
  5. The View and Edit Services window opens.

  6. In the Services panel, select Create New.
  7. The Add Service window opens.

  8. Click Browse (by the Name field).
  9. The Choose Service window opens.
  10. Select ebxml.oneway.binary.BinarySellerControl.
  11. The Add Service window is displayed with the BinarySellerControl added to the Name field.

  12. Click Add Service.
  13. The View and Edit Services window is displayed with the new Service Details.

  14. Click Add Service Profile.
  15. The Add Service Profile window opens.

  16. From the Name LOCAL drop-down menu, select Test_TradingPartner_1.
  17. From the Name REMOTE drop-down menu, select BCPartner.
  18. Click Submit.
  19. Skip the authentication steps by selecting No.
  20. Select ebxml.oneway.selector.SelectorSellerControl and repeat steps 9-14.

You have completed setting up the trading partner service profile and are ready to begin the tutorial examples of this section.

Sending a Message from WebLogic Workshop to WebLogic Integration - Business Connect

In this section, you use one of the initiator processes that you created in an earlier example to send a message. Recall that the SelectorBuyer business process in Step 3: Selecting the Trading Partner Information Dynamically Through Typed XML selects the trading partner ID from the incoming data. In this example you use the files from that example, but modify the incoming data with the correct trading partner ID to send the message to WebLogic Integration - Business Connect.

  1. Start the WebLogic Integration - Business Connect selecting Start—>Programs—>BEA Weblogic Integration-Business Connect 8.1—>Start Server.
  2. Note: For information about how to start the server on platforms other than Windows, see the Getting Started of Using WebLogic Integration - Business Connect available at http://download.oracle.com/docs/cd/E13215_01/wlibc/docs81/admin/get_started.html.

Return to the WebLogic Integration application, and in the Applications tab, double-click on ebxml\oneway\selector\SelectorBuyer.jpd.

  1. Click on the WebLogic Workshop menu. (For more detailed instructions refer back to, To Test the Seller Process.)
  2. To enter test data, cut and paste the content of C:\myapps\tptutorialapps\ebXML\ebXMLWeb\sampledata\sampleorder.xml into the xml variable (payload) field.
  3. In the test data pane, modify the Supplier_ID element to have the value BCTP-id.
  4. Run the test.
  5. Confirm that a file appeared in the inbound XML directory of your WebLogic Integration - Business Connect installation:
    [BC_HOME]\data\BCTP%2did\xmlin where [BC_HOME] is the directory in which you installed WebLogic Integration - Business Connect (such as C:\WLI-BC).

Sending a File from WebLogic Workshop to WebLogic Integration - Business Connect

Recall that in the advanced binary file example, the folder name is used as the name of the target trading partner. In this section, you use the DynamicBinaryBuyer and DynamicBinarySeller business processes to send a file to WebLogic Integration - Business Connect.

The first step in the process is to enable WebLogic Integration - Business Connect to receive binary files.

To Enable WebLogic Integration - Business Connect to Receive Binary Files

  1. Start the Weblogic Integration - Business Connect Administration tool by selecting Start—>(All) Programs—>BEA WebLogic Integration - Business Connect 8.1—>Administrator.
  2. Use Administrator as the user name and leave the password field blank.
  3. Click Partner Profiles.
  4. Double-click 000000001 to open the trading partner profile.
  5. Click on the Binary Directories tab.
  6. The Binary Directories tab opens with BCTP-id listed in the Companies field.

  7. Click Add.
  8. Click OK.
  9. Note the inbound and outbound directories.
  10. Note: WebLogic Integration -Business Connect replaces the `-' character with `%2' in default directory names.

To Run the Example

  1. Create the C:\tptutorial\binary-out\dynamic\BCTP-id directory on your hard drive.
  2. In WebLogic Workshop Application pane, navigate to and expand the ebxml\ebxmlWeb\ebxml\oneway\binary\advanced folder.
  3. Double-click on DynamicBinaryBuyer.jpd
  4. DynamicBinaryBuyer.jpd opens in Design View.

  5. Click on the WebLogic Workshop menu to run and deploy the business process.
  6. Drop a binary file into the C:\tptutorial\binary-out\dynamic\BCTP-id directory on your hard drive

The file will disappear in a few moments and appear in the inbound binary directory of your WebLogic Integration - Business Connect installation: [BC_HOME]\data\BCTP%2did\binaryin\TP1%2did where [BC_HOME] is the directory in which you installed WebLogic Integration - Business Connect.

Note: Make sure that the 000000001 partner is Active in the WebLogic Integration - Business Connect.

 

Back to Top Previous Next