Forum Stats

  • 3,839,782 Users
  • 2,262,536 Discussions
  • 7,901,055 Comments

Discussions

File Adapter native xsd- missing the logic

sab1312
sab1312 Member Posts: 100
edited Oct 25, 2013 3:34AM in Integration - Adapters

Gurus,

I have the input file as below-

TR,12345,1,1

RH,NOV_EX1_V1_20130912,NOV_EX1_V1_20130912,SHIP_UNIT_LINES,PPD,FOB

RH,NOV_EX1_V2_201309,NOV_EX2_V1_20130712,SHIP_UNIT_LINES,COD,FOB

......

The corresponding native xsd looks like

<xsd:element name="Root-Element">

    <xsd:complexType>

      <xsd:sequence maxOccurs="unbounded">

          <xsd:element ref="tns:TR" nxsd:startsWith = "TR," minOccurs="0" />

        <xsd:element ref="tns:RH" nxsd:startsWith = "RH," minOccurs="0" maxOccurs="unbounded"/>

            </xsd:sequence>

       </xsd:complexType>

       </xsd:element>

              <xsd:element name="TR" type="tns:SOType"/>

        <xsd:complexType name ="SOType">

        <xsd:sequence minOccurs="1" maxOccurs="unbounded">

              <!--xsd:element name="C1" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;" fixed="TR"/-->

              <xsd:element name="C2" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;" />

              <xsd:element name="C3" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;" />

              <xsd:element name="C4" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy="&quot;" />

      </xsd:sequence>

    </xsd:complexType>

<xsd:element name="RH" type="tns:POType"/>

        <xsd:complexType name= "POType">

        <xsd:sequence minOccurs="1" maxOccurs="unbounded">

              <!--xsd:element name="C5" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;"

                           fixed="RH"/-->

              <xsd:element name="C6" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;" />

              <xsd:element name="C7" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;" />

               <xsd:element name="C8" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;" />

              <xsd:element name="C9" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;" />

              <xsd:element name="C10" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy="&quot;" />

      </xsd:sequence>

    </xsd:complexType>


But the xml which is generated is

<Root-Element>
<TR>
<C2>12345</C2>

<C3>1</C3>

<C4>1</C4>

<C2>RH</C2>

<C3>NOV_EX1_V1_20130912</C3>

<C4>NOV_EX1_V1_20130912,SHIP_UNIT_LINES,PPD,FOB</C4>

</TR>

</Root-Element>

Can anybody let me now where i am going wrong, why it is not reading the element RH?

Thanks

Ayush

Tagged:

Best Answer

Answers

This discussion has been closed.