Creation of custom EDI schema RRS feed

  • Question

  • Hello,


    I'm working on a project that involves creating custom EDI schemas.

    The standard for these schemas is Telebib2. This is a standard for insurance companies and is based on EDIFACT.

    We concluded that none of the existing EDIFACT schemas can be altered to match the Telebib2 standard. So we have to create them from scratch.

    But I'm having some issues with the creation of these schemas.


    In my schema I grouped some segments together in functional "loop blocks". (like in an edifact schema u use a NADLoop1).


    And in these "loop blocks" are segments and/or other "loop blocks". This to have some structure in my schema for mappings.


    Each "loop block" has to start with an XRH segment, and has to end with an XRT segment. (this is indicated in the specification of the Telebib2 standard).


    My problem is, that I get some errors when I try to validate an instance. (Even a generated instance)

    I get "Unexpected segment" errors on all segments after the first "loop block" that can occur multiple times. (if they can occur only once, there is no problem).


    I don't know if anyone has experience with creating custom EDI schemas from scratch?

    Are there conventions that I have to follow? And why do I get these errors?

    I tried a few things myself. But nothing works.

    My only guess is that BizTalk gets confused with al the XRH and XRT elements.


    Kind Regards

    Tim D'haeyer

    Wednesday, November 19, 2008 2:41 PM


  • I have some lessons learned when creating custom EDI schemas. Some of what I will say next is applicable to you and some is not.


    You will definitely need to change the schema namespace from the default one. It is possible to do this inside the BizTalk schema editor but this usually inflates the schema size dramatically and will often need to rewrite vast amounts of the schema to replace the namespace for each of the schema elements. You may be able to accomplish this easier outside the BizTalk schema editor.


    I would start with an existing one if at all possible because you do not have the advantage of knowing all of the attributes for the schemas that need to be entered. Since the EDI schema is basically an extension of Xml schema you will not have exhaustive documentation of all of the details in the file and may not be able to reconstruct the schema like if you had a previously created schema.


    I have also had some difficulty adding elements in a custom schema or moving the root of the schema to a different location so that you could wrap an EDI message in some other format. As far as I know all of this is still possible but you can run into odd errors along the way.


    As for your error, I would start with at least one of the EDIFACT schemas and then try to remove elements and then try to recreate your schema from here. Be sure to change the namespace. Also, ensure that the properties for the validate instance are set to validate using native mode.



    Thursday, November 20, 2008 6:44 PM