none
How to add a new EDI schema ? RRS feed

  • Question

  • Hi,

    I've created the new edi schema PNRGOV because it doesn't exist in the current list of EDI schemas provided by Microsoft for Biztalk. Then I used it to map from a file I received to this new EDI schema and I created a new solution with a send port whose pipeline is an EDISendpipeline.

    I've got that error: 

    There was a failure executing the send pipeline: "Microsoft.BizTalk.Edi.DefaultPipelines.EdiSend, Microsoft.BizTalk.Edi.EdiPipelines, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Source: "EDI Assembler" Send Port: "Snd_PNRGOV" URI: "...\Out\%MessageID%.xml" Reason: Message can not be serialized as the schema http://schemas.microsoft.com/BizTalk/EDI/EDIFACT/2006#EFACT_D13_PNRGOV could not be located. Either the schema is not deployed or multiple copies are deployed.

    I've checked and that schema is well deployed and there are no multiple copies of it.

    If I modify the send  pipeline in the send port for an XML transmit pipeline, I have no error. So, the problem comes from the edi send pipeline which doesn't find my schema.

    Does someone know how to add a new edi schema or know how to fix this problem?

    Thank you

    Monday, January 11, 2016 5:59 PM

Answers

  • Ok. I’ve done different tests and I’ve found that if I fix the issue with error depth for my new EDI schema, it fixes the problem.

    I explain.

     

    For my Edi schema I have a depth > 3 (I think it is a value default for lookahead_depth parameter for Biztalk EDI schemas). So, when I modify the properties of the schema “Schema Editor Extensions” to  “EDI schema Extension” in Visual Studio,

      

    I have the errors: Node has an invalid depth of 4...

     

    I decided to modify our EDI schema not so as to exceed the depth of 3. And it works. No error. My Biztalk solution generates an EDIFACT file J

    So, fixing this depth issue will fix our problem.

    Do you know how to allow a depth > 3.  As explained before I tried to add the parameter lookahead_depth but it doesn’t work.


    • Edited by Belou Tuesday, January 19, 2016 10:27 AM
    • Proposed as answer by Angie Xu Monday, January 25, 2016 3:10 AM
    • Marked as answer by Angie Xu Monday, January 25, 2016 3:10 AM
    Tuesday, January 19, 2016 10:25 AM

All replies

  • Hi Belou,

    Thank you for posting in MSDN forum.

    Have you Check in Applications--> Add Artifacts --> Schemas ??

    And Please have a look into below MSDN article to create custom EDI schema,

    Creating Custom EDI Schemas

    Thanks,

    If my reply is helpful please mark as Answer or vote as Helpful.

    My blog | Twitter | LinkedIn

    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

    Monday, January 11, 2016 6:13 PM
  • Hello,

    Have you unzip MicrosoftEdiXSDTemplates.exe in the Microsoft BizTalk Server 20XX\XSD_Schema\EDI folder?

    After you unzip above file, you can select one of the schema to your project and changed the nodes accordingly. You must change the targetNamespace to something local to your application/organization.

    Modify to suit your needs.

    You will then need to create Parties and an Agreement where you list you custom Namespace on the Local Host Settings page.

    Refer the earlier discussion on similar requirement: custom EDI Schema in BizTalk 2009

    Using custom schema for BizTalk EDI

    Monday, January 11, 2016 6:49 PM
    Moderator
  • Unfortunately, there is no way to add fully custom EDI transactions, EDIFACT or X12.  Some of the lists are baked into the various components.

    But, you can still do it by overriding at the edge.  It's easier for sending.

    Instead of naming the schema PNRGOV, use one of the existing types that at least close, like PAXLST.  Then, in either an Orchestration or custom Pipeline Component, use the EDIOverride properties to override the serialization to the output says PNRGOV, etc.

    Monday, January 11, 2016 8:36 PM
  • Hi Kamlesh,

    Yes, I checked in ALL Artifacts and my schema is there.

    I've already looked at the MSDN article. The problem is it is for Biztalk server 2004 or 2006. Those versions were using  a third party for EDI (Covast) and I don't have "Supported Document Types" category described in the article for the ports.

    I mean

    "For EDI send ports, do the following:

    1. Navigate to the EDI Transport Properties window.
    2. In the "Supported Document Types" category:

      1. Set the "Accept all unlisted documents" option to Yes.
      2. Select the appropriate envelope for the "Default EDIFACT format version" option.
      3. Select the appropriate envelope for the "Default X12 format version" option."

    Thanks

    Tuesday, January 12, 2016 11:12 AM
  • Hi Rachit,

    No, it doesn't work.

    Same error with my custom namespace instead of http://schemas.microsoft.com/BizTalk/EDI/EDIFACT/2006#EFACT_D13_PNRGOV

    Thanks

    Tuesday, January 12, 2016 11:36 AM
  • To reiterate:

    Unfortunately, there is no way to add fully custom EDI transactions, EDIFACT or X12.  Some of the lists are baked into the various components.

    But, you can still do it by overriding at the edge.  It's easier for sending.

    Instead of naming the schema PNRGOV, use one of the existing types that at least close, like PAXLST.  Then, in either an Orchestration or custom Pipeline Component, use the EDIOverride properties to override the serialization to the output says PNRGOV, etc.


    • Proposed as answer by [Kamlesh Kumar] Wednesday, January 13, 2016 6:40 AM
    • Unproposed as answer by [Kamlesh Kumar] Saturday, January 16, 2016 8:56 AM
    Tuesday, January 12, 2016 1:38 PM
  • Hi John,

    I try and I come back to you.

    Thanks

    Wednesday, January 13, 2016 1:17 PM
  • Hi John,

    The EDI values you can override in the context are the values for the EDI envelope and in the envelope you don't have the name of the document type. In this case, it is PNRGOV. So, it doesn't help.

    I think the problem can be resolved if I put the right information for the EDI schema. 

    So,  I modified my EDI schema information for the information of a PAXLST document. I mean namespace, version, root reference... and I put the schema property: Schema editor Extensions= EDI Schema Editor Extension but I have the error:  "Node has an invalid depth of ...."

    Wednesday, January 13, 2016 3:20 PM
  • Oh...right, UNH02 is not in the override list, neither is ST01...:(

    You might have to fallback to a custom Pipeline Component to change the tx type yourself.

    Wednesday, January 13, 2016 4:10 PM
  • Yes, but I still have the error on my EDI Schema when I use the schema property: Schema editor Extensions= EDI Schema Editor Extension.

     "Node has an invalid depth of 6"

    I added the value lookahead_depth="8" in the appinfo area but it doesn't  work.

    Thursday, January 14, 2016 3:52 PM
  • Ok. I’ve done different tests and I’ve found that if I fix the issue with error depth for my new EDI schema, it fixes the problem.

    I explain.

     

    For my Edi schema I have a depth > 3 (I think it is a value default for lookahead_depth parameter for Biztalk EDI schemas). So, when I modify the properties of the schema “Schema Editor Extensions” to  “EDI schema Extension” in Visual Studio,

      

    I have the errors: Node has an invalid depth of 4...

     

    I decided to modify our EDI schema not so as to exceed the depth of 3. And it works. No error. My Biztalk solution generates an EDIFACT file J

    So, fixing this depth issue will fix our problem.

    Do you know how to allow a depth > 3.  As explained before I tried to add the parameter lookahead_depth but it doesn’t work.


    • Edited by Belou Tuesday, January 19, 2016 10:27 AM
    • Proposed as answer by Angie Xu Monday, January 25, 2016 3:10 AM
    • Marked as answer by Angie Xu Monday, January 25, 2016 3:10 AM
    Tuesday, January 19, 2016 10:25 AM