none
Simple convert EDIFACT to XML RRS feed

  • Question

  • Hi
    I am beginner with BizTalk development. I done one very easy testing project - only receive XML, remap and Store new XML. But now Iam facing to one bigger problem. I want load message in EDIFACT standard and convert it to XML. Simply i need to load something like this:

    UNA:+.? '
    UNB+UNOC:3+3013558310009:14+8713432000006:14+060914:0721+00000000000001++ORDERS++++1'
    UNH+00000000000001+ORDERS:D:97A:UN'
    BGM+220+4500149097+9'
    DTM+137:20070726:102'
    DTM+2:20070727:102'
    RFF+ON:4500149097'
    NAD+BY+3013558310009::9'
    NAD+DP+8713432000006::9'
    NAD+IV+3013558310009::9'
    NAD+SU+8901124000018::9'
    CUX+2:EUR:4'
    LIN+1++4901780697809:EN'
    QTY+21:10000CE'
    LIN+2++4901780791255:EN'
    QTY+21:10000CE'
    LIN+3++4901780883264:EN'
    QTY+21:10000CE'
    LIN+4++4901780728619:EN'
    QTY+21:10002CE'
    LIN+5++4901780627363:EN'
    QTY+21:10000CE'
    LIN+6++4901780697809:EN'
    QTY+21:10000CE'
    LIN+7++4901780791255:EN'
    QTY+21:10000CE'
    UNS+S'
    UNT+33+00000000000001'
    UNZ+1+00000000000001'

    and i want receive XML file.

    So i tryed to solve it myself. I create Receive Pipeline with EDI disassembler in Disassemble section and Orchestration which only gets Message and same message send to Send Port. But when i send EDIFACT message to BizTalk i get the same message back. Can anyone help me? How can I convert EDIFACT to XML? Thanks much :-)



    Michal Straka
    Tuesday, December 16, 2008 1:23 PM

Answers

  • Hi Michal,


    Not sure if this will work. But I can´t find the link that explains the right steps...

    Create a copy of the Orders schema. Change the root note and Type Name (Select the schema file to find the Type name option) to EFACT_D96A_ORDERS_EAN008 and deploy the new schema to the BizTalk server.

    Best regards

    Rasmus Jaeger

    • Marked as answer by edhickey Tuesday, December 23, 2008 9:56 PM
    Wednesday, December 17, 2008 1:39 PM

All replies

  • Hi Michal

    I haven't actually done much EDI recently, but I believe that normally the EDI disassembler (like most others) will convert the message to an Xml representation of the EDI flat file format. 

    If you're using EDI Assembler on the send port it would convert it to flat file format again. 

    To confirm how the message leaves the receive pipeline stop your orchestration (do not unenlist it, just stop it) and drop a file in. 
    you will get the suspended item due to the orchestration's stopped state and you can then view the message in the suspended instance to verify that it is, hopefully, indeed xml. 
    you can then start the orchestration again and see the output message; make sure the send pipeline is passthrough and you should get it in Xml format as well.

    Let me know if this is not the case (on this forum)

    Yossi Dahan | [To help others please mark replies as answers if you found them helpful]
    Tuesday, December 16, 2008 2:19 PM
  • Hi Yossi,
    Thank you very much for your reply.

    For Send Port i use PassThruTransmit, so there aren't ant EDI assembler, isn't it?

    But i done a mistake - I set PassThruTransmit also for Receive Pipeline so its't the reason why output files are the same as source files. Now I set it correctly, but I'am facing to another error:

    Fatal error encountered in EDI Disassembler, error information is: Edifact service schema not found

    Do you have some tips for me?
    Thanks

    Michal Straka
    Tuesday, December 16, 2008 3:08 PM
  • Michal, 

    Glad you found the solution ...

    As I've said - haven't used EDI for a long while now, but searching [EDI "Service Schema" Biztalk] returned a bunch of results.
    for example - see step 2 on this post

    Yossi Dahan | [To help others please mark replies as answers if you found them helpful]
    Tuesday, December 16, 2008 3:17 PM
  • Hi,
    thank you very much.
    I configure EDI Runtime on my BizTalk server and now I'am facing to another error:

    Error encountered during parsing. The Edifact transaction set with id '' contained in interchange (without group) with id '00000000000001', with sender id '3013558310009', receiver id '8713432000006' is being suspended with following errors:

    Error: 1 (Miscellaneous error)
        502: Document spec type http://schemas.microsoft.com/BizTalk/EDI/EDIFACT/2006#EFACT_97AUN_ORDERS not found

    Error: 2 (Miscellaneous error)
        70: Missing or invalid Transaction set identifier

    Error: 3 (Miscellaneous error)
        71: Transaction Set or Group Control Number Mismatch

    Error: 4 (Miscellaneous error)
        29: Invalid count specified at interchange, group or message level


    Michal Straka
    Wednesday, December 17, 2008 9:18 AM
  • Hi Michal,

    Under your <BizTalk installation folder>/XSD_Schema/EDI run the MicrosoftEdiXSDTemplates.exe file. (To extract the file, you will need 4,2 gb of free space.)
    It contains the EDIFACT schemas you need. 
    Deploy the EFACT_97A_ORDERS schema (located in the folder EDI/EDIFACT/D97A) to your BizTalk server and create a new Party with receiver id 8713432000006.

    Create a receive port + location that uses the EDIReceive pipeline and add a send port which subscribes to the receive port. The send port doesn’t need any pipeline, just use passThruTransmit.

    This will give you a XML version of the EDIFACT message.

    Best regards

    Rasmus Jaeger

    Wednesday, December 17, 2008 12:41 PM
  • Hi, thank you very much, but now, I'am facing to another error in other project

    Error: 1 (Miscellaneous error)
        502: Document spec type http://schemas.microsoft.com/BizTalk/EDI/EDIFACT/2006#EFACT_D96A_ORDERS_EAN008 not found

    There is only EFACT_D96A_ORDERS in extracted folder and i need EFACT_D96A_ORDERS_EAN008. What should i do now?

    Michal Straka
    Wednesday, December 17, 2008 1:04 PM
  • Hi Michal,


    Not sure if this will work. But I can´t find the link that explains the right steps...

    Create a copy of the Orders schema. Change the root note and Type Name (Select the schema file to find the Type name option) to EFACT_D96A_ORDERS_EAN008 and deploy the new schema to the BizTalk server.

    Best regards

    Rasmus Jaeger

    • Marked as answer by edhickey Tuesday, December 23, 2008 9:56 PM
    Wednesday, December 17, 2008 1:39 PM
  • Hi,
    thank, I try it and it works. But i must use my Receive Pipeline and set EDI Validation to 'False' otherwise EDI diassembler throws errors, because some segments are not-valid. Now I don't know if EFACT_D96A_ORDERS_EAN008 shema is the same as EFACT_D96A_ORDERS. If the shemas are same the message is invalid on customer side, otherwise if shemas are different I must use the right shema and check validation of the message.

    Michal Straka
    Wednesday, December 17, 2008 1:53 PM