0 Replies Latest reply: Jul 25, 2014 1:38 AM by rajMS RSS

    File Adapter fixed length Native format Builder schema not reading the data as expected

    rajMS

      Hi

       

      We are using a File Adapter for reading a fixed length data. Using the schema we are able to read the file but the places are incorrect. Following is the schema that we used and the payload.

      At the last you can find our expected read of data how it should be.

       

      With out the record type code we are not even reading the file. Hope there should be a correction in the schema. Please suggest

       

      Schema that we are using:

      <?xml version= '1.0' encoding= 'UTF-8' ?>

      <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"

           xmlns:tns="http://xmlns.energy.com/CreateReturnedItemGENVNDRPReqABCSImplFileAdapterReadReturnedItem"

           targetNamespace="http://xmlns.energy.com/CreateReturnedItemGENVNDRPReqABCSImplFileAdapterReadReturnedItem"

           elementFormDefault="qualified" attributeFormDefault="unqualified" nxsd:version="NXSD" nxsd:stream="chars"

           nxsd:encoding="US-ASCII">

          <xsd:element name="GENVNDRReturnedItem">

              <xsd:complexType>

                  <xsd:sequence minOccurs="1" maxOccurs="unbounded" nxsd:choiceCondition="fixedLength" nxsd:length="1">

                      <xsd:element name="HeaderRec" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:startsWith="1">

                          <xsd:complexType>

                              <xsd:sequence>

                                  <xsd:element name="RecordTypeCode" type="xsd:string" nxsd:style="fixedLength"

                                       nxsd:length="1" nxsd:padStyle="tail"/>

                                  <xsd:element name="PriorityCode" type="xsd:string" nxsd:style="fixedLength"

                                       nxsd:length="2" nxsd:padStyle="tail"/>

                                  <xsd:element name="ImmediateDstn" type="xsd:string" nxsd:style="fixedLength"

                                       nxsd:length="10" nxsd:padStyle="tail"/>

                                  <xsd:element name="ImmediateOrgin" type="xsd:string" nxsd:style="fixedLength"

                                       nxsd:length="10" nxsd:padStyle="tail"/>

                                  <xsd:element name="FileCrDt" type="xsd:string" nxsd:style="fixedLength"

                                       nxsd:length="6" nxsd:padStyle="tail"/>

                                  <xsd:element name="FileCrTm" type="xsd:string" nxsd:style="fixedLength"

                                       nxsd:length="4" nxsd:padStyle="tail"/>

                                  <xsd:element name="FileIdMdfr" type="xsd:string" nxsd:style="fixedLength"

                                       nxsd:length="1" nxsd:padStyle="tail"/>

                                  <xsd:element name="RecSize" type="xsd:string" nxsd:style="fixedLength" nxsd:length="3"

                                       nxsd:padStyle="tail"/>

                                  <xsd:element name="BlockingFctr" type="xsd:string" nxsd:style="fixedLength"

                                       nxsd:length="2" nxsd:padStyle="tail"/>

                                  <xsd:element name="FormatCd" type="xsd:string" nxsd:style="fixedLength"

                                       nxsd:length="1" nxsd:padStyle="tail"/>

                                  <xsd:element name="ImmediateDstnNm" type="xsd:string" nxsd:style="fixedLength"

                                       nxsd:length="23" nxsd:padStyle="tail"/>

                                  <xsd:element name="ImmediateOrginNm" type="xsd:string" nxsd:style="fixedLength"

                                       nxsd:length="23" nxsd:padStyle="tail"/>

                                  <xsd:element name="RefCd" type="xsd:string" nxsd:style="fixedLength" nxsd:length="8"

                                       nxsd:padStyle="tail"/>

                              </xsd:sequence>

                          </xsd:complexType>

                      </xsd:element>

                      <xsd:element name="BatchHdrRec" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:startsWith="5">

                          <xsd:complexType>

                              <xsd:sequence>

                                  <xsd:element name="RecordTypeCode" type="xsd:string" nxsd:style="fixedLength"

                                       nxsd:length="1" nxsd:padStyle="tail"/>

                                  <xsd:element name="ServClsCode" type="xsd:string" nxsd:style="fixedLength"

                                       nxsd:length="3" nxsd:padStyle="tail"/>

                                  <xsd:element name="CmpnyName" type="xsd:string" nxsd:style="fixedLength"

                                       nxsd:length="16" nxsd:padStyle="tail"/>

                                  <xsd:element name="CmpnyDiscretionaryData" type="xsd:string" nxsd:style="fixedLength"

                                       nxsd:length="20" nxsd:padStyle="tail"/>

                                  <xsd:element name="CmpnyIdfn" type="xsd:string" nxsd:style="fixedLength"

                                       nxsd:length="10" nxsd:padStyle="tail"/>

                                  <xsd:element name="StdClsCode" type="xsd:string" nxsd:style="fixedLength"

                                       nxsd:length="3" nxsd:padStyle="tail"/>

                                  <xsd:element name="CmpnyEntryDesc" type="xsd:string" nxsd:style="fixedLength"

                                       nxsd:length="10" nxsd:padStyle="tail"/>

                                  <xsd:element name="CmpnyDescDate" type="xsd:string" nxsd:style="fixedLength"

                                       nxsd:length="6" nxsd:padStyle="tail"/>

                                  <xsd:element name="EffEntryDate" type="xsd:string" nxsd:style="fixedLength"

                                       nxsd:length="6" nxsd:padStyle="tail"/>

                                  <xsd:element name="SettlementDate" type="xsd:string" nxsd:style="fixedLength"

                                       nxsd:length="3" nxsd:padStyle="tail"/>

                                  <xsd:element name="OrgntrStatusCode" type="xsd:string" nxsd:style="fixedLength"

                                       nxsd:length="1" nxsd:padStyle="tail"/>

                                  <xsd:element name="OrgntrBatchCode" type="xsd:string" nxsd:style="fixedLength"

                                       nxsd:length="15" nxsd:padStyle="tail"/>

                              </xsd:sequence>

                          </xsd:complexType>

                      </xsd:element>

                      <xsd:element name="FileControlRec" nxsd:style="terminated" nxsd:terminatedBy="${eol}"

                           nxsd:startsWith="9">

                          <xsd:complexType>

                              <xsd:sequence>

                                  <xsd:element name="RecordTypeCode" type="xsd:string" nxsd:style="fixedLength"

                                       nxsd:length="1" nxsd:padStyle="tail"/>

                                  <xsd:element name="BatchCnt" type="xsd:string" nxsd:style="fixedLength"

                                       nxsd:length="6" nxsd:padStyle="tail"/>

                                  <xsd:element name="BlockCnt" type="xsd:string" nxsd:style="fixedLength"

                                       nxsd:length="6" nxsd:padStyle="tail"/>

                                  <xsd:element name="EntryAddendaCnt" type="xsd:string" nxsd:style="fixedLength"

                                       nxsd:length="8" nxsd:padStyle="tail"/>

                                  <xsd:element name="EntryHash" type="xsd:string" nxsd:style="fixedLength"

                                       nxsd:length="10" nxsd:padStyle="tail"/>

                                  <xsd:element name="TtlDbtEntryDlrAmt" type="xsd:string" nxsd:style="fixedLength"

                                       nxsd:length="12" nxsd:padStyle="tail"/>

                                  <xsd:element name="TtlCrdtEntryDlrAmt" type="xsd:string" nxsd:style="fixedLength"

                                       nxsd:length="12" nxsd:padStyle="tail"/>

                                  <xsd:element name="Reserved" type="xsd:string" nxsd:style="fixedLength"

                                       nxsd:length="39" nxsd:padStyle="tail"/>

                              </xsd:sequence>

                          </xsd:complexType>

                      </xsd:element>

                  </xsd:sequence>

              </xsd:complexType>

          </xsd:element>

      </xsd:schema>

       

       

       

      Sample data:

      1011390714890 0910000191406110449A094101MCSCLDA_TESTIN     XPLLS KNRGO CNNK         
      5200MCSCLDA_TESTIN  e-Bill          2390714890TELe-Bill      1406100001091000017000001
      62627597748910100000747430000033793102651-013  U  HOLBACH KARLA & JAMES   1091000013925011
      799R01091000013925011  27597748                                        091000010000001
      820000000200275977480000000337930000000000002390714890                     091000010000001
      9000060000025000001200995048661000001265867000000000000                                 

       

       

      Read File receive Activity:

      <GENVNDRReturnedItem>

        <HeaderRec>

          <RecordTypeCode>0</RecordTypeCode>

          <PriorityCode>11</PriorityCode>

          <ImmediateDstn>390714890</ImmediateDstn>

          <ImmediateOrgin>0910000191</ImmediateOrgin>

          <FileCrDt>406110</FileCrDt>

          <FileCrTm>449A</FileCrTm>

          <FileIdMdfr>0</FileIdMdfr>

          <RecSize>941</RecSize>

          <BlockingFctr>01</BlockingFctr>

          <FormatCd>M</FormatCd>

          <ImmediateDstnNm>CSCLDA_TESTIN X</ImmediateDstnNm>

          <ImmediateOrginNm>PLLS KNRGO CNNK</ImmediateOrginNm>

          <RefCd></RefCd>

        </HeaderRec>

        <BatchHdrRec>

          <RecordTypeCode>2</RecordTypeCode>

          <ServClsCode>00M</ServClsCode>

          <CmpnyName>CSCLDA_TESTIN e</CmpnyName>

          <CmpnyDiscretionaryData>-Bill 2</CmpnyDiscretionaryData>

          <CmpnyIdfn>390714890T</CmpnyIdfn>

          <StdClsCode>ELe</StdClsCode>

          <CmpnyEntryDesc>-Bill</CmpnyEntryDesc>

          <CmpnyDescDate>1</CmpnyDescDate>

          <EffEntryDate>406100</EffEntryDate>

          <SettlementDate>001</SettlementDate>

          <OrgntrStatusCode>0</OrgntrStatusCode>

          <OrgntrBatchCode>91000017000001</OrgntrBatchCode>

        </BatchHdrRec>

        <FileControlRec>

          <RecordTypeCode>0</RecordTypeCode>

          <BatchCnt>000600</BatchCnt>

          <BlockCnt>000250</BlockCnt>

          <EntryAddendaCnt>00001200</EntryAddendaCnt>

          <EntryHash>9950486610</EntryHash>

          <TtlDbtEntryDlrAmt>000012658670</TtlDbtEntryDlrAmt>

          <TtlCrdtEntryDlrAmt>00000000000</TtlCrdtEntryDlrAmt>

          <Reserved></Reserved>

        </FileControlRec>

      </GENVNDRReturnedItem>

       

       

       

      Expected Read data how we are looking:

       

      <GENVNDRReturnedItem>

        <HeaderRec>

          <RecordTypeCode>0</RecordTypeCode>

          <PriorityCode>11</PriorityCode>

          <ImmediateDstn>39071489</ImmediateDstn>

          <ImmediateOrgin>0091000019</ImmediateOrgin>

          <FileCrDt>140611</FileCrDt>

          <FileCrTm>0449</FileCrTm>

          <FileIdMdfr>A</FileIdMdfr>

          <RecSize>094</RecSize>

          <BlockingFctr>10</BlockingFctr>

          <FormatCd>1</FormatCd>

          <ImmediateDstnNm>MCSCLDA_TESTIN</ImmediateDstnNm>

          <ImmediateOrginNm>XPLLS KNRGO CNNK</ImmediateOrginNm>

          <RefCd/>

        </HeaderRec>

        <BatchHdrRec>

          <RecordTypeCode>2</RecordTypeCode>

          <ServClsCode>200</ServClsCode>

          <CmpnyName>MCSCLDA_TESTIN</CmpnyName>

          <CmpnyDiscretionaryData>e-Bill</CmpnyDiscretionaryData>

          <CmpnyIdfn>2390714890</CmpnyIdfn>

          <StdClsCode>TEL</StdClsCode>

          <CmpnyEntryDesc>e-Bill</CmpnyEntryDesc>

          <CmpnyDescDate/>

          <EffEntryDate>140610</EffEntryDate>

          <SettlementDate>000</SettlementDate>

          <OrgntrStatusCode>1</OrgntrStatusCode>

          <OrgntrBatchCode>091000017000001</OrgntrBatchCode>

        </BatchHdrRec>

        <FileControlRec>

          <RecordTypeCode>0</RecordTypeCode>

          <BatchCnt>000060</BatchCnt>

          <BlockCnt>000025</BlockCnt>

          <EntryAddendaCnt>00000120</EntryAddendaCnt>

          <EntryHash>0995048661</EntryHash>

          <TtlDbtEntryDlrAmt>000001265867</TtlDbtEntryDlrAmt>

          <TtlCrdtEntryDlrAmt>000000000000</TtlCrdtEntryDlrAmt>

          <Reserved/>

        </FileControlRec>

      </GENVNDRReturnedItem>