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 Juniper Networks (NYSE: JNPR), an industry leader in automated, scalable and secure networks, will exhibit at SYS-CON's 20th International Cloud Expo®, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY. Juniper Networks challenges the status quo with products, solutions and services that transform the economics of networking. The company co-innovates with customers and partners to deliver automated, scalable and secure network...
    The age of Digital Disruption is evolving into the next era – Digital Cohesion, an age in which applications securely self-assemble and deliver predictive services that continuously adapt to user behavior. Information from devices, sensors and applications around us will drive services seamlessly across mobile and fixed devices/infrastructure. This evolution is happening now in software defined services and secure networking. Four key drivers – Performance, Economics, Interoperability and Trust ...
    Five years ago development was seen as a dead-end career, now it’s anything but – with an explosion in mobile and IoT initiatives increasing the demand for skilled engineers. But apart from having a ready supply of great coders, what constitutes true ‘DevOps Royalty’? It’ll be the ability to craft resilient architectures, supportability, security everywhere across the software lifecycle. In his keynote at @DevOpsSummit at 20th Cloud Expo, Jeffrey Scheaffer, GM and SVP, Continuous Delivery Busin...
    With major technology companies and startups seriously embracing Cloud strategies, now is the perfect time to attend @CloudExpo | @ThingsExpo, June 6-8, 2017, at the Javits Center in New York City, NY and October 31 - November 2, 2017, Santa Clara Convention Center, CA. Learn what is going on, contribute to the discussions, and ensure that your enterprise is on the right path to Digital Transformation.
    Multiple data types are pouring into IoT deployments. Data is coming in small packages as well as enormous files and data streams of many sizes. Widespread use of mobile devices adds to the total. In this power panel at @ThingsExpo, moderated by Conference Chair Roger Strukhoff, panelists will look at the tools and environments that are being put to use in IoT deployments, as well as the team skills a modern enterprise IT shop needs to keep things running, get a handle on all this data, and deli...
    New competitors, disruptive technologies, and growing expectations are pushing every business to both adopt and deliver new digital services. This ‘Digital Transformation’ demands rapid delivery and continuous iteration of new competitive services via multiple channels, which in turn demands new service delivery techniques – including DevOps. In this power panel at @DevOpsSummit 20th Cloud Expo, moderated by DevOps Conference Co-Chair Andi Mann, panelists will examine how DevOps helps to meet th...
    The 20th International Cloud Expo has announced that its Call for Papers is open. Cloud Expo, to be held June 6-8, 2017, at the Javits Center in New York City, brings together Cloud Computing, Big Data, Internet of Things, DevOps, Containers, Microservices and WebRTC to one location. With cloud computing driving a higher percentage of enterprise IT budgets every year, it becomes increasingly important to plant your flag in this fast-expanding business opportunity. Submit your speaking proposal ...
    @GonzalezCarmen has been ranked the Number One Influencer and @ThingsExpo has been named the Number One Brand in the “M2M 2016: Top 100 Influencers and Brands” by Analytic. Onalytica analyzed tweets over the last 6 months mentioning the keywords M2M OR “Machine to Machine.” They then identified the top 100 most influential brands and individuals leading the discussion on Twitter.
    The Internet of Things is clearly many things: data collection and analytics, wearables, Smart Grids and Smart Cities, the Industrial Internet, and more. Cool platforms like Arduino, Raspberry Pi, Intel's Galileo and Edison, and a diverse world of sensors are making the IoT a great toy box for developers in all these areas. In this Power Panel at @ThingsExpo, moderated by Conference Chair Roger Strukhoff, panelists discussed what things are the most important, which will have the most profound e...
    SYS-CON Events announced today that T-Mobile will exhibit at SYS-CON's 20th International Cloud Expo®, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY. As America's Un-carrier, T-Mobile US, Inc., is redefining the way consumers and businesses buy wireless services through leading product and service innovation. The Company's advanced nationwide 4G LTE network delivers outstanding wireless experiences to 67.4 million customers who are unwilling to compromise on ...
    @ThingsExpo has been named the Most Influential ‘Smart Cities - IIoT' Account and @BigDataExpo has been named fourteenth by Right Relevance (RR), which provides curated information and intelligence on approximately 50,000 topics. In addition, Right Relevance provides an Insights offering that combines the above Topics and Influencers information with real time conversations to provide actionable intelligence with visualizations to enable decision making. The Insights service is applicable to eve...
    In his keynote at @ThingsExpo, Chris Matthieu, Director of IoT Engineering at Citrix and co-founder and CTO of Octoblu, focused on building an IoT platform and company. He provided a behind-the-scenes look at Octoblu’s platform, business, and pivots along the way (including the Citrix acquisition of Octoblu).
    SYS-CON Events announced today that Grape Up 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. Grape Up is a software company specializing in cloud native application development and professional services related to Cloud Foundry PaaS. With five expert teams that operate in various sectors of the market across the U.S. and Europe, Grape Up works with a variety of customers from emergi...
    With major technology companies and startups seriously embracing IoT strategies, now is the perfect time to attend @ThingsExpo 2016 in New York. Learn what is going on, contribute to the discussions, and ensure that your enterprise is as "IoT-Ready" as it can be! Internet of @ThingsExpo, taking place June 6-8, 2017, at the Javits Center in New York City, New York, is co-located with 20th Cloud Expo and will feature technical sessions from a rock star conference faculty and the leading industry p...
    Bert Loomis was a visionary. This general session will highlight how Bert Loomis and people like him inspire us to build great things with small inventions. In their general session at 19th Cloud Expo, Harold Hannon, Architect at IBM Bluemix, and Michael O'Neill, Strategic Business Development at Nvidia, discussed the accelerating pace of AI development and how IBM Cloud and NVIDIA are partnering to bring AI capabilities to "every day," on-demand. They also reviewed two "free infrastructure" pr...
    SYS-CON Events announced today that Hitachi, the leading provider the Internet of Things and Digital Transformation, will exhibit at SYS-CON's 20th International Cloud Expo®, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY. Hitachi Data Systems, a wholly owned subsidiary of Hitachi, Ltd., offers an integrated portfolio of services and solutions that enable digital transformation through enhanced data management, governance, mobility and analytics. We help globa...
    SYS-CON Events announced today that SoftLayer, an IBM Company, has been named “Gold Sponsor” of SYS-CON's 18th Cloud Expo, which will take place on June 7-9, 2016, at the Javits Center in New York, New York. SoftLayer, an IBM Company, provides cloud infrastructure as a service from a growing number of data centers and network points of presence around the world. SoftLayer’s customers range from Web startups to global enterprises.
    The buzz continues for cloud, data analytics and the Internet of Things (IoT) and their collective impact across all industries. But a new conversation is emerging - how do companies use industry disruption and technology enablers to lead in markets undergoing change, uncertainty and ambiguity? Organizations of all sizes need to evolve and transform, often under massive pressure, as industry lines blur and merge and traditional business models are assaulted and turned upside down. In this new da...
    SYS-CON Events announced today that Hitachi, the leading provider the Internet of Things and Digital Transformation, will exhibit at SYS-CON's 20th International Cloud Expo®, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY. Hitachi Data Systems, a wholly owned subsidiary of Hitachi, Ltd., offers an integrated portfolio of services and solutions that enable digital transformation through enhanced data management, governance, mobility and analytics. We help globa...
    20th Cloud Expo, taking place June 6-8, 2017, at the Javits Center in New York City, NY, will feature technical sessions from a rock star conference faculty and the leading industry players in the world. Cloud computing is now being embraced by a majority of enterprises of all sizes. Yesterday's debate about public vs. private has transformed into the reality of hybrid cloud: a recent survey shows that 74% of enterprises have a hybrid cloud strategy.