Transform XML to EDI X12 850 purchase orders and X12 850 to JSON
Transform XML to EDI X12 and EDI X12 to JSON
home
This example illustrates the below B2B/EDI integration use cases leveraging Anypoint X12 Connector:
- Transform XML messages into outbound EDI X12 850 purchase order.
- Transform inbound EDI X12 850 purchase orders into JSON, with a Functional acknowledgement (997) generated.
Setup the Example
- Open the Example project in Anypoint Studio from Anypoint Exchange.
- Install the latest version of Anypoint X12 connector
Run the Example
- Run the application in Anypoint Studio.
- Testing Outbound flow
- Using a REST Client, POST a JSON message to the URL: http://localhost:8081/x12/send/enterprise-ob-purchaseorder
- Payload: src/main/resources/outbound/Enterprise-Outbound-PO.xml
- The Mule app returns the generated EDI X12 850 transaction
- Using a REST Client, POST a JSON message to the URL: http://localhost:8081/x12/send/enterprise-ob-purchaseorder
- Testing Inbound flow
- Using a REST Client, POST a raw EDI X12 850 message message to the URL: http://localhost:8081/x12/receive/4010-850
- Payload: src/main/resources/inbound/EDI-4010-850-NTO-to-Mythical.edi
- The app returns the translated JSON purchase order message
- Functional Acknowledgement (997) is generated and printed in the log.
- It can be sent via any standard protocol such as FTP, SFTP or AS2 back to the trading partner.
- Using a REST Client, POST a raw EDI X12 850 message message to the URL: http://localhost:8081/x12/receive/4010-850