Using DataPower IDG Appliance as B2B gateway. Barebone sample of B2B gateway to process ebXML request.

Using DataPower IDG Appliance as B2B gateway. Barebone sample of B2B gateway to process ebXML request.

Electronic Business using eXtensible Markup Language, commonly known as e-business XML, or ebXML  is a family of XML based standards sponsored by OASIS and UN/CEFACT whose mission is to provide an open, XML-based infrastructure that enables the global use of electronic business information by all trading partners.

The ebXML work address the issues of older, EDI-based, standard way of exchanging data. It aims to simplify and decrease the cost of setting up the exchange of business transactions data while preserving standard compliance, interoperability, security, and consistent manner of exchanging data. ebXML replace EDI formats by XML and provide own interface and protocol.

In this chapter we will show how to use B2B functionalities of the DataPower Appliance in order to exchange the ebXML data between two partners.

Lets consider the simplified scenario with automotive dealer and maker.


Dealer uses Dealer's front-end in order to create purchase order. The dealer's backend creates the Purchase order in ebxml format.

?xml version="1.0" encoding="UTF-8"?>
<tns:PurchaseOrder xmlns:tns="">
      <tns:message>It is a bright sunny Friday here.</tns:message>
      <tns:message>Test Data DO NOT SHIP This is a test</tns:message>
      <tns:item sequence="1">
      <tns:item sequence="2">
      <tns:item sequence="3">

The order then gets submitted trough DataPower IDG B2B gateway to the Maker Information system. Maker information system receives the encrypted message from dealer trough DataPower IDG B2B gateway as well. It's to underline here that it can be any other compliant ebXML solution.

DataPower IDG B2B gateway ensure transactional character of the exchange, provides encryption, traceability and logging of the exchanged artifacts.

Let implement the schema here-above. In order to simplify the setup, let's create single domain DP_B2B_PROC_EBXML which is going to host both dealer's and maker's configuration.

The domain will host 2 business gateways. Because the data flow for this scenario is from Dealer to Maker we create OUTBOUNDB2BGATEWAY for Dealer and INBOUNDB2BGATEWAY for Maker.

Let's configure Dealer's B2B Gateway OUTBOUNDB2BGATEWAY.

The gateway can connect to internal backend using unencrypted connection, but in order to connect to the external third party over general purpose Internet connection it must do it in secured way.

For the connection from inside of the Dealer's network we may use variety of protocols. 

In order to simplify the scenario let use plain http. We configure HTTP front side handler listening on the 600003 tcp port.

Every B2B gateway must refer to two B2B Partner profiles : one internal B2B Partner profile and one external B2B Partner profile. Because dealer's information system is internal regarding OUTBOUNDB2BGATEWAY, and maker's information system is external,  we create INTERNAL_DEALER_PROFILE and EXTERNAL_MAKER_PROFILE to use with OUTBOUNDB2BGATEWAY.

Internal dealer profile configuration.

For our scenario the internal dealer profile configuration must have business id filled. We must use the business id value corresponding to the sender id from ebXML payload.

External maker profile configuration 

The partner id of the external maker profile must match the receiver id from ebXML documents:


The other parameter important for external profile is destination : 

Destination Name:	MAKER_FRONTEND (default)
Destination URL: ebms2://
Enabled Document Type: XML, X12, EDIFACT, Binary	 

It's time to proceed to the main B2B gateway configuration. Main tab:

On the XML Format tab we must configure routing policy :


For each of the fields we must provide the xpath to extract the mandatory values from the payload. The available Xpath tool can assist with coding when the sample of payload is available.

For our purchase order:

/*[namespace-uri()='' and local-name()='PurchaseOrder']/*[namespace-uri()='' and local-name()='senderID']

/*[namespace-uri()='' and local-name()='PurchaseOrder']/*[namespace-uri()='' and local-name()='receiverID']

/*[namespace-uri()='' and local-name()='PurchaseOrder']/*[namespace-uri()='' and local-name()='orderNumber']

/*[namespace-uri()='' and local-name()='PurchaseOrder']/*[namespace-uri()='' and local-name()='orderDate']

Now let's configure Maker's B2B Gateway INBOUNDB2BGATEWAY.

The inbound connection is supposed to arrive from other ebXML enabled host. Therefore we must configure the front side handler for ebms connection. We configure it to listen to 60001 port. 

The dealer's host is external regarding INBOUNDB2BGATEWAY and the maker's information system is, indeed, internal. Therefore the next step is to configure external Dealer profile EXTERNAL_DEALER_PROFILE.

For internal partner profile INTERNAL_MAKER_PROFILE the configuration looks like following :

The default destination on Destinations tab: 

Destination Name: MAKER_BACKEND (default)
Destination URL	:
Enabled Document Type: 	XML, X12, EDIFACT, Binary

Overall setup:

Testing the overall setup : 

In order to test overall setup we simulate maker backend implementing loopback XML firewall :

In order to simulate dealer's backend we use curl tool as follows : 

curl --data-binary @PurchaseOrder.xml  -H 'Content-type: text/xml'

The results can be seen and download trough B2B transaction viewer menu:

Leave a Reply

You must be logged in to post a comment.

iBudget    |   No More Money Falling Through Your Fingers        Home page
App store
Available on the iPhone
    Why Using Feedburner in Blogs Is So Important?