Question

I'd like to map the below ORDERS EDI message to xml using Smooks

UNB+UNOA:3+9313938000631:ZZ+9343015000575:ZZ+110210:0926+1++++1'UNH+1+ORDERS:D:01B:UN:EAN010'BGM+220+R-95300561X+9'DTM+137:20110210:102'DTM+2:20110211:102'NAD+BY+9313938000631::9'NAD+ST+9216GR::92'NAD+SU+963725::92'LIN+1++19300601396099:SRV'QTY+21:4'PRI+1E:5.412'UNS+S'MOA+86:21.648'CNT+2:1'UNT+14+1'UNZ+1+1'
  1. What should be the values for the (based on above message) segment, field, component and sub-component in smooks edimap config below?

    <medi:edimap xmlns:medi="http://www.milyn.org/schema/edi-message-mapping-1.0.xsd">
    <medi:description name="Purchase Order" version="1.0" /> <medi:delimiters segment=" " field="+" component="'" sub-component="~" />
    </medi:edimap>

  2. Where would I get a description of all the EDI Purchase Order fields with examples?

Thank you.

Was it helpful?

Solution

Answering my own question for the benefit of others.

  1. <medi:delimiters escape="?" component=":" sub-component="~" field="+" segment="'" />

  2. Found this website's EDIFACT tutorial a very good resource for beginners. After that I read the ORDERS spec here a good read. Specifically the segment table. Also, Smooks has a website available on GAE (http://edi-to-xml.appspot.com/) that allows your to parse and convert a edi message to xml.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top