Using ebXML with Oracle B2B

Using ebXML with Oracle B2B

Gepubliceerd: Categorie: Oracle

[Deze blog is alleen in het Engels beschikbaar]

Doing business digitally is already a fact of life. More and more information is exchanged digitally between businesses (and consumers). In this article you will find out why and how to use the ebXML standard for exchanging information. We will use the ‘Oracle B2B’ product to showcase how to do it.

Doing business digitally

In this article we will cover:

  • What is ebXML?
  • Why use ebXML?
  • Who are using ebXML?
  • ebXML Messaging
  • Collaborative Partner Profile Agreement
  • How to set up ebXML integration in Oracle B2B

WHAT IS EBXML?

The standard describes a way “to provide an interoperable, secure and consistent manner to exchange business information electronically” [2]

So, basically ebXML is an XML based standard. It uses XML to describe stuff.

So what stuff can be described by this standard?

  • Business processes
  • Collaboration Protocol Agreements
  • Core data components
  • Messaging
  • Registries and repositories

So using XML we have a standard way of describing each of these 5 topics.

And this helps us “to provide an interoperable, secure, and consistent manner to exchange business information electronically”. [2]

We will only dive into the Messaging and Collaboration Protocol Agreement part of the ebXML standard. How to describe business processes, core data components and registries/repositories is out of scope.

WHY USE EBXML?

Basically: why use standards?

  • “One of my business partners are already using it for exchanging electronic information”
  • “Our company has the policy to adopt open standards whenever possible”
  • “We like to exchange information in a standardized way”
  • “To benefit from lessons learned and best practices from the industry”
  • “It is a widely used standard”
  • “There are a lot of products already supporting ebXML, no need to re-implement the wheel”

ebXML helps us to more easily achieve interoperability with other trading partners also supporting this standard.

So how does ebXML achieve this? Take for instance the old-school (analog) mail delivery, in which every analog letter is put in an envelope.

Something similar also applies to the digital world in which ebXML describes:

1. The shape and labeling of the envelope

  • The format of the address sticker
  • – From: partner X
  • – To: partner Y
  • – Action: ‘Create Invoice’
  • Where to include a message number
  • Where to include a message manifest: a description of the contents of the envelope

2. The delivery method

  • Which courier(s) to use (HTTP, SMTP, …)
  • If the recipient is not home, what to do?
  • – Resend the package one day later
  • – Resend it for 2 times before giving up
  • Should the recipient sign off the package (acknowledgement)?
  • How to seal the package (encryption)

Because there are a lot of products in the market already implementing ebXML we do not have to code this functionality ourselves. We only need to use and configure existing B2B software.

Such existing software will:

  • Add the proper envelope to our messages
  • Send the ebXML Acknowledgement when we receive a message
  • Handle retry policies, resending the message according to ebXML specifications
  • Implement the specified type of encryption
     

EBXML MESSAGE STRUCTURE

How do ebXML messages look like?

Schematically the ebXML standard describes the message format as depicted in figure 2.1.

It actually describes an ordinary SOAP with attachments MIME message. The SOAP envelope is extended with some additional ebXML elements.

See figure 2.2 for an example of an abbreviated ebXML message with 3 ‘payloads’. The first MIME part contains the SOAP envelope (=blue):

1. SOAP header: containing ebXML header information

  • From and to party
  • CPA ID (Collaboration ID)
  • Conversation ID
  • Action
  • Acknowledgement?

2. SOAP body: containing the ebXML manifest

  • References to all ebXML payloads belonging to this message

The second MIME part contains the first (business) payload (=green), containing an XML document.
The third MIME part contains a second (business) payload (=green), containing an XML document.
The fourth MIME part contains a third (business) payload (=pink). containing a PDF document.

  1. MIME-Version: 1.0
  2. Content-Type: Multipart/Related; boundary=------=_Part_5451_1231829516.1442492711877; type=text/xml; start="ebxheader-0A26229814FDB4403C5000006D2D04B1"
  3. Content-Description: This is the optional message description.
  4. ——=_Part_5451_1231829516.1442492711877
  5. Content-Type: text/xml;charset=UTF-8
  6. Content-ID: <ebxheader-0A26229814FDB4403C5000006D2D04B1>
  7. <?xml version=1.0″ encoding=”UTF-8?>
  8. <env:Envelope xmlns:env=”http://schemas.xmlsoap.org/soap/envelope/”>
  9. <env:Header>
  10. <eb:MessageHeader env:mustUnderstand=1″ eb:version=2.0>
  11. <eb:From>
  12. <eb:PartyId eb:type=”urn:ind:indigo”>OurCompany</eb:PartyId>
  13. <eb:Role>Partner</eb:Role>
  14. </eb:From>
  15. <eb:To>
  16. <eb:PartyId eb:type=”urn:nl:sometype”>TradingPartner</eb:PartyId>
  17. <eb:Role>Supplier</eb:Role>
  18. </eb:To>
  19. <eb:CPAId>OURCOMPANY-TRADINGPARTNER_OC-TP-02</eb:CPAId>
  20. <eb:ConversationId>2d333832373434353135393135323031</eb:ConversationId>
  21. <eb:Service>urn:InvoiceService</eb:Service>
  22. <eb:Action>CreateInvoiceRequest</eb:Action>
  23. <eb:MessageData>
  24. <eb:MessageId>2d333832373434353135393135323031</eb:MessageId>
  25. <eb:Timestamp>2015-09-17T12:25:09.869Z</eb:Timestamp>
  26. </eb:MessageData>
  27. <eb:DuplicateElimination/>
  28. </eb:MessageHeader>
  29. <eb:AckRequested eb2:id=”ID137206997″ eb2:signed=false” eb:version=2.0
  30. env:actor=”urn:oasis:names:tc:ebxml-msg:actor:toPartyMSH” env:mustUnderstand=1/>
  31. </env:Header>
  32. <env:Body>
  33. <eb:Manifest eb:id=”m6229814FDB44042D000006D2D04B2″ eb:version=2.0>
  34. <eb:Reference eb:id=”payloadref-229814F” xlink:href=”cid: 39000006D2D04B1″/>
  35. <eb:Reference eb:id=”payloadref-391233D” xlink:href=”cid: 39000006D2D04B2″/>
  36. <eb:Reference eb:id=”payloadref-511111A” xlink:href=”cid: 39000006D2D04B3″/>
  37. </eb:Manifest>
  38. </env:Body>
  39. </env:Envelope>
  40. ——=_Part_5451_1231829516.1442492711877
  41. Content-Type: application/xml
  42. Content-ID: <39000006D2D04B1>
  43. <?xml version=1.0″ encoding=”UTF-8?>
  44. <BusinessPayload1>
  45. </ BusinessPayload1>
  46. ——=_Part_5451_1231829516.1442492711877
  47. Content-Type: application/xml
  48. Content-ID: <39000006D2D04B2>
  49. <?xml version=1.0″ encoding=”UTF-8?>
  50. < BusinessPayload2>
  51. </ BusinessPayload2>
  52. ——=_Part_5451_1231829516.1442492711877–
  53. ——=_Part_5451_1231829516.1442492711877
  54. Content-Type: application/pdf
  55. Content-ID: <39000006D2D04B3>
  56. %PDF-1.4
  57. %��
  58. 5 0 obj
  59. <</Length 6 0 R/Filter /FlateDecode>>
  60. stream
  61. ?­TYkAf½¢ñH4ë�´v
  62. ——=_Part_5451_1231829516.1442492711877–

COLLABORATIVE PARTNER PROFILE AGREEMENT (CPPA)

Next to specifying the message format itself, ebXML also defines a standard way of describing what messages are exchanged, and how they are exchanged between trading partners.

CPPA is comprised of:

  • Collaboration Protocol Profile (CPP): “defines the capabilities of a Party to engage in electronic Business with other Parties”
  • Collaboration Protocol Agreement (CPA): intersection of two CPP’s. It basically describes what messages are exchanged, and how.

We’ll leave the CPP for now.

The CPA contains:

  • Info on Trading partner A
  • Info on Trading partner B
  • List of messages (capabilities) exchanged

In which Trading Partner info contains:

  • Party ID
  • Service URI (where to reach the trading partner)
  • Delivery channel
        - Transport: protocol HTTP/SMTP
        - Security: SSL, envelope signing
        - Document Exchange
               - Retries: 3
               - Retryinterval: 30 seconds

The CPA describes who is exchanging what message, using which delivery conditions.

For a good detailed and comprehensive overview on CPPA please check out the standard specification [6, 7]

WHO ARE USING EBXML?

Both private and public sector customers worldwide are using ebXML every day.

BMW, Volkswagen and T-Mobile. Governments all over the world, Canada, China, US, UK, and the Netherlands [4, 5].

ORACLE B2B SETUP

As mentioned earlier in this article there are a lot of products in the market already implementing ebXML. One of the products implementing the ebXML protocol is Oracle B2B. Oracle B2B can be configured to use ebXML by setting up the following entities:

  • Create a new ‘Custom Document’
  • Add Trading partner / or modify an existing one
  • – Add an ebMS Channel
  • – Add the new ‘Custom Document’ to the Document list of this Trading partner
  • Check the boxes for receiving and sending this document type
  • Set up Agreement between ourselves and this Trading Partner for this document
     

1. Create a new custom document

In the b2bconsole under administration you can add documents:

  • Add a new document type
  • Add a custom document definition
Figure: 5.1 Create a new document type, the ebMS parameters should match the ones in the CPA
Figure: 5.2 Create a new document definition for the document type defined above

2. Add/Modify Trading Partner and configure it for ebXML

In the b2bconsole in the Partners menu you can add / modify trading partners. When selecting a trading partner you can modify the ‘channels’ used by this partner.

  • Add a channel and select protocol ebMS-2.0 to enable us to communicate with this trading partner using ebXML.
  • We need to set up the endpoint, and optionally we can modify several delivery options concerning retry and encryption policy (see fig 5.3 5.4 and 5.5).
  • Add the newly defined document found at the ‘Documents Tab’ for this Trading Partner, and check the boxes for sending and receiving this document.
  • Add an ebMS identifier to the profile of the Trading Partner (see fig 5.6).
Figure: 5.3 Define Trading Partner Channel for ebMS-2.0
Figure: 5.4 Setting Channel attributes (retry interval, count, acknowledgement mode)
Figure: 5.5 Configure the required encryption
Figure: 5.6 Add ebMS Identifier for Trading Partner (can be found in CPA)

3. Set up Trading Partner agreement

Finally you have to set up an agreement for this Trading partner. In the b2bconsole navigate to the new Trading Partner and:

  • Add new agreement
               - Select the newly created document
               - Select the newly ebMS channel defined above
  • Save and deploy the agreement
Figure: 5.7 setting up a new agreement
Figure: 5.8 choosing the newly created channel for this trading partner

More explicit details for setting up Oracle B2B can be found in the resource list [8, 9].

RESOURCES:

1. ebXML 2.0 specification
2. Wikipedia: EbXML
3. OASIS ebXML Messaging Transport Binding for Digital Signature Services
4. ebxml.xml.org/deployments
5. logius.nl
6. Collaboration-Protocol Profile and Agreement Specification
7. CPA example
8. Oracle: Tutorial #002 ebXML Messaging (ebMS)
9. Oracle: Tutorial #003: Building ebXML messaging with Oracle B2B 11G

Richard Velden
Over auteur Richard Velden

Oracle Fusion Middleware Developer at Qualogy. Specializes in integration and cloud development using Oracle technologies such as: SOA Suite, Service Bus, Integration and Process Cloud.

Meer posts van Richard Velden
Reacties
Reactie plaatsen