This discussion is archived
2 Replies Latest reply: Dec 13, 2012 12:05 AM by Hoang Tong RSS

File Adapter Schema Failing on 11.1.1.1.6

Hoang Tong Newbie
Currently Being Moderated
Hi Oracle Community,

I have a File Adapter that reads in a csv file. The file may contain up to 4 types of records, ITEM, XREF, CATALOG and MGF. Only ITEM record is mandatory.

Examples of a file:

File 1:
ITEM, 12334
XREF, RED
CATALOG, 13124
MGF, www.items.com

File 2:
ITEM, 12334
XREF, RED
MGF, www.items.com

On 11.1.1.1.5, if I passed through a file containing ITEM, XREF, CATALOG and MFG, it works. If CATALOG is not required (like file 2), then I pass ITEM XREF AND MFG. It works.
On 11.1.1.1.6, if I passed through a file containing ITEM, XREF, CATALOG and MFG, it also works. However, if CATALOG is not required, then I pass ITEM XREF AND MFG, it FAILS with a file schema does not match XSD schema.

Anyone experienced this problem? Any ideas or suggestion?

Appreiciate your responses.

Hoang.

XSD shown below:

<?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.baesystems.com.au/AtomicServices/SupplyChain/Inventory/Item/Files/V1"
targetNamespace="http://xmlns.baesystems.com.au/AtomicServices/SupplyChain/Inventory/Item/Files/V1"
elementFormDefault="qualified" attributeFormDefault="unqualified"
nxsd:version="NXSD" nxsd:stream="chars" nxsd:encoding="US-ASCII"
nxsd:hasHeader="true" nxsd:headerLines="4"
nxsd:headerLinesTerminatedBy="${eol}">
<xsd:element name="ItemList">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Item" nxsd:startsWith="ITEM,"
maxOccurs="unbounded" >
<xsd:complexType>
<xsd:sequence>
<xsd:element name="CAT_NO" type="xsd:int" nxsd:style="terminated"
nxsd:terminatedBy="," nxsd:quotedBy='"'
nillable="true"/>
<xsd:element name="DESCRIPTION" type="xsd:string"
nxsd:style="terminated" nxsd:terminatedBy=","
nxsd:quotedBy='"'/>
<xsd:element name="CAT_NOTES" type="xsd:string"
nxsd:style="terminated" nxsd:terminatedBy="${eol}"
nxsd:quotedBy='"'/>
<xsd:element name="XrefList" nillable="true" minOccurs="0">
<xsd:complexType>
<xsd:sequence minOccurs="0">
<xsd:element name="Xref" nxsd:startsWith="XREF,"
maxOccurs="unbounded" minOccurs="0"
nillable="true">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="NCAGE" type="xsd:string"
nxsd:style="terminated"
nxsd:terminatedBy="," nxsd:quotedBy='"'/>
<xsd:element name="NCAGE_NAME" type="xsd:string"
nxsd:style="terminated"
nxsd:terminatedBy="," nxsd:quotedBy='"'/>
<xsd:element name="Unused40" type="xsd:string"
minOccurs="0" nxsd:style="terminated"
nxsd:terminatedBy="${eol}"
nxsd:quotedBy='"'/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="CatalogList" nillable="true" minOccurs="0">
<xsd:complexType>
<xsd:sequence minOccurs="0">
<xsd:element name="Catalog" nxsd:startsWith="CATALOG,"
maxOccurs="unbounded" minOccurs="0"
nillable="true">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="QUE_NUM" type="xsd:string"
nxsd:style="terminated"
nxsd:terminatedBy="," nxsd:quotedBy='"'/>
<xsd:element name="QUE_DES" type="xsd:string"
nxsd:style="terminated"
nxsd:terminatedBy="," nxsd:quotedBy='"'/>
<xsd:element name="Unused40" type="xsd:string"
minOccurs="0" nxsd:style="terminated"
nxsd:terminatedBy="${eol}"
nxsd:quotedBy='"'/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="MFGList" nillable="true" minOccurs="0">
<xsd:complexType>
<xsd:sequence minOccurs="0">
<xsd:element name="Mfg" nxsd:startsWith="MFG,"
maxOccurs="unbounded" minOccurs="0"
nillable="true">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="DWG_NUMBER" type="xsd:string"
nxsd:style="terminated"
nxsd:terminatedBy="," nxsd:quotedBy='"'/>
<xsd:element name="URL" type="xsd:string"
nxsd:style="terminated"
nxsd:terminatedBy="," nxsd:quotedBy='"'/>
<xsd:element name="Unused40" type="xsd:string"
minOccurs="0" nxsd:style="terminated"
nxsd:terminatedBy="${eol}"
nxsd:quotedBy='"'/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
  • 1. Re: File Adapter Schema Failing on 11.1.1.1.6
    vladodias Guru
    Currently Being Moderated
    Hi,

    I have no idea why it was working on .5, but doesn't work on .6... But the way your XSD is defined is not the usual... Have a look at the samples for conditional processing here...
    http://docs.oracle.com/cd/E23943_01/integration.1111/e10231/nfb.htm#CHDJFIJF

    Cheers,
    Vlad
  • 2. Re: File Adapter Schema Failing on 11.1.1.1.6
    Hoang Tong Newbie
    Currently Being Moderated
    Thanks for your reply.

    I created a new XSD using the File Adapter wizard. This one works but only for files contaning 1 ITEM record.

    File 1:
    ITEM, 124314
    CATALOG, green
    CATALOG, 1.1M
    MFG, www.g.com

    File 2:
    ITEM, 124314
    CATALOG, green
    CATALOG, 1.1M
    MFG, www.g.com
    ITEM, 124315
    XREF, blah
    MFG, www.g1.com

    File 1 works, File 2 fails with schemas validate failures. Looks like the schema is not looping through the file. I have specified 'maxOccurs="unbounded' for the ITEM. element.

    What changes are required to loop through multiple ITEM records per file?

    <xsd:element name="ItemList">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="Item" nxsd:startsWith="ITEM,"
    maxOccurs="unbounded" >
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="CAT_NO" type="xsd:int" nxsd:style="terminated"
    nxsd:terminatedBy="," nxsd:quotedBy='"'
    nillable="true"/>
    <xsd:element name="CAT_NOTES" type="xsd:string"
    nxsd:style="terminated" nxsd:terminatedBy="${eol}"
    nxsd:quotedBy='"'/>
    <xsd:element name="XrefList" nillable="true" minOccurs="0">
    <xsd:complexType>
    <xsd:sequence minOccurs="0">
    <xsd:element name="Xref" nxsd:startsWith="XREF,"
    maxOccurs="unbounded" minOccurs="0"
    nillable="true">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="NCAGE" type="xsd:string"
    nxsd:style="terminated"
    nxsd:terminatedBy="," nxsd:quotedBy='"'/>
    <xsd:element name="Unused40" type="xsd:string"
    minOccurs="0" nxsd:style="terminated"
    nxsd:terminatedBy="${eol}"
    nxsd:quotedBy='"'/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="CatalogList" nillable="true" minOccurs="0">
    <xsd:complexType>
    <xsd:sequence minOccurs="0">
    <xsd:element name="Catalog" nxsd:startsWith="CATALOG,"
    maxOccurs="unbounded" minOccurs="0"
    nillable="true">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="QUE_NUM" type="xsd:string"
    nxsd:style="terminated"
    nxsd:terminatedBy="," nxsd:quotedBy='"'/>

    <xsd:element name="Unused40" type="xsd:string"
    minOccurs="0" nxsd:style="terminated"
    nxsd:terminatedBy="${eol}"
    nxsd:quotedBy='"'/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="MFGList" nillable="true" minOccurs="0">
    <xsd:complexType>
    <xsd:sequence minOccurs="0">
    <xsd:element name="Mfg" nxsd:startsWith="MFG,"
    maxOccurs="unbounded" minOccurs="0"
    nillable="true">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="DWG_NUMBER" type="xsd:string"
    nxsd:style="terminated"
    nxsd:terminatedBy="," nxsd:quotedBy='"'/>

    <xsd:element name="Unused40" type="xsd:string"
    minOccurs="0" nxsd:style="terminated"
    nxsd:terminatedBy="${eol}"
    nxsd:quotedBy='"'/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points