Welcome!

Weblogic Authors: Yeshim Deniz, Elizabeth White, Michael Meiner, Michael Bushong, Avi Rosenthal

Related Topics: Weblogic

Weblogic: Article

Introduction to ebXML

Making collaboration easier

With today's increasing demand for businesses to communicate with each other, business-to-business (B2B) integration holds the key to successful e-commerce collaboration.

The first problem that companies generally face when interacting with each other is how to transfer information that is understood by the organizations involved. Standards, therefore, are an important contributor in helping different partners to interoperate. Many standards have arisen to solve integration problems. While each of them have addressed this issue in different ways, ebXML-Messaging has gained market traction as one of the mature protocols that has resolved reliability and security issues around integration.

ebXML-Messaging is an integration standard from OASIS that provides an XML-based infrastructure to enable consistent, secure, and interoperable message exchange. This specification is part of a series of specifications published by OASIS to define an end-to-end B2B framework. It encapsulates the notion of B2Bi conversations and enforces rules of engagement agreed upon by involved parties. It is transport independent and extends SOAP Messages with Attachments to enable the exchange of business messages containing payloads of any format. Further, it defines transport-level acknowledgements and error messages, eliminating the need to explicitly model them in business processes.

BEA WebLogic Integration 8.1 leverages these features of ebXML to provide a highly productive environment for implementing effective trading partner integration strategies by implementing the ebXML 1.0 and 2.0 Messaging Specification that is integrated with BEA WebLogic Workshop. It simplifies the entire process of designing B2B choreography by eliminating the need to configure the Trading Partner Repository upfront and manages conversations with different trading partners seamlessly. Apart for this, it provides some very useful features for reliable messaging, error handling, and message tracking.

In this article, I look at ebXML Conversations and how they are mapped to an ebXML Control and modelled in business processes. I'll provide some insight into conversation management with WebLogic Integration 8.1 and look at the trading partner configurations required for it. Finally I'll look at the product features mentioned above.

ebXML Conversation
ebXML conversation is at the heart of trading partner integration. It carries the context for messages being exchanged by trading partners. Each ebXML message carries in its envelope an ebXML Service Name and Conversation ID that identifies the conversation it belongs to. The message exchanges represent business activities occurring as part of that conversation and are called ebXML Actions. An ebXML conversation always involves an initiator and a participant. The initiator trading partner may instantiate several conversations with different trading partners as part of a single business process. ebXML control is used to model each of these conversations for the initiator. The participant, on the other hand, participates only in one conversation and therefore the business process itself represents an ebXML conversation on its end.

This concept can be clearly understood using an order-processing scenario. Let's assume an integration scenario between BEA and Avitek, a computer manufacturing company. BEA places purchase orders with Avitek to buy computers. Avitek, on receiving the purchase order from BEA, responds with an invoice. BEA thus becomes the initiator of this conversation while Avitek acts as the participant. BEA and Avitek agree on OrderProcessing as their conversation name, which will have two business activities, processOrder and processInvoice.

ebXML Control
The initiator business process may have multiple ebXML controls and/or ebXML control instances based on the number of conversations it needs to carry. In our case, BEA starts a single conversation with Avitek. Hence we need only one ebXML control and control instance. An ebXML control can be created using the Control Wizard seen in Figure 1. The control name specified here, OrderControl, is used as a TPM Service name as we will see later. An important aspect of the control is the annotations it will carry. An ebXML control has an ebXML service name, From id, To id, and ebXML action mode annotations (see Listing 1). The production values for the From and To ids should be duns' number or actual ids for BEA and Avitek. It may very well be that these trading partners are not yet configured in the trading partner repository. The workflow designer may need to test the choreography to ensure the correctness of the business process logic without getting into the actual details of configuring the TPM Repository. To avoid the hassle of going back and forth from the WebLogic Workshop IDE to the WebLogic Integration Console, the developer may use the out-of-the-box TPM data available with the product. Another use case can be when the same business process is used as part of various integration scenarios. The processes are made agnostic of trading partners by using the to-selector, from-selector control instance annotations that take in XQuery Selectors as their value.

 

Once the ebXML Control is created, we modify the method names in the control to reflect the ebXML action name decided by BEA and Avitek. The method to send the order thus becomes processOrder and the method to receive the invoice is named processInvoice (see Listing 1).

A control thus created can be shared across different business processes. The design question that generally arises is, "when can I reuse a previously created ebXML control and when should a new one be created?" The answer is simple. The initiator trading partner can reuse the control if it needs to carry out another conversation with the same participant using the same reliable messaging and security settings. If the reliability and/or security settings required are different while conversing with the same trading partner, a new ebXML control should be created.

Modelling an ebXML Conversation for the Initiator
The OrderControl created above will now be used to model conversation in BEA's buyer business process. The initiator process can be started via a Message Broker or simple ClientRequest (see Listing 2). Once the start node is modelled, we use OrderControl to model an ebXML conversation. Methods of the control are displayed at the right bottom corner in the design view in the WebLogic Workshop IDE (see Figure 2). As decided by BEA and Avitek beforehand, BEA will send an order to Avitek; hence, we drop the processOrder method in the process. As part of the same conversation, Avitek will respond with the invoice. We drop the processInvoice method in BEA's business process to receive this invoice. Any extra logic for processing received invoices can be implemented in this method. With this step, BEA's business process is complete.

 

Modelling an ebXML Conversation for the Participant
As I mentioned earlier, the business process for the participant by itself represents an ebXML conversation. Hence we see an ebXML service name as a JPD annotation in Listing 3 that has snippets from Avitek's business process. As decided by two parties, OrderProcessing is specified as an ebXML service name. The participant process is always started by an ebXML message received from the initiator. The Java method name associated with this node represents the action name of the ebXML message to be received and is in our case called processOrder. Now Avitek needs to respond back to BEA with an invoice after fetching it from the file system. This response has to be part of the same ebXML conversation and is modelled using the client callback mechanism. By using a ClientCallback to send a response, the responsibility of ensuring that the message is sent as part of the same conversation is delegated by the workflow designer to the underlying message service handler (MSH). This way of modelling an ebXML participant falls inline with the Web Services Provider model wherein the provider of the service may send an asynchronous response to the consumer of the service using the WebServices Callback mechanism. The Java method in the callback interface becomes the ebXML action name and is named processInvoice as decided by BEA and Avitek earlier. Figure 3 shows the design view of this JPD.

 

Behind the Scenes
Once the business processes for participant and initiator trading partners are designed, orchestration between these processes is carried on by starting the BEA initiator process from a browser. The processOrder method is invoked as part of BEA's process execution. It invokes the ebXML MSH internally and passes the payloads (received as method arguments) to the MSH. The MSH creates a new conversation and encapsulates its ID in an ebXML SOAP envelope along with the service name OrderProcessing and action name processOrder. It creates an ebXML message using this envelope and adds payloads as SOAP Attachments. The ebXML message created is sent to the trading partner identified by to-id in the control annotation. The reliability and security semantics for sending a message are derived from BEA's profile in the Trading Partner Repository while the transport endpoint is derived from to-id Avitek's profile.

On Avitek's end, the receiving MSH extracts the ebXML service name, action name, and conversation ID from the incoming message to identify the conversation this message belongs to. If the message indicates a new conversation, it creates a new instance of a business process using the service name to identify the process type. It uses an ebXML action name to invoke the right node in the process. Thus, the processOrder method of Avitek is invoked and user code defined in this method is executed.

As Avitek's process executes further, it reaches the ClientCallback node that is supposed to respond to BEA. The ClientCallback method processInvoice internally calls sending ebXML-MSH, which creates an ebXML envelope encapsulating the same conversation ID it received from BEA's message to indicate that the response is part of the same conversation. It also encapsulates the processInvoice as the action name and OrderProcessing as the ebXML service name in the outgoing message.

The message eventually reaches BEA, which uses the conversation ID from the incoming message to identify the related conversation. The system thus guarantees messages sent and received via an ebXML control instance are part of a single ebXML conversation.

The conversation ID also helps to identify the business process instance the message should berouted to. Finally, an ebXML Action name is used to route the message to BEA's processInvoice ControlCallback node. User code specified in the processInvoice method is executed next.

Configuring the Trading Partner Repository
At this point, the business processes for BEA and Avitek are designed and tested using out-of-the-box trading partners. To run these business processes in production, we need to configure profiles for BEA and Avitek. This configuration can be done via the WebLogic Integration Console or using the offline Bulkloader tool. Listing 4 displays TPM data that can be directly uploaded for our example. As seen in the listing, the trading partner configuration is now made easy with only two root elements: trading partner and service. The trading partner element has protocol binding as child element. A trading partner may have one or more protocol binding per protocol name and version. Figure 4 displays the BEA-ebxml20-binding protocol binding. As seen, it contains Protocol information, transport endpoints, reliable messaging parameters and a security configuration for BEA.

 

The other root element, service, has one or more service profiles, which tie together the trading partners that need to converse. It is configured differently for the initiator and participant (see Figure 5). The participant trading partner Avitek has a business process name as the service name and the service type is "PROCESS". The initiator trading partner BEA has an ebXML control name specified as the service name and the service type is "SERVICECONTROL".

 

The service ebXML.order.OrderControl in Listing 4 indicates that BEA, when interacting with Avitek, uses the BEA-ebxml20-binding binding. BEA communicates with Avitek using ebXML 2.0 protocol and OnceAndOnlyOnce reliable messaging mode. Similarly the service /ebxmlWeb/ebxml/order/Seller.jpd is used by Avitek when interacting with BEA.

Messaging Reliably
BEA WebLogic Integration 8.1 supports four reliable messaging modes for ebXML 2.0 Point-to-Point Messaging: Once and Only Once, Atmost Once, Atleast Once, and BestEffort. For ebXML 1.0 messaging, it provides two Reliable Messaging modes: BestEffort and Once and Only Once.

  • BestEffort: The fastest mode as it does not care for acknowledgement or duplicates.
  • Atleast Once: Acknowledgement is requested but duplicate messages aren't checked.
  • Atmost Once: Duplicates are checked but the message is not acknowledged.
  • Once and Only Once: The most reliable mode as the message is acknowledged and the duplicates are checked.

    When BEA sends a purchase order, Avitek's MSH sends a low-level acknowledgement that can be viewed in JPD. BEA, as the initiator, can simply model the acknowledgement for viewing by dragging/dropping the onAck ebXML control method. Avitek, as the participant, does not have the ebXML control. It uses the ClientRequest node and system-level method onAck to model acknowledgments.

    Modelling Error Messages
    It may happen that the message received by a peer-trading partner is erroneous. For example, Avitek cannot parse the purchase order sent by BEA. In that case, Avitek sends an error message to BEA. This message can be modelled in BEA's business process for viewing by dragging/dropping the onError ebXML control method. An ErrorList indicating actual errors can then be extracted from the ebXML envelope that is modelled as an argument to onError method.

    Exposing ebXML Envelope
    The SOAP-based ebXML Envelope sent with the ebXML message contains important elements like From and To Party; Message Id, used to track messages; ebXML Conversation ID, used to track the conversations; ErrorList, sent with the error message; and Signature, to name a few of them. With BEA WebLogic Integration 8.1, the ebxml envelope can be viewed in the business process as org.xmlsoap.schemas.soap.envelope.EnvelopeDocument XBean by specifying the annotation on the method used to receive the message in question. Listing 3 displays the @jpd:ebxml-method envelope method annotation used by Avitek's jpd while Listing 1 displays the control annotation @jc:ebxml-method envelope="{env}" used by BEA's jpd. The method argument specified in these annotations is the one that will contain the message envelope when the corresponding receive node is invoked.

    The ebXML envelope for the outgoing message can be exposed in the business process by specifying XmlObject as the return type of method used to send the message in question. Each element of ebXML envelope can further be extracted and mapped to Java objects using the data transformation tool embedded in the WebLogic Workshop IDE. The schema for ebXML envelope required to view its elements for mapping is available as part of the system schemas that come with WebLogic Integration 8.1.

    Message Tracking
    BEA and Avitek can monitor messages they have sent and received and their status using the WebLogic Integration Console. Different levels of message tracking can be set in the TPM Repository at the root level. For granular control, it can also be set at the service profile level. There are three levels of message tracking: ALL, Metadata, and NONE. With the tracking level set to ALL, the contents as well as the Metadata of all the messages exchanged are tracked and displayed in the WebLogic Integration Console.

    The metadata of the message includes a conversation ID related to message exchange; a business process ID, an action name representing the message exchange; a time when the message was sent/received; a message status for whether the message was successfully sent or received; a status description; the size of the message, action, transport protocol; and so on. With message tracking set to metadata, the contents are not tracked. The tracking level should be set as required. Using the highest level adversely impacts performance.

    References

  • BEA WebLogic Integration 8.1: http://commerce.bea.com/index.jsp
  • BEA WebLogic Integration Documentation: http://e-docs.bea.com/workshop/docs81/doc/en/core/index.html
  • ebXML Tutorial: An extensive tutorial to create various B2B Integration Scenarios with ebXML: http://dev2dev.bea.com/codelibrary/code/tptutorial.jsp
  • ebXML-MSH 1.0 Specification: www.ebxml.org/specs/ebMS.doc
  • ebXML-MSH 2.0 Specification: www.ebxml.org/specs/ebMS2.pdf
  • SOAP1.1 Specification: www.w3.org/TR/2000/NOTE-SOAP-20000508
  • SOAP with Attachments specification: www.w3.org/TR/2000/NOTE-SOAP-attachments-20001211
  • More Stories By Komal Mangtani

    Komal Mangtani is a senior software engineer working on BEA’s Weblogic Integration product. She implemented ebXML Business Protocol for WebLogic Integration 8.1 and is a member of the ebXML committee in OASIS. Komal works in the area of high availability for the product.

    Comments (0)

    Share your thoughts on this story.

    Add your comment
    You must be signed in to add a comment. Sign-in | Register

    In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


    @ThingsExpo Stories
    SYS-CON Events announced today that Yuasa System will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Yuasa System is introducing a multi-purpose endurance testing system for flexible displays, OLED devices, flexible substrates, flat cables, and films in smartphones, wearables, automobiles, and healthcare.
    Join IBM November 1 at 21st Cloud Expo at the Santa Clara Convention Center in Santa Clara, CA, and learn how IBM Watson can bring cognitive services and AI to intelligent, unmanned systems. Cognitive analysis impacts today’s systems with unparalleled ability that were previously available only to manned, back-end operations. Thanks to cloud processing, IBM Watson can bring cognitive services and AI to intelligent, unmanned systems. Imagine a robot vacuum that becomes your personal assistant tha...
    Organizations do not need a Big Data strategy; they need a business strategy that incorporates Big Data. Most organizations lack a road map for using Big Data to optimize key business processes, deliver a differentiated customer experience, or uncover new business opportunities. They do not understand what’s possible with respect to integrating Big Data into the business model.
    Nordstrom is transforming the way that they do business and the cloud is the key to enabling speed and hyper personalized customer experiences. In his session at 21st Cloud Expo, Ken Schow, VP of Engineering at Nordstrom, will discuss some of the key learnings and common pitfalls of large enterprises moving to the cloud. This includes strategies around choosing a cloud provider(s), architecture, and lessons learned. In addition, he’ll go over some of the best practices for structured team migrat...
    Coca-Cola’s Google powered digital signage system lays the groundwork for a more valuable connection between Coke and its customers. Digital signs pair software with high-resolution displays so that a message can be changed instantly based on what the operator wants to communicate or sell. In their Day 3 Keynote at 21st Cloud Expo, Greg Chambers, Global Group Director, Digital Innovation, Coca-Cola, and Vidya Nagarajan, a Senior Product Manager at Google, will discuss how from store operations...
    Recently, REAN Cloud built a digital concierge for a North Carolina hospital that had observed that most patient call button questions were repetitive. In addition, the paper-based process used to measure patient health metrics was laborious, not in real-time and sometimes error-prone. In their session at 21st Cloud Expo, Sean Finnerty, Executive Director, Practice Lead, Health Care & Life Science at REAN Cloud, and Dr. S.P.T. Krishnan, Principal Architect at REAN Cloud, will discuss how they bu...
    SYS-CON Events announced today that Dasher Technologies will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 - Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Dasher Technologies, Inc. ® is a premier IT solution provider that delivers expert technical resources along with trusted account executives to architect and deliver complete IT solutions and services to help our clients execute their goals, plans and objectives. Since 1999, we'v...
    SYS-CON Events announced today that TidalScale, a leading provider of systems and services, will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 - Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. TidalScale has been involved in shaping the computing landscape. They've designed, developed and deployed some of the most important and successful systems and services in the history of the computing industry - internet, Ethernet, operating s...
    Enterprises have taken advantage of IoT to achieve important revenue and cost advantages. What is less apparent is how incumbent enterprises operating at scale have, following success with IoT, built analytic, operations management and software development capabilities – ranging from autonomous vehicles to manageable robotics installations. They have embraced these capabilities as if they were Silicon Valley startups. As a result, many firms employ new business models that place enormous impor...
    SYS-CON Events announced today that Taica will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Taica manufacturers Alpha-GEL brand silicone components and materials, which maintain outstanding performance over a wide temperature range -40C to +200C. For more information, visit http://www.taica.co.jp/english/.
    SYS-CON Events announced today that MIRAI Inc. will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. MIRAI Inc. are IT consultants from the public sector whose mission is to solve social issues by technology and innovation and to create a meaningful future for people.
    As hybrid cloud becomes the de-facto standard mode of operation for most enterprises, new challenges arise on how to efficiently and economically share data across environments. In his session at 21st Cloud Expo, Dr. Allon Cohen, VP of Product at Elastifile, will explore new techniques and best practices that help enterprise IT benefit from the advantages of hybrid cloud environments by enabling data availability for both legacy enterprise and cloud-native mission critical applications. By rev...
    With major technology companies and startups seriously embracing Cloud strategies, now is the perfect time to attend 21st Cloud Expo October 31 - November 2, 2017, at the Santa Clara Convention Center, CA, and June 12-14, 2018, at the Javits Center in New York City, NY, and learn what is going on, contribute to the discussions, and ensure that your enterprise is on the right path to Digital Transformation.
    SYS-CON Events announced today that Datera will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Datera offers a radically new approach to data management, where innovative software makes data infrastructure invisible, elastic and able to perform at the highest level. It eliminates hardware lock-in and gives IT organizations the choice to source x86 server nodes, with business model option...
    Infoblox delivers Actionable Network Intelligence to enterprise, government, and service provider customers around the world. They are the industry leader in DNS, DHCP, and IP address management, the category known as DDI. We empower thousands of organizations to control and secure their networks from the core-enabling them to increase efficiency and visibility, improve customer service, and meet compliance requirements.
    Digital transformation is changing the face of business. The IDC predicts that enterprises will commit to a massive new scale of digital transformation, to stake out leadership positions in the "digital transformation economy." Accordingly, attendees at the upcoming Cloud Expo | @ThingsExpo at the Santa Clara Convention Center in Santa Clara, CA, Oct 31-Nov 2, will find fresh new content in a new track called Enterprise Cloud & Digital Transformation.
    SYS-CON Events announced today that N3N will exhibit at SYS-CON's @ThingsExpo, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. N3N’s solutions increase the effectiveness of operations and control centers, increase the value of IoT investments, and facilitate real-time operational decision making. N3N enables operations teams with a four dimensional digital “big board” that consolidates real-time live video feeds alongside IoT sensor data a...
    SYS-CON Events announced today that NetApp has been named “Bronze Sponsor” of SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. NetApp is the data authority for hybrid cloud. NetApp provides a full range of hybrid cloud data services that simplify management of applications and data across cloud and on-premises environments to accelerate digital transformation. Together with their partners, NetApp emp...
    Smart cities have the potential to change our lives at so many levels for citizens: less pollution, reduced parking obstacles, better health, education and more energy savings. Real-time data streaming and the Internet of Things (IoT) possess the power to turn this vision into a reality. However, most organizations today are building their data infrastructure to focus solely on addressing immediate business needs vs. a platform capable of quickly adapting emerging technologies to address future ...
    SYS-CON Events announced today that Avere Systems, a leading provider of hybrid cloud enablement solutions, will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Avere Systems was created by file systems experts determined to reinvent storage by changing the way enterprises thought about and bought storage resources. With decades of experience behind the company’s founders, Avere got its ...