Sun B2B Suite UN/EDIFACT OTD Library User Guide

Appendix A EDFOTDErrors Schema File and Sample XML

This appendix provides the contents of the EDFOTDErrors.xsd file, which is the schema file the validation output string conforms to. This appendix also includes a sample of validation XML output.

For more information, refer to UN/EDIFACT Validation Support and performValidation.

This appendix contains the following topics:

Contents of the EDFOTDErrors.xsd File


<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XML Spy v4.4 U (http://www.xmlspy.com) by Tony (TechLeader) -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
 attributeFormDefault="unqualified">
  <xs:element name="EDFOTDErrors">
    <xs:annotation>
      <xs:documentation>Validation Errors from an EDF OTD validation</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="EDFICError" minOccurs="0" maxOccurs="unbounded"/>
        <xs:element ref="EDFFGError" minOccurs="0" maxOccurs="unbounded"/>
        <xs:element ref="EDFTSError" minOccurs="0" maxOccurs="unbounded"/>
        <xs:element ref="EDFDataError" minOccurs="0" maxOccurs="unbounded"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="EDFICError">
    <xs:annotation>
      <xs:documentation>Interchange Envelope Validation Error Structure.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element name="InteContNumb" type="xs:string"/>
        <xs:element name="InteContDate" type="xs:string"/>
        <xs:element name="InteContTime" type="xs:string"/>
        <xs:element name="InteNoteCode" type="xs:string"/>
        <xs:element name="ICErrorDesc" type="xs:string" minOccurs="0"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="EDFFGError">
    <xs:annotation>
      <xs:documentation>Functional Group Envelope Validation Error Structure.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element name="FuncIdenCode" type="xs:string"/>
        <xs:element name="GrouContNumb" type="xs:string"/>
        <xs:element name="NumbOfTranSetsIncl" type="xs:string"/>
        <xs:element name="FuncGrouSyntErroCode" type="xs:string"/>
        <xs:element name="FGErrorDesc" type="xs:string" minOccurs="0"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="EDFTSError">
    <xs:annotation>
      <xs:documentation>Transaction Set Envelope Validation Error Structure.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element name="TranSetIdenCode" type="xs:string"/>
        <xs:element name="TranSetContNumb" type="xs:string"/>
        <xs:element name="TranSetSyntErroCode" type="xs:string"/>
        <xs:element name="TSErrorDesc" type="xs:string" minOccurs="0"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="EDFDataError">
    <xs:annotation>
      <xs:documentation>Message (excluding envelopes) Validation Error Structure.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element name="Level" type="xs:short" minOccurs="0"/>
        <xs:element name="SegmIDCode" type="xs:string"/>
        <xs:element name="SegmPosiInTranSet" type="xs:int"/>
        <xs:element name="LoopIdenCode" type="xs:string" minOccurs="0"/>
        <xs:element name="SegmSyntErroCode" type="xs:short" minOccurs="0"/>
        <xs:element name="ElemPosiInSegm" type="xs:short"/>
        <xs:element name="CompDataElemPosiInComp" type="xs:short" minOccurs="0"/>
        <xs:element name="DataElemRefeNumb" type="xs:string" minOccurs="0"/>
        <xs:element name="DataElemSyntErroCode" type="xs:short"/>
        <xs:element name="CopyOfBadDataElem" type="xs:string" minOccurs="0"/>
        <xs:element name="RepeatIndex" type="xs:short" minOccurs="0"/>
        <xs:element name="ErrorCode" type="xs:int"/>
        <xs:element name="ErrorDesc" type="xs:string" minOccurs="0"/>
        <xs:element name="Severity" type="xs:string" minOccurs="0"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>

Sample Validation Output XML


<EDFOTDErrors>
  <EDFDataError>
    <Level>1</Level>
    <SegmIDCode>QTY</SegmIDCode>
    <SegmPosiInTranSet>24</SegmPosiInTranSet>
    <LoopIdenCode>QTY</LoopIdenCode>
    <SegmSyntErroCode>8</SegmSyntErroCode>
    <ElemPosiInSegm>2</ElemPosiInSegm>
    <DataElemSyntErroCode>3</DataElemSyntErroCode>
    <CopyOfBadDataElem>50:PCE</CopyOfBadDataElem>
    <ErrorCode>15037</ErrorCode>
    <ErrorDesc>QTY_QTY_2 at 24 [50:PCE]: Number of data elements inside the segment during 
unmarshalling exceeds 1</ErrorDesc>
    <Severity>ERROR</Severity>
  </EDFDataError>
  <EDFDataError>
    <Level>1</Level>
    <SegmIDCode>QTY</SegmIDCode>
    <SegmPosiInTranSet>26</SegmPosiInTranSet>
    <LoopIdenCode>QTY</LoopIdenCode>
    <SegmSyntErroCode>8</SegmSyntErroCode>
    <ElemPosiInSegm>1</ElemPosiInSegm>
    <CompDataElemPosiInComp>2</CompDataElemPosiInComp>
    <DataElemRefeNumb>6060</DataElemRefeNumb>
    <DataElemSyntErroCode>1</DataElemSyntErroCode>
    <ErrorCode>15040</ErrorCode>
    <ErrorDesc>QTY_QTY_1 at 26: Data subelement is required but missing inside the 
composite during unmarshalling</ErrorDesc>
    <Severity>ERROR</Severity>
  </EDFDataError>
  <EDFDataError>
    <Level>1</Level>
    <SegmIDCode>DTM</SegmIDCode>
    <SegmPosiInTranSet>5</SegmPosiInTranSet>
    <LoopIdenCode>RFF</LoopIdenCode>
    <SegmSyntErroCode>8</SegmSyntErroCode>
    <ElemPosiInSegm>1</ElemPosiInSegm>
    <CompDataElemPosiInComp>1</CompDataElemPosiInComp>
    <DataElemRefeNumb>2005</DataElemRefeNumb>
    <DataElemSyntErroCode>7</DataElemSyntErroCode>
    <CopyOfBadDataElem>004</CopyOfBadDataElem>
    <ErrorCode>15063</ErrorCode>
    <ErrorDesc>RFF_DTM_1 at 5 [004]: Code value is not in the code list of 2,3,4,7,8,9,
10,11,12,13,14,15,16,17,18,20,21,22,35,36</ErrorDesc>
    <Severity>ERROR</Severity>
  </EDFDataError>
  <EDFDataError>
    <Level>1</Level>
    <SegmIDCode>NAD</SegmIDCode>
    <SegmPosiInTranSet>7</SegmPosiInTranSet>
    <LoopIdenCode>NAD</LoopIdenCode>
    <SegmSyntErroCode>8</SegmSyntErroCode>
    <ElemPosiInSegm>4</ElemPosiInSegm>
    <CompDataElemPosiInComp>1</CompDataElemPosiInComp>
    <DataElemRefeNumb>3036</DataElemRefeNumb>
    <DataElemSyntErroCode>5</DataElemSyntErroCode>
    <CopyOfBadDataElem>VOLVO AERO CORPORATION S-461 81 TROLLHATTAN</CopyOfBadDataElem>
    <ErrorCode>15055</ErrorCode>
    <ErrorDesc>NAD_NAD_4 at 7 [VOLVO AERO CORPORATION S-461 81 TROLLHATTAN]: Data has too many
 characters of 43 because less_or_equal 35</ErrorDesc>
    <Severity>ERROR</Severity>
  </EDFDataError>
  <EDFDataError>
    <Level>1</Level>
    <SegmIDCode>PAT</SegmIDCode>
    <SegmPosiInTranSet>12</SegmPosiInTranSet>
    <LoopIdenCode>PAT</LoopIdenCode>
    <SegmSyntErroCode>8</SegmSyntErroCode>
    <ElemPosiInSegm>2</ElemPosiInSegm>
    <CompDataElemPosiInComp>1</CompDataElemPosiInComp>
    <DataElemRefeNumb>4277</DataElemRefeNumb>
    <DataElemSyntErroCode>7</DataElemSyntErroCode>
    <CopyOfBadDataElem>30</CopyOfBadDataElem>
    <ErrorCode>15063</ErrorCode>
    <ErrorDesc>PAT_PAT_2 at 12 [30]: Code value is not in the code list of 1,2,3,4,5,6</ErrorDesc>
    <Severity>ERROR</Severity>
  </EDFDataError>
  <EDFDataError>
    <Level>1</Level>
    <SegmIDCode>QTY</SegmIDCode>
    <SegmPosiInTranSet>24</SegmPosiInTranSet>
    <LoopIdenCode>QTY</LoopIdenCode>
    <SegmSyntErroCode>8</SegmSyntErroCode>
    <ElemPosiInSegm>1</ElemPosiInSegm>
    <CompDataElemPosiInComp>2</CompDataElemPosiInComp>
    <DataElemRefeNumb>6060</DataElemRefeNumb>
    <DataElemSyntErroCode>4</DataElemSyntErroCode>
    <CopyOfBadDataElem/>
    <ErrorCode>15056</ErrorCode>
    <ErrorDesc>QTY_QTY_1 at 24 []: Data has too few characters of 0 because greater_or_equal 1</ErrorDesc>
    <Severity>ERROR</Severity>
  </EDFDataError>
</EDFOTDErrors>