none
EDI parsing error RRS feed

  • Question

  • I am getting following error when I am trying to test EDI file in biztalk. Only change I made in XSD is customize the namespace.I am not able to find out what is exact problem , please help me as I spend one complete day but could not find exact issue.

    Error 6 Native Parsing Error: Non Segment level  : [5] X12_00401_850\ST\ The element 'ST' in namespace 'http://schemas.microsoft.com/BizTalk/EDI850IN/X12/2006' has invalid child element 'ST01'. List of possible elements expected: 'http://schemas.microsoft.com/BizTalk/EDI850IN/X12/2006:ST01'.
    C:\File_IN\customer\850\Maptest\sample850.txt 1 1
    Error 7 Native Parsing Error: Non Segment level  : [5] X12_00401_850\BEG\ The element 'BEG' in namespace 'http://schemas.microsoft.com/BizTalk/EDI850IN/X12/2006' has invalid child element 'BEG01'. List of possible elements expected: 'http://schemas.microsoft.com/BizTalk/EDI850IN/X12/2006:BEG01'.
    C:\File_IN\customer\850\Maptest\sample850.txt 1 1
    Error 8 Native Parsing Error: Non Segment level  : [5] X12_00401_850\CUR\ The element 'CUR' in namespace 'http://schemas.microsoft.com/BizTalk/EDI850IN/X12/2006' has invalid child element 'CUR01'. List of possible elements expected: 'http://schemas.microsoft.com/BizTalk/EDI850IN/X12/2006:CUR01'.
    C:\File_IN\customer\850\Maptest\sample850.txt 1 1
    Error 9 Native Parsing Error: Non Segment level  : [5] X12_00401_850\REF\ The element 'REF' in namespace 'http://schemas.microsoft.com/BizTalk/EDI850IN/X12/2006' has invalid child element 'REF01'. List of possible elements expected: 'http://schemas.microsoft.com/BizTalk/EDI850IN/X12/2006:REF01'.
    C:\File_IN\customer\850\Maptest\sample850.txt 1 1

    XSD I modified as below 

    <?xml version="1.0" encoding="utf-16" ?>
    - <xs:schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003" xmlns="http://schemas.microsoft.com/BizTalk/EDI850IN/X12/2006" xmlns:btsedi="http://schemas.microsoft.com/BizTalk/2005/EdiSchemaEditorExtension" elementFormDefault="qualified" targetNamespace="http://schemas.microsoft.com/BizTalk/EDI850IN/X12/2006" version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    - <xs:annotation>
    - <xs:appinfo>
    <schemaEditorExtension:schemaInfo namespaceAlias="btsedi" extensionClass="Microsoft.BizTalk.Edi.SchemaEditorExtension.EdiSchemaExtension" standardName="EDI" xmlns:schemaEditorExtension="http://schemas.microsoft.com/BizTalk/2003/SchemaEditorExtensions" />
    <b:schemaInfo version="1.0" document_type="850" standard="EDI" standards_version="00401" root_reference="X12_00401_850" displayroot_reference="X12_00401_850" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" X12ConditionDesignator_Check="No" />
    </xs:appinfo>
    </xs:annotation>
    - <xs:annotation>
    <xs:documentation xml:lang="en">copyright © Microsoft Corporation. All rights reserved.</xs:documentation>
    </xs:annotation>

    -<xs:annotation>

    Please help me to understand this error

    E


    Tuesday, August 23, 2016 5:24 PM

Answers

  • First, you should use a namespace you clearly own like: http://MyCompany/MyApp

    The namespace change took, you can see that in the error messages.  Did you maybe change the Form Default setting by accident?

    • Marked as answer by dnyanbhar Tuesday, August 23, 2016 8:24 PM
    Tuesday, August 23, 2016 5:39 PM
    Moderator
  • OK. The file looks good.

    I still think your issue is related to EDI not resolving the schema correctly, even though it shows the schema correctly in the error message. 

    It is clear to me that the error message is not reliable, as it states the same namespace on both end of the error statement:

    Error 6  Native Parsing Error: Non Segment level  : [5] X12_00401_850\ST\ The element 'ST' in namespace 'http://schemas.microsoft.com/BizTalk/EDI850IN/X12/2006' has invalid child element 'ST01'. List of possible elements expected: 'http://schemas.microsoft.com/BizTalk/EDI850IN/X12/2006:ST01'.
    C:\File_IN\customer\850\Maptest\sample850.txt

    I don't mind continuing to help you troubleshoot this though. Maybe at some point we will need to change that namespace to something completely adverse, like the name of your company like boatseller said, just to remove ambiguity , but lets try a few things first.

    This may seem incoherent, but humor me please: Put xmlns back to its original content, http://schemas.microsoft.com/BizTalk/EDI/X12/2006, regac and retry please. If using VS, please close and reopen it. If using BTS, re-add the resource. Leave your target namespace as it is, just rollback the xmlns attribute of <xs:schema>


    My Technet Articles

    If you like this or another reply, vote it up!
    If you think this or another reply answers the original question, mark it or propose it as an answer.


    Mauricio Feijo
    www.mauriciofeijo.com


    • Edited by Mauricio Feijo Tuesday, August 23, 2016 7:46 PM
    • Marked as answer by dnyanbhar Tuesday, August 23, 2016 8:23 PM
    Tuesday, August 23, 2016 7:45 PM

All replies

  • First, you should use a namespace you clearly own like: http://MyCompany/MyApp

    The namespace change took, you can see that in the error messages.  Did you maybe change the Form Default setting by accident?

    • Marked as answer by dnyanbhar Tuesday, August 23, 2016 8:24 PM
    Tuesday, August 23, 2016 5:39 PM
    Moderator
  • I use namespace as 'http://schemas.microsoft.com/BizTalk/EDI850IN/X12/2006 and I can see in all error message.

    BTW what is Form default setting and where it is ?

    Tuesday, August 23, 2016 5:42 PM

  • This looks to me like it could be a GAC issue. Did you regac the schema assembly after you made your changes?

    You would need to :

    • remove the old assembly from the gac
    • remove the resource from BT.
    • re-add the resource marking it to be gacced.



    My Technet Articles

    If you like this or another reply, vote it up!
    If you think this or another reply answers the original question, mark it or propose it as an answer.


    Mauricio Feijo
    www.mauriciofeijo.com


    Tuesday, August 23, 2016 5:44 PM
  • Yes I did , most of time I remove GAC and ReGac. So I think that is not issue. 


    Tuesday, August 23, 2016 5:58 PM
  • You also restarted the host, Im sure

    My Technet Articles

    If you like this or another reply, vote it up!
    If you think this or another reply answers the original question, mark it or propose it as an answer.


    Mauricio Feijo
    www.mauriciofeijo.com

    Tuesday, August 23, 2016 6:04 PM
  • Yes I did and just to verify I just try to test map in Visual studio by removing GAC itself and map test also getting same errors. So I am thinking something wring in schema, map or input file.

    But not sure where exact problem and what it is .

    Tuesday, August 23, 2016 6:13 PM
  • Yes, but that namespace is a bit misleading.  You should drop the Microsoft reference completely.

    Are you testing in Visual Studio or in BizTalk Server?

    Tuesday, August 23, 2016 6:16 PM
    Moderator
  • Can you paste the ST segment of your file here for us to look at?

    My Technet Articles

    If you like this or another reply, vote it up!
    If you think this or another reply answers the original question, mark it or propose it as an answer.


    Mauricio Feijo
    www.mauriciofeijo.com

    Tuesday, August 23, 2016 6:44 PM
  • ST*850*100000001~
    BEG*00*SA*361600**20160708~
    CUR*BY*USD~
    REF*ZZ*8006*SHERWIN WILLIAMS ORGANIZATION ID MUST RETURN ON 855~
    REF*IA*335169~
    REF*YB*0~
    N9*L1**NOTES~
    MSG*This is the comments field that needs to be on the invoice~
    N1*ST*PO CEP - Receiving*92*14655~
    N3*11700 South Cottage Grove~
    N4*Chicago*IL*60628*US~
    PER*SH**TE*773-821-3107*FX*773-821-3004~
    N1*BT*Sherwin-Williams Co (AP Use)~
    N3*PO Box 94785~
    N4*Cleveland*OH*44101*US~
    N1*SU*ZONES INC*92*335169~
    N3*PO BOX 34740~
    N4*SEATTLE*WA*98124-1740*US~
    N1*BY*Christopher Smith~
    PER*BD**TE*216-566-7452***EM*christopher.j.smith@sherwin.com~
    PO1*1*100*EA*10**VN*12345~
    PID*F****Zones EDI Test~
    DTM*002*20160710~
    CTT*1~
    SE*25*100000001~
    Tuesday, August 23, 2016 6:55 PM
  • OK. The file looks good.

    I still think your issue is related to EDI not resolving the schema correctly, even though it shows the schema correctly in the error message. 

    It is clear to me that the error message is not reliable, as it states the same namespace on both end of the error statement:

    Error 6  Native Parsing Error: Non Segment level  : [5] X12_00401_850\ST\ The element 'ST' in namespace 'http://schemas.microsoft.com/BizTalk/EDI850IN/X12/2006' has invalid child element 'ST01'. List of possible elements expected: 'http://schemas.microsoft.com/BizTalk/EDI850IN/X12/2006:ST01'.
    C:\File_IN\customer\850\Maptest\sample850.txt

    I don't mind continuing to help you troubleshoot this though. Maybe at some point we will need to change that namespace to something completely adverse, like the name of your company like boatseller said, just to remove ambiguity , but lets try a few things first.

    This may seem incoherent, but humor me please: Put xmlns back to its original content, http://schemas.microsoft.com/BizTalk/EDI/X12/2006, regac and retry please. If using VS, please close and reopen it. If using BTS, re-add the resource. Leave your target namespace as it is, just rollback the xmlns attribute of <xs:schema>


    My Technet Articles

    If you like this or another reply, vote it up!
    If you think this or another reply answers the original question, mark it or propose it as an answer.


    Mauricio Feijo
    www.mauriciofeijo.com


    • Edited by Mauricio Feijo Tuesday, August 23, 2016 7:46 PM
    • Marked as answer by dnyanbhar Tuesday, August 23, 2016 8:23 PM
    Tuesday, August 23, 2016 7:45 PM
  • Are you testing in Visual Studio or in BizTalk Server?


    Tuesday, August 23, 2016 7:46 PM
    Moderator
  • Thanks

    I tried changing namespace to something else and test in VS but no change. I agree that issue is with xsd only, but what not sure yet. 

    Tuesday, August 23, 2016 8:04 PM
  • Did you change xmlns back to http://schemas.microsoft.com/BizTalk/EDI/X12/2006  on <xs:schema> ?

    My Technet Articles

    If you like this or another reply, vote it up!
    If you think this or another reply answers the original question, mark it or propose it as an answer.


    Mauricio Feijo
    www.mauriciofeijo.com

    Tuesday, August 23, 2016 8:06 PM
  • I can see it is working.

    Just did steps I was doing only extra thing you did what you suggested close and reopen VS.

    Following things I did

    1)Change Namespace to something very different other than default (as suggested by boatseller and you)

    2)Close and reopen VS

    and looks like it working. 

    Thanks 

    Tuesday, August 23, 2016 8:23 PM
  • OK, great!

    So the way I see it, what fixed it was leaving the xmlns attribute alone and modifying only the targetnamespace attribute.

    If this fixed your issue, please mark this as an answer to close your question.

    Thank you,


    My Technet Articles

    If you like this or another reply, vote it up!
    If you think this or another reply answers the original question, mark it or propose it as an answer.


    Mauricio Feijo
    www.mauriciofeijo.com

    Tuesday, August 23, 2016 8:35 PM