글타래(쓰레드): How to parse an EDI file to xml on esb


Permlink 댓글: 4 - 페이지: 1 - 마지막 글: May 3, 2007 10:43 AM 최종 작성자: Dave Berry
user572503

글: 26
등록일: 07-05-02
How to parse an EDI file to xml on esb
게시일: May 2, 2007 7:14 AM
Click to report abuse...   이 글타래에 댓글을 올리려면 클릭하십시오 댓글
Hi all, I am still very new in this so I hope you guys can help me out. Ok so I got SOA suite installed pointed to my db. Now what I need to achieve is to design a esb service that basically parse an edi file to xml format.

I tested those adapters came with the suite namely file, ftp, jms, soap etc.. Those work great but none can solve the issue of converting an edifact file to a xml file so I search around for solution but there are so many things in oracle otn. I am so darn confused.

Can someone please help me step by step on what to download or install at the minimal to achieve my aim? thank you in advance
chriseb

글: 225
등록일: 99-05-27
Re: How to parse an EDI file to xml on esb
게시일: May 2, 2007 8:47 AM   user572503님의 질문에 답변 user572503님의 질문에 답변
Click to report abuse...   이 글타래에 댓글을 올리려면 클릭하십시오 댓글
Hi

It's been a long while since I looked at EDI, so I can't remember what it looks like. Can you post a short (10) lines of it so I can make a judgement?

It's likely that you'll have to write a native file format XSD to define a structure for the edifact file, possibly with different line types etc...

I've done something similar and it works OK.

Cheers

Chris
user572503

글: 26
등록일: 07-05-02
Re: How to parse an EDI file to xml on esb
게시일: May 2, 2007 7:52 PM   chriseb님의 질문에 답변 chriseb님의 질문에 답변
Click to report abuse...   이 글타래에 댓글을 올리려면 클릭하십시오 댓글
UNA:+.?
UNB+UNOC:1+2518496+781+070424:1132+1
UNH+00000001+IFTMIN:D:00B:UN:NA781
BGM+610+1627399::00+9
DTM+137:200704241132:203
FTX+AAI+++CIF MELBOURNE
FTX+AAI+++ORDER 4400002902
FTX+AAI+++USA ORIGIN
FTX+AAI+++CUST PO NO.1486
FTX+AAI+++*B/L TO BE TELEX-RELEASED
FTX+AAI+++*FUMIGATION IS REQUIRED
FTX+AIY+++LANXESS REQUIRED
LOC+7+:::AUSTRALIA
LOC+88+:::Singapore
RFF+ERN:LANXESS
RFF+BN:1627399
RFF+LC:NOT STATED. CONTACT USER
RFF+ON:4400002902
TDT+20++1++:::YCH Group
LOC+9+:::Singapore
NAD+SU++LANXESS PTE.LTD.:9 Benoi Sector:Singapore:629844
CTA+IC+:alice.see@lanxess.com
NAD+CN++OSMOSE AUSTRALIA PTY LTD :LEP INTERNATIONAL :175 EAGLE FARM ROAD :PINKENBA,QLD 4008 AUSTRALIA :
NAD+N1++OSMOSE AUSTRALIA PTY LTD :25 BUCKLEY GROVE :MOOLAP VIC 3221 :AUSTRALIA :
NAD+CZ+3+YCH Group:30 Tuas Road:Singapore:638492
NAD+SB+AU+AUSTRALIA ::::
NAD+VU+22+LANXESS
GID+001+1197.504:KGM
TMD+2
MOA+63:64665.22:EUR
FTX+LIN+++6017682
FTX+AAA+++PREVENTOL A8
FTX+AFF+++B/N K369004 1197.504
FTX+AFF+++GROSS WT 1257.504
FTX+PKG+++(48 X24.948) CARDBOARD BOX
MEA+AAE+G+KGM:1257.504
PCI++4400002902 :MELBOURNE
UNT+00036+00000001
UNZ+1+1
chriseb

글: 225
등록일: 99-05-27
Re: How to parse an EDI file to xml on esb
게시일: May 3, 2007 4:23 AM   user572503님의 질문에 답변 user572503님의 질문에 답변
Click to report abuse...   이 글타래에 댓글을 올리려면 클릭하십시오 댓글
Blimey, this is as complex as I remember.

The problem with flat files like these with different numbers of columns per row type is that the XSD you define will have a number of different types with a <choice> element surrounding them.

What I found is that this means that there can only be one of each. So, my XSD I had to manually change to look something like the following:

<xsd:element name="rows">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="row">
<xsd:complexType>

<xsd:choice minOccurs="1" maxOccurs="unbounded" nxsd:choiceCondition="terminated" nxsd:terminatedBy=",">

<xsd:element name="TYPE10" nxsd:conditionValue="10">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="FIELD02" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;"></xsd:element>
<xsd:element name="FIELD03" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;"></xsd:element>
<xsd:element name="FIELD04" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;"></xsd:element>
<xsd:element name="FIELD05" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;"></xsd:element>
<xsd:element name="FIELD06" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;"></xsd:element>
<xsd:element name="FIELD07" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy="&quot;"></xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>

<xsd:element name="TYPE11" nxsd:conditionValue="11">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="FIELD02" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;"></xsd:element>
<xsd:element name="FIELD03" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;"></xsd:element>

In My flat files, the first column is a number (10,11) etc, and the fields are terminated by a comma. As you can see you have to specify which field is the last column and therefore is terminated by a line feed.

If you google "edifact convert xml schema" there are a number of pages that refer to managing this process of flat file to XML conversion for the different document types. Doing it manually can be done, but it's going to be a bit of work....

Good luck!

Chris

Dave Berry

글: 303
등록일: 05-12-02
Re: How to parse an EDI file to xml on esb
게시일: May 3, 2007 10:43 AM   user572503님의 질문에 답변 user572503님의 질문에 답변
Click to report abuse...   이 글타래에 댓글을 올리려면 클릭하십시오 댓글
This is what the Oracle B2B component is for. See http://www.oracle.com/technology/products/integration/b2b/
포럼 도움말
oracle.statuslevel.guru oracle.statuslevel.guru : 2500 - 1000000 pts
oracle.statuslevel.expert oracle.statuslevel.expert : 1000 - 2499 pts
oracle.statuslevel.pro oracle.statuslevel.pro : 500 - 999 pts
oracle.statuslevel.journeyman oracle.statuslevel.journeyman : 200 - 499 pts
oracle.statuslevel.newbie oracle.statuslevel.newbie : 0 - 199 pts
oracle.statuslevel.acedirector
Oracle ACE
oracle.statuslevel.aceemployee
유용한 답변 (5 포인트)
정확한 답변 (10 포인트)

전체 포럼의 최신 메시지를 받아보시려면 RSS 리더의 URL을 이곳으로 지정하십시오