The XML2EDI component is used for transforming information from XML format to EDI format. This component accepts data in XML format and transforms it to the required EDI format. It uses Eagle library to do the transformation.
Configuration and Testing
Managed Connection Factory
The XML2EDI component can be configured using its Custom Property Sheet (CPS) wizard.
Figure 1: Managed Connection Factory panel
Attributes
EDI Document Type
Specify the EDI type of the document to be converted; choose from the options - Custom and UN/EDIFACT.
Custom
Format Schema
Click the Format Schema ellipses button and provide the EDI format schema to be used in the editor.
UN/EDIFACT
United Nations/Electronic Data Interchange for Administration, Commerce and Transport is the international standard that was developed by the United Nations.
Figure 2: Managed Connection Factory panel with the EDI Document Type "UN/EDIFACT"
UN/EDIFACT Document Version
Specify the UN/EDIFACT document version.
UN/EDIFACT Document Type
Specify the UN/EDIFACT document type. Refer to the possible document types at https://www.edibasics.com/edi-resources/document-standards/edifact/.
Connection Pool Params
Please refer to the respective section in the Common Configurations page.
Configuration can be tested in the Configuration Property Sheet (CPS) by clicking the Test button in the CPS panel.
Interaction Configurations
Figure 2: Interaction Configurations panel
Attributes
For descriptions of Expert properties given below and Monitoring Configuration, please refer the Interaction Configurations section in Common Configurations page:
- Pre Processing XSL Configuration
- Post Processing XSL Configuration
- Process Message Based On a Property
- Validate Input
- Cleanup Resources (excluding connection) after each input document
- TargetNamespace
Testing
Functionality can be tested from within the Configuration Property Sheet (CPS) by clicking the Test button in the Interaction Configurations panel.
Sample EDI format schema to be provided in Format Schema editor in the Managed Connection Factory panel:
Sample Schema
Click the Test button in the Interaction Configurations panel.Figure 3: Sample Schema
Sample Input
The XML appears in the Input Message.
Figure 4: Sample XML2EDI Input Message
Output
Click Execute to find the output "ABC~" as below.
Figure 5: XML2EDI output message
Scheduler Configuration
To schedule the component to execute a specific request at configured intervals of time.
Error Handling
To define the actions that have to be taken when an error occurs.
Functional Demonstration
Send a message in EDI format as defined in the Testing section and displaying the output XML message.
Configure the XML2EDI as described in the Testing section and use feeder and display component to send sample input and check the response respectively.
Figure 6: Demonstrating Scenario 1 with sample input and output
Sample Input
Provide the following XML in the Feeder window and click Send.
Figure 7: Sample input XML provided in the Feeder window
Output
Output "ABC~" appears the Display window as below.
Figure 6: Output appearing in the Display window