![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Note: | The ebXML control is available in BEA Workshop for WebLogic Platform only if you are licensed to use WebLogic Integration. |
The ebXML protocol (Electronic Business using eXtensible Markup Language) is a modular suite of specifications that enables enterprises of any size and in any geographical location to conduct business over the Internet. It is sponsored by UN/CEFACT and OASIS. To learn about ebXML, see
http://www.ebXML.org
.
The ebXML control enables WebLogic Workshop business processes to exchange business messages and data with trading partners via ebXML. The ebXML control supports both the ebXML 1.0 and ebXML 2.0 messaging services. You use ebXML controls in initiator business processes to manage the exchange of ebXML business messages with participants. For an introduction to ebXML solutions, see Introducing Trading Partner Integration at the following URL:
http://download.oracle.com/docs/cd/E13214_01/wli/docs92/tpintro/index.html
Introducing Trading Partner Integration at http://download.oracle.com/docs/cd/E13214_01/wli/docs92/tpintro/index.html
Trading Partner Management at http://download.oracle.com/docs/cd/E13214_01/wli/docs92/adminhelp/tpm.html
Building ebXML Participant Business Processes
You use ebXML controls in initiator business processes to exchange ebXML business messages with participants. The ebXML control provides methods for sending and receiving business messages, as described in Interface EBXMLControl. Callbacks handle ebXML messages, acknowledgements, and errors received from the participant.
You should not use ebXML controls in participant business processes to respond to incoming messages. Instead, you use Client Request nodes to handle incoming business messages from the initiator and Client Response nodes to handle outgoing business messages to the initiator. To learn about building participant business processes that use ebXML, see Building ebXML Participant Business Processes.To learn about designing business processes that use ebXML, see Introducing Trading Partner Integration at the following URL:
http://download.oracle.com/docs/cd/E13214_01/wli/docs81/tpintro/index.html
At run-time, the ebXML control relies on trading partner and service information stored in the TPM repository. To learn about the TPM repository, see Introducing Trading Partner Integration at the following URL:
http://download.oracle.com/docs/cd/E13214_01/wli/docs92/tpintro/index.html.
To learn about adding or updating information in the TPM repository, see Trading Partner Management in Using The WebLogic Integration Administration Console at the following URL:
http://download.oracle.com/docs/cd/E13214_01/wli/docs92/adminhelp/tpm.html
This topic describes how to create a new ebXML control. Each ebXML control instance represents a single ebXML conversation. For each separate ebXML conversation in a business process, you must add a separate ebXML control instance. To learn about ebXML controls, see ebXML Control.
Note: | If the Data Palette view is not visible in BEA Workshop for WebLogic Platform, click Window![]() ![]() |
The Insert control: Ebxml dialog box appears as shown in Figure 5-1.
To specify the initiator business ID dynamically, use selectors or use the
setProperties method in a Control Send node, as described in
Dynamically Specifying Business IDs.
You can also obtain this value by using XQuery selectors on process variables or method parameters in an incoming message.
|
|||||
To specify the participant business ID dynamically, use selectors or use the
setProperties method in a Control Send node, as described in
Dynamically Specifying Business IDs.
|
|||||
To learn more about data types, see
Working with Data Types.
|
|||||
Action mode for this ebXML control. Determines the value specified in the
eb:Action element in the message header of the ebXML message, which becomes important in cases where multiple message exchanges occur within the same conversation. One of the following values:
|
|||||
After you create the control file, the name of the control file becomes available as a service on the Services tab in the BEA Workshop for WebLogic Platform.
The XmlObject[]
and RawData[]
payload options are only available in source view. You can configure your ebXML control to use these options after you have created it.
request
and response
methods, change the payload specified to the payload type that you want to use.The following restrictions apply to payload specifications:
MessageAttachment[]
type is one of your arguments, no other array (including a MessageAttachment[])
is allowed in the argument list.Note: | The order of arguments which you used in the control definition file and the order of the arguments in the node on the participant business process which is listening for your message must match. |
To learn more about the request
and response
methods, see
Interface EBXMLControl.
All WebLogic Workshop controls follow a consistent model. Many aspects of using ebXML controls are identical or similar to using other WebLogic Workshop controls .
After you have added an ebXML control to an initiator business process, you can use methods on the control to exchange ebXML messages with participant trading partners. In the Design View, you expand the node for the ebXML control in the Data Palette to expose its methods, and then drag and drop the methods you want onto the business process. Common tasks include:
To learn more about these methods, see Interface ebXML Control.
To send an ebXML message to a participant, you use a send message method in a Control Send node. By default, the control file instance includes a generated send method named request
. To add the Control Send node to a business process, you drag this method from the Data Palette onto the business process. For business processes that involve multiple round-trips, you need to create a separate Control Send node for each operation that involves sending an ebXML message to the participant.
Note: | The default return type for the request method is void. However, you can also specify the return type to be XmlObject . If you use XmlObject as the return type, the content the XmlObject is the ebXML envelope data. |
After creating the Control Send node, you need to specify the payload parts and their Java data types (see Table 5-2).
Array containing one or more parts of an ebXML business message. Message parts can be untyped XML data (
XmlObject data type) or non-XML data (RawData data type). Used when sending different kinds of payloads (XML and non-XML) in the same message. The actual number of message parts might not be known until processed. To learn about working with MessageAttachment[] objects, see Using Message Attachments.
|
Attachments can also be typed XML or typed MFL data as long as you specify the corresponding XML Bean or MFL class name in the parameter.
If you use arrays as attachment type, certain restrictions apply to the order of your arguments. For more informations, see Specifying XmlObject and RawData Array Payloads.
You can specify business IDs statically (using the @EBXMLControl.EBXML Annotation) or dynamically. To learn about specifying business IDs dynamically, see Dynamically Specifying Business IDs.
Participants can respond to initiator requests in the following ways:
To handle responses from participants, initiator business processes use the following callback methods (see
To receive an ebXML message from a participant, you use the appropriate method. To add the method to a business process, you drag it from the Data Palette onto the business process, which creates a Control Receive node. For business processes that involve multiple round-trips, you need to create a separate Control Receive node for each operation that involves receiving an ebXML message from the participant.
For the response
method, if you specify non-default
in the ebxml-action-node
, you can rename the Control Receive node to make it more descriptive, such as getInvoice
. However, if you specify default
in the ebxml-action-node
, you must use the default name (onMessage
) and the business process can have only one onMessage
Control Receive node.
For the response
method, after creating the Control Receive node, you need to specify the payload parts and their Java data type for the incoming message. To learn about valid data types, see
Sending Messages to Participants.
The onError
and onAck
methods are system-level methods. Both use the EnvelopeDocument
argument, which will contain an ebXML envelope when the message is received. As they are system-level methods, these arguments are not seen in the default control but you can drag them onto the business process from the Data Palette. If your application contains a schema project that includes the envelope.xsd
file, and if the schema is already built, you can extract the values you want by creating a query (in the XQuery language) using the mapper functionality of WebLogic Workshop. To learn about creating queries with the mapper functionality, see
Transforming Data Using XQuery.
You can retrieve the message envelope of an incoming ebXML message by using the envelope
annotation in the @jc:ebxml-method
tag. To learn more about the envelope
annotation, see
EBXMLControl.EbxmlMethod Annotation.
The ebXML control adds the capability of dynamically binding business IDs for the initiator (from
property) and the participant (to
property) of the control. Dynamic binding of properties can be achieved the following ways:
The hierarchy of property settings is as follows, starting with the approach having the highest precedence:
DynamicProperties.xml
filesetProperties()
methodDynamic selectors have a higher precedence than static selectors.
Using a dynamic selector, ebXML controls allow you to decide at run time which one of multiple trading partners to send a business message to. When you specify a dynamic selector, you build and test an XQuery that retrieves the business ID you need.
The setProperties
method accepts an ebXMLPropertiesDocument
parameter. The ebXMLPropertiesDocument
type is an XML Beans class that is generated out of the corresponding schema element defined in DynamicProperties.xsd
. The DynamicProperties.xsd
file is located in the system folder of New Process Applications or in the system folder of the Schemas project.
If your application contains a schema project that includes the DynamicProperties.xsd
file, and if the schema is already built, you can extract the values you want by creating a query (in the XQuery language) using the mapper functionality of WebLogic Workshop. To learn about creating queries with the mapper functionality, see
Transforming Data Using XQuery.
DynamicProperties.xsd
file, and that the schema is already built.setProperties
method and drop it onto the Control Send node.to
and from
values, and then create a transformation to map them to the corresponding elements in ebXMLPropertiesDocument
.
To display the current property settings, use the getProperties()
method.
For examples of how to use the ebXML control, see Tutorial: Building ebXML Solutions at the following URL:
http://download.oracle.com/docs/cd/E13214_01/wli/docs81/tptutorial/ebxml.html
![]() ![]() ![]() |