cancel
Showing results for 
Search instead for 
Did you mean: 

XML data import with Import Server

Former Member
0 Kudos

Hi ,

I am doing a small POC. I am trying import data automatically from a xml using MDIS (Master Data Import Server) . It is giving the StructuralX exception . But using the same xml and xml schema the data is getting loaded into repository while using Import Manager.

Can any one tell me what is wrong in my XML or XML schema.

XML -->

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

<Products>

<Product>

<Name>Acer</Name>

<Category>Laptop</Category>

<PID>1002</PID>

</Product>

<Product>

<Name>Apple IPhone</Name>

<Category>Mobile</Category>

<PID>1004</PID>

</Product>

<Product>

<Name>Canon</Name>

<Category>Digital camera</Category>

<PID>1006</PID>

</Product>

<Product>

<Name>Motorola</Name>

<Category>Mobile</Category>

<PID>1003</PID>

</Product>

<Product>

<Name>Nikon</Name>

<Category>Digital camera</Category>

<PID>1005</PID>

</Product>

<Product>

<Name>Nokia</Name>

<Category>Mobile</Category>

<PID>1007</PID>

</Product>

<Product>

<Name>Sony Vaio</Name>

<Category>Laptop</Category>

<PID>1001</PID>

</Product>

</Products>

XML schema -->

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

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" >

<xsd:element name="Products">

<xsd:complexType>

<xsd:sequence maxOccurs="unbounded">

<xsd:element ref="Product"/>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

<xsd:element name="Product" >

<xsd:annotation>

<xsd:documentation>Comment describing your root element

</xsd:documentation>

</xsd:annotation>

<xsd:complexType>

<xsd:sequence>

<xsd:element name="name" type="xsd:string"/>

<xsd:element name="category" type="xsd:string"/>

<xsd:element name="pid" type="xsd:string"/>

<xsd:element name="parentid" type="xsd:string"/>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

</xsd:schema>

StructuralX exception -->

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

<File>

<ExceptionSubFolder>F:\SAPMDM~1.5\Server\Distributions\MDMORA_ORCL\Product_Repo\Inbound\ImportRemoteSystem\ImportXmlSchemaFile\Exception\StructuralX\</ExceptionSubFolder>

<Name>20080904054914_Prod.xml</Name>

<ExceptionType>StructuralX</ExceptionType>

<TimeStamp>20080904054914_</TimeStamp>

</File>

Any help is appreciated.

Kousik

Edited by: Kousik Mukherjee on Sep 5, 2008 3:16 PM

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Koushik,

<Name>20080904054914_Prod.xml</Name>

<ExceptionType>StructuralX</ExceptionType>

<TimeStamp>20080904054914_</TimeStamp>

</File>

The structural exception shows a problem with the name of of the XML file.

I may be wrong in this, but kindly change the name of the XMl file from the Time Stamp to simply Prod.XML in the ready folder.

May be the Import server is not able to process it automatcially. If the Import server faces any difficulty, it raises an exception. Howvever, many a times, the same file can be imported ny using Import Manager manually. In other words to use, XML and XSD through Import server everything should be perfect.

In this, kindly change the name of the XML file. Might work.

Hope it helps.

Thanks and Regards

Nitin Jain

Former Member
0 Kudos

Hi Kousik,

First remove the NameSpace from the XSD and then add the XSD file into the Repository to the path Console -> Repository Name -> Admin -> XML Schema.

Create the outbound port and select the Format = XML Schema. Pass the XML Schema imported in the previous step.

Open the Import Manager with the option XML Schema, select the XSD created from the drop down list and browse to select XML file. Also select the proper Remote System associated with the port.

Perform the mapping according to your requirement and save the map. Assign the map to the Port created.

Regards,

Jitesh Talreja

Former Member
0 Kudos

Hi,

I Validate your Xml against your XSD schema it is not validating me. Please use this XSD and add it to Xml Schemas in MDM console. Then in Import Manager select Type Xml Schema and then load your Xml file. it will not show any error.

<?xml version="1.0" encoding="utf-8" ?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

<xs:element name="Products">

<xs:complexType>

<xs:sequence>

<xs:element minOccurs="0" maxOccurs="unbounded" name="Product">

<xs:complexType>

<xs:sequence>

<xs:element minOccurs="0" name="Name" type="xs:string" />

<xs:element minOccurs="0" name="Category" type="xs:string" />

<xs:element minOccurs="0" name="PID" type="xs:string" />

</xs:sequence>

</xs:complexType>

</xs:element>

</xs:sequence>

</xs:complexType>

</xs:element>

</xs:schema>

Hope it will Help you,

Thanks,

Mandeep

Former Member
0 Kudos

Hi,

This seems to be an structural exception case,unless u correct it u cant proceed further.

To fix the exception

1)GO to Import manager(IM) .Logon to Repository

2. Select type as port ,remote system and part name (Exception){in the path u have mentioned the port name)

3.IM will open the original file.According to Action Items section of the Import Status tab correct the exception and proceed further.

I hope this gives u an idea.

Regards

Nisha