Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Implementing EDI with WebSphere Partner Gateway V6.2, Part 1

Photo of Sonali Samantaray
Sonali Samantaray is a Software Engineer on the WebSphere Partner Gateway team at the IBM India Software Lab. She has a Masters Degree in Computer Applications and is an IBM Certified DB2 Associate and IBM Certified SOA Associate. Sonali has published technical documents for various symposiums as well as several IBM developerWorks articles. You can contact Sonali at sonali.samantaray@in.ibm.com.

Summary:  This article series explains Electronic Data Interchange (EDI) transformations using WebSphere Partner Gateway V6.2. Part 1 shows you how to implement two different EDI transformation and enveloping operations -- XML to EDI transformation, and record-oriented data (ROD) to EDI transformation.

Date:  14 Apr 2010
Level:  Intermediate

Activity:  3987 views
Comments:  

Introduction

The article describes two scenarios of transformation and enveloping in IBM® WebSphere® Partner Gateway V6.2. In Scenario 1, WebSphere Partner Gateway receives XML documents from an internal or external partner, transforms them into EDI transactions, envelops the transactions, and sends them to the internal or external partner. In Scenario 2, WebSphere Partner Gateway receives record-oriented data (ROD) documents from an internal or external partner, transforms the documents into EDI transactions, envelops the transactions, and sends them to the internal or external partner. (ROD documents are documents that conform to a proprietary format.)

WebSphere Partner Gateway supports the transformation, enveloping, and de-enveloping with the following EDI standards:

X12
Common EDI standard approved by the American National Standards Institute (ANSI)
UN/EDIFACT
United Nations Electronic Data Interchange for Administration Commerce and Support
UCS
Uniform Communication Standard

An EDI interchange envelope is a series of segments. EDI interchanges can contain three levels of segments, each with a header segment at the beginning and a trailer segment at the end:

Transaction envelope
A series of detailed segments that defines a transaction
Group envelope
A group of transactions of the same type
Interchange envelope
A number of groups destined for a particular trading partner

Each EDI standard provides its own method and its own segments for displaying the data within an interchange, as shown in the table below:

Table 1. Segment names for each EDI standard
EDI standardInterchange startInterchange endGroup startGroup endTransaction startTransaction end
EDI-X12ISAIEAGSGESTSE
EDIFACTUNBUNZUNGUNEUNHUNT
UCSBGEGGSGESTSE

EDI is a method used for transmitting business information over a network between business associates who agree to follow industry standards for translating or exchanging information. Maps are required to perform the translation tasks. This article shows you how to use transformation maps to transform a document from one format to another.

Maps can be created using the Data Interchange Services (DIS) client.

Prerequisites

  • WebSphere Partner Gateway V6.2 should be installed and running
  • Download samples.zip at the bottom of the article. It contains samples of maps and input files.

Scenario 1. XML to EDI document flow

This scenario involves translating an incoming XML file into an EDI transaction based on the mapping, enveloping the transaction in an EDI X12 ISA, and sending the output EDI to the target partner. Use the map compiledSDT-XML-EDI.eif and the input file Splitterxml2edi.xml.


Figure 1. XML to EDI document flow
XML to EDI document flow

Step 1. Importing the map

  1. Log into the WebSphere Partner Gateway Community Console.
  2. Navigate to Wizards => EIF Import Wizard.
  3. Click Browse and select compiledSDT-XML-EDI.eif from the file system.
  4. Click Import:

    Figure 2. Importing a map using EIF Import Wizard
     Importing a map using EIF Import Wizard

    After clicking Import, the next screen opens:

    Figure 3. Import summary screen
    Import summary screen

  5. Click Next to view the transaction that gets created with this map import:

    Figure 4. Default Interaction created
    Default Interaction created

  6. Click Next and then Finish:

    Figure 5. Import completion screen
    Import completion screen

Step 2. Verifying the map import

  1. Navigate to Hub admin => Hub configuration => Maps => Transformation maps. The transformation map S-DT-XML-TO-EDI should be listed.
  2. Click the View details icon to check the document definition at source and target side.

    Figure 6. Document definition from source to target
    Document definition from source to target

Step 3. Creating receiver

  1. Navigate to Hub Admin => Receivers.
  2. Click Create receiver.
  3. Specify the name of the Receiver, such as XMLtoEDIFileReceiver.
  4. For File directory, select Transport.
  5. Specify the Document root path, such as /XMLtoEDIFileReceiver.
  6. In the Handlers section, select Pre-process from the drop-down for Configuration point handlers.
  7. Select com.ibm.bcg.edi.receiver.preprocesshandler.XMLSplitterHandler from the Available list and add it to the Configured list.
  8. Click Save.

You can use this receiver for an EDI file containing multiple EDI envelopers. The XML splitter parses the document and creates the metadata that will be used by the document manager to extract the routing trading partner information.

Step 4. Creating partners

  1. Create an Internal partner with name Manager and Freeform id 01-111111111.
  2. Create an External partner with name Partner and Freeform id 01-222222222.
  3. Edit the input file Splitterxml2edi.xml to modify the Sender ID and Receiver ID as shown in below:

    Figure 7. Modifying Sender and Receiver IDs in the input XML file
    Modifying Sender and Receiver IDs in the input XML file

Step 5. Creating destinations

  1. Create destinations for both manager and partner by selecting File directory as the transport.

Step 6. Creating interactions

  1. Two interactions need to be configured for this flow -- one for the translation and enveloping, and another for the EDI document to be sent to the target destination.
  2. The transformation interaction was already created while importing the map. The XML document gets translated into EDI transactions through the "XML translate and Validate" action. The output transaction needs to be enveloped. Here, an envelope profile is used to define the envelope properties.
  3. Navigate to Hub Admin => Document Definition => Create interaction.
  4. Specify the following items to create an interaction to send the enveloped EDI message to the target destination:
    • Source
    • Package: N/A
    • Protocol: EDI-X12 (ALL)
    • Document flow: ISA (ALL)
    • Target:
    • Package: None
    • Protocol: EDI-X12 (ALL)
    • Document flow: ISA (ALL)
    • Action: Pass through

Step 7. Enabling B2B capabilities for the partners

  1. Enable the following Package, Protocol, and Document flow for Manager (Internal Partner):
    • Package: None
    • Protocol: FVT-XML-TEST (ALL)
    • Document flow: ICGCPO (ALL)
    • Package: N/A
    • Protocol: EDI-X12 (ALL)
    • Document flow: ISA (ALL)
    • Package: N/A
    • Protocol: MX12V3R1 (ALL)
    • Document flow: 850 (ALL)
  2. Enable the following Package, Protocol, and Document flow for Partner (External Partner):
    • Package: N/A
    • Protocol: Protocol: MX12V3R1 (ALL)
    • Document flow: 850 (ALL)
    • Package: None
    • Protocol: EDI-X12 (ALL)
    • Document flow: ISA (ALL)

Step 8. Creating envelope profile

  1. Navigate to Hub Admin => Hub Configuration => Envelope Profile.
  2. Click Create.
  3. Provide a name for the Envelope profile, such as EnvProfile.
  4. Select X12 as the EDI Standard.
  5. Click Save.

    Figure 8. Creating Enveloper profile
    Enveloper Profile

Step 9:Creating XML format

XML to EDI flow requires the XML format to be defined to determine the format of the XML to extract the attributes like Sender ID and Receiver ID.

  1. Navigate to Hub Admin => XML Formats.
  2. Click Create Document Family.
  3. Specify the Family name, such as DocFamily.
  4. Select the protocol FVT-XML-TEST ALL from the drop-down list.
  5. Select Family type as Root Tag.
  6. Provide MMDoc as the Family identifier.
  7. Click Save.
  8. Click Create XML Format.
  9. Provide the values as shown in Figures 9 and 10:
  10. Click Save:

    Figure 9. Document definition type criteria
    Document definition type criteria



    Figure 10. Document attributes
    Document attributes

Step 11. Enabling connections

  1. Navigate to Account Admin => Connections.
  2. Select Manager from Source drop down.
  3. Select Partner from Target drop down.
  4. The connections should be activated as shown below:

    Figure 11. Enabling partner connections
    Enabling partner connections

Step 12. Configuring connection attributes on target partner

For the Receiver ID: At the target partner of the EDI flow -- attributes at the participant connection for the target partner is used.

  1. Click Attributes for Target side in the connection for Protocol MX12V3R1.
  2. In the connection summary page, click Protocol.
  3. Locate the Envelope profile attribute and select EnvProfile from the dropdown.
  4. Locate the Business identifier (EDI Interchange Qualifier) and provide the value 01.
  5. Locate the Business identifier (EDI Interchange Identifier) and provide the value 222222222.
  6. Locate the Interchange usage indicator and provide the value T.
  7. Click Save.

Step 13. Configuring B2B capabilities attributes on source partner (Manager)

For the Sender ID: At the source partner of the EDI flow -- the attributes at the participant connection for the source partner is not for the generated EDI envelope -- therefore the source ID is specified at the source trading partner's B2B capabilities.

  1. Navigate to Manager's B2B capabilities.
  2. Click edit icon for MX12V3R1 protocol.
  3. Locate the Envelope Profile attribute and select EnvProfile from the dropdown.
  4. Locate the Business Identifier (EDI Interchange Qualifier) and provide the value 01.
  5. Locate the Business Identifier (EDI Interchange Identifier) and provide the value 111111111.
  6. Locate the Interchange usage indicator and provide the value T.
  7. Click Save.

Step 14. Running the scenario

  1. Copy the input file Splitterxml2edi.xml to the XMLtoEDIFileReceiver/Documents/Production folder.
  2. Navigate to Viewers => Document Viewer to check the document status.
  3. The XML should be should be translated to 850 transaction.
  4. The enveloped document is send to the Partner's file destination.
  5. The output transactions are shown below:

    Figure 12. Transactions in the Document viewer
    Transactions in the Document viewer

Scenario 2. ROD to EDI document flow

This scenario involves an incoming ROD document to be translated to an EDI transaction based on the mapping, and then the transaction to be enveloped in an EDIX12 ISA. The output EDI is then sent to the target partner.


Figure 13. ROD to EDI document flow
ROD to EDI document flow

Map to be used: compliledADF-EDI.eif, Input file: adf2edi.inp

Step 1. Importing the map

Import compliledADF-EDI.eif map using the EIF Import wizard following the procedure in Step 1 of Scenario 1.


Figure14. Map Import Completion Screen
Map Import Completion Screen

Step 2. Checking the map import

Refer to the procedure described in Step 2 of Scenario 1 to verify that compliledADF-EDI.eif is listed and the document definition is created.

Step 3. Creating receiver

  1. Navigate to Hub Admin => Receivers.
  2. Click Create Receiver.
  3. Specify the name of the Receiver, such as RODtoEDIFileReceiver.
  4. Select Transport as File directory.
  5. Specify the Document Root Path, such as /RODtoEDIFileReceiver.
  6. Select Pre-process from the drop down for Configuration Point Handlers in the Handlers section.
  7. Select com.ibm.bcg.edi.receiver.preprocesshandler.RODSplitterHandler from Available list and add to the Configured list.
  8. Select com.ibm.bcg.edi.receiver.preprocesshandler.RODSplitterHandler handler in the Configured list and Click Configure.
  9. Provide the values as shown in Figure 15 below and Click SetValues.
  10. Click Save in the receiver creation page.

    Figure 15. Configuring the ROD Splitter Handler
    Configuring the ROD Splitter Handler

Step 4. Creating partners

The partners created in Scenario 1, Step 4 can be reused for this scenario, or new participants can be created. For simplicity, this article reuses the partners created in Scenario 1. Edit the input file adf2edi.inp to modify the Sender and Receiver IDs as shown below:


Figure 16. Modifying the Sender ID Receiver IDs in the input ROD file
Modifying the Sender ID Receiver IDs in the input ROD file

Step 5. Creating destinations

Create destinations for both Manager and Partner by selecting File directory as the transport. The destinations created in Scenario 1 can be reused for this step.

Step 6. Creating interactions

For the ROD to EDI Scenario, two interactions need to be created. One interaction transforms the ROD to EDI 850 message and envelopes it, and the second one corresponds to sending the enveloped EDI message to the Target Partner. The first interaction gets created when the transformation map is imported. The second interaction is already created in Step 6 of Scenario 1.

Step 7. Enabling B2B capabilities for the partners

  1. Enable the following Package, Protocol, and Document flow for Manager (Internal Partner):
    • Package: None
    • Protocol: ADF-TO-EDI_DICT (ALL)
    • Document flow: DTADF-TO-EDI_ADF (ALL)
    • Package: N/A
    • Protocol: EDI-X12 (ALL)
    • Document flow: ISA (ALL)
  2. Enable the following Package, Protocol, and Document Flow for Partner (External Partner):
    • Package: N/A
    • Protocol: Protocol: X12V2R1 (ALL)
    • Document flow: 850 (ALL)
    • Package: None
    • Protocol: EDI-X12 (ALL)
    • Document flow: ISA (ALL)

Step 8. Create envelope profile

The envelope profile EnvProfile created in Scenario 1 can be reused.

Step 9. Enabling connections

  1. Navigate to Account Admin => Connections.
  2. Select Manager from Source drop down.
  3. Select Partner from Target drop down.
  4. The connections should be activated as shown below:.

    Figure 17. Activating partner connections
    Partner connections

Step 10. Configuring the attributes

For the EDI 850 message to be enveloped, you must configure some attributes, as described below:

  1. Navigate to Account admin => Search => Partner (Target Partner) => B2B Capabilities.
  2. Expand Package N/A.
  3. Click edit icon next to Protocol : X12V2R1 (ALL).
  4. Locate the Envelope Profile> attribute and select EnvProfile from the dropdown.
  5. Locate the Business Identifier (EDI Interchange Qualifier) and provide the value 01.
  6. Locate the Business Identifier (EDI Interchange Identifier) and provide the value 111111111.
  7. Locate the Interchange usage indicator and provide the value T.
  8. Click the Validation tab.
  9. Locate the attributes Max validation error level and Validation level. Select 2 from the drop-down for both of these attributes.
  10. Click Save.

Step 11. Running the scenario

  1. Copy the input file adf2edi.inp to the RODtoEDIFileReceiver/Documents/Production folder.
  2. Navigate to Viewers => Document Viewer to check the document status. The ROD should be should be translated to 850 transaction.
  3. The enveloped document is send to the Partner's file destination. The output transactions are shown below:

    Figure 18. Transactions in Document Viewer
    Transactions in Document Viewer

Conclusion

This article explained two scenarios for transformation and enveloping in WebSphere Partner Gateway V6.2: XML to EDI transformation, and ROD to EDI transformation.



Download

DescriptionNameSizeDownload method
Code samplesamples.zip.zip16 KBHTTP

Information about download methods


Resources

About the author

Photo of Sonali Samantaray

Sonali Samantaray is a Software Engineer on the WebSphere Partner Gateway team at the IBM India Software Lab. She has a Masters Degree in Computer Applications and is an IBM Certified DB2 Associate and IBM Certified SOA Associate. Sonali has published technical documents for various symposiums as well as several IBM developerWorks articles. You can contact Sonali at sonali.samantaray@in.ibm.com.

Report abuse help

Report abuse

Thank you. This entry has been flagged for moderator attention.


Report abuse help

Report abuse

Report abuse submission failed. Please try again later.


developerWorks: Sign in


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

Choose your display name

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


Rate this article

Comments

Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=WebSphere
ArticleID=482496
ArticleTitle=Implementing EDI with WebSphere Partner Gateway V6.2, Part 1
publish-date=04142010
author1-email=sonali.samantaray@in.ibm.com
author1-email-cc=

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

For articles in technology zones (such as Java technology, Linux, Open source, XML), Popular tags shows the top tags for all technology zones. For articles in product zones (such as Info Mgmt, Rational, WebSphere), Popular tags shows the top tags for just that product zone.

For articles in technology zones (such as Java technology, Linux, Open source, XML), My tags shows your tags for all technology zones. For articles in product zones (such as Info Mgmt, Rational, WebSphere), My tags shows your tags for just that product zone.

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Try IBM PureSystems. No charge.

Special offers