locked
Convert XML representation of EDI File Back To EDI RRS feed

  • Question

  • I need some help.

    I am receiving some EDI 837I files from a company.
    We have to load the EDI file, extract some information and store the information and the XML representation of the EDI file (BizTalk’s representation) in the database.

    After some processing and several files gathered, we have to get some XML files (based on specific criteria), convert them back to the EDI format, and send them out to another company so that more data processing can be done.
    When we started to receive the files, we were getting several “Invalid character in data element” errors on each file and none of the files would be picked up by the EDI pipeline. The errors were caused by the decimal  separator and decimal trailing zeros on some of the values.
    We configured a party and checked the “Allow leading and trailing zeroes and spaces” option in the EDI Properties and the files where processed without a problem.

    Last night I had to convert the XML files back EDI and none of the files is going through.
    We are getting the same error we were getting when trying to consume the EDI files, but the party we configured does not do anything to bypass the decimal issue when going from XML to EDI.

    The setup is like this:
    I have a receiving port configured to receive an XML file and use the XMLRecieve pipeline.
    I have a send port configure to listen to the receive port mentioned above and to place the file at another folder using the EdiSend pipeline.
    So we receive XML and produce EDI. I know this setup work since I am doing exactly the same thing for 837P files we are processing and I do not have a problem converting from XML to EDI at all; the difference being that the source 837P files did not have any decimal in any of the values.

    Am I  missing something here?
    Does the EDI processing options configured at the party level only affect EDI files but it won’t help if the file is an XML file?

    Any help will be greatly appreciated.

    Wednesday, September 30, 2009 7:20 PM

Answers

  • A simple approach may be creating another XML schema and perform some pre-processing on the decimal separator and decimal trailing zeros with a map before sending it to EDI port.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    • Marked as answer by jorge_c Tuesday, October 6, 2009 1:44 PM
    Tuesday, October 6, 2009 1:20 PM

All replies

  • The EDI party properties only come into play with the EdiSend and EdiReceive pipeline components. My guess is that the XmlReceive pipeline component does not know about the EDI party properties. You may have to modify the schema for the Xml so that the field with the decimal issue is a string and you do custom processing to workaround the decimal.

    Thanks,


    If this answers your question, please use the "Answer" button to say so | Ben Cline
    Thursday, October 1, 2009 4:21 AM
  • Hi,
        Is there any specific reason for using xmlReceive pipeline? Try to use passthruReceive pipeline If you want to convert xml to edi format.

    Or please provide the exact error message that Biztalk is throwing while receiving those files.



    Thanks
    Gyan
    If this answers your question, please mark it as "Answered".
    Thursday, October 1, 2009 4:37 AM
  • "The errors were caused by the decimal  separator and decimal trailing zeros on some of the values".

    First thing you have to use EDIReceive/EDISend pipeline.
    Are you using decimal as separator(field or record) in the party, if that is the case then I guess you would need to change the separator to any other symbol else the file will not get validated, because the decimal in some of the values (as you mentioned) will be treated as separator.

    Ajeet Kumar
    Thursday, October 1, 2009 10:08 AM
  • A simple approach may be creating another XML schema and perform some pre-processing on the decimal separator and decimal trailing zeros with a map before sending it to EDI port.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    • Marked as answer by jorge_c Tuesday, October 6, 2009 1:44 PM
    Tuesday, October 6, 2009 1:20 PM