Hi! I have created a XML to load the catalog item in batch mode and I understand that I have to use a XSD. So, I got a generated copy of the XSD (using XMLSpy), added the XML schema in the MDM Console and assigned it to the appropriate Port. I then loaded the product file in the Ready folder and the file disappeared - indicating that it has been processed. An exception occurred on checking the status of the load. In the report, there is a message - Source file does not conform to XML Schema.
I then tried to import the XML through Import Manager and am able to import without problem. However, if I do the import using XSD, I found that the data did not appear at all for the structure. I reckon that may be the reason why the batch import did not work. However, I am not sure what is wrong with the XSD. Anybody has any idea? Thanks in advance for any help rendered.
Below are my XML data and XSD:
<?xml version="1.0" encoding="utf-8"?>
http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="C:\TEMP\Product Load XML.xsd">
<MaterialContent>
<Category>OTHER</Category>
<MfgPartNum/>
<MfgName/>
<SupPartNum>9999TEST</SupPartNum>
<SupName>Company ABC</SupName>
<SupID>5650</SupID>
<Description>9999 TEST ITEM</Description>
<ScaleValue>1</ScaleValue>
<Price>2.0</Price>
<InfoRecord/>
<PurOrg/>
<Currency>NZD</Currency>
<UOM>EA</UOM>
<LongDescription/>
<Picture/>
<UNSPSC>44122011</UNSPSC>
<UNSPSCDesc>Folders</UNSPSCDesc>
<LeadTime>2</LeadTime>
<Aliases/>
<ProdGroup>00603</ProdGroup>
<ItemType/>
<Type/>
<MimeType/>
<URLDesc/>
<URLLink/>
</MaterialContent>
</ProductCatalog>
XSD:
<?xml version="1.0" encoding="UTF-8"?>
<!
W3C Schema generated by XMLSpy v2008 rel. 2 (
http://www.altova.com)
>
http://www.w3.org/2001/XMLSchema">
<xs:element name="URLLink">
<xs:complexType/>
</xs:element>
<xs:element name="URLDesc">
<xs:complexType/>
</xs:element>
<xs:element name="UOM" type="xs:string"/>
<xs:element name="UNSPSCDesc" type="xs:string"/>
<xs:element name="UNSPSC" type="xs:int"/>
<xs:element name="Type">
<xs:complexType/>
</xs:element>
<xs:element name="SupPartNum" type="xs:string"/>
<xs:element name="SupName" type="xs:string"/>
<xs:element name="SupID" type="xs:short"/>
<xs:element name="ScaleValue" type="xs:byte"/>
<xs:element name="PurOrg">
<xs:complexType/>
</xs:element>
<xs:element name="ProductCatalog">
<xs:complexType>
<xs:sequence>
<xs:element ref="MaterialContent" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="ProdGroup" type="xs:short"/>
<xs:element name="Price" type="xs:decimal"/>
<xs:element name="Picture" type="xs:string"/>
<xs:element name="MimeType">
<xs:complexType/>
</xs:element>
<xs:element name="MfgPartNum">
<xs:complexType/>
</xs:element>
<xs:element name="MfgName">
<xs:complexType/>
</xs:element>
<xs:element name="MaterialContent">
<xs:complexType>
<xs:sequence>
<xs:element ref="Category"/>
<xs:element ref="MfgPartNum"/>
<xs:element ref="MfgName"/>
<xs:element ref="SupPartNum"/>
<xs:element ref="SupName"/>
<xs:element ref="SupID"/>
<xs:element ref="Description"/>
<xs:element ref="ScaleValue"/>
<xs:element ref="Price"/>
<xs:element ref="InfoRecord"/>
<xs:element ref="PurOrg"/>
<xs:element ref="Currency"/>
<xs:element ref="UOM"/>
<xs:element ref="LongDescription"/>
<xs:element ref="Picture"/>
<xs:element ref="UNSPSC"/>
<xs:element ref="UNSPSCDesc"/>
<xs:element ref="LeadTime"/>
<xs:element ref="Aliases"/>
<xs:element ref="ProdGroup"/>
<xs:element ref="ItemType"/>
<xs:element ref="Type"/>
<xs:element ref="MimeType"/>
<xs:element ref="URLDesc"/>
<xs:element ref="URLLink"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="LongDescription">
<xs:complexType/>
</xs:element>
<xs:element name="LeadTime" type="xs:byte"/>
<xs:element name="ItemType">
<xs:complexType/>
</xs:element>
<xs:element name="InfoRecord">
<xs:complexType/>
</xs:element>
<xs:element name="Description" type="xs:string"/>
<xs:element name="Currency" type="xs:string"/>
<xs:element name="Category" type="xs:string"/>
<xs:element name="Aliases">
<xs:complexType/>
</xs:element>
</xs:schema>