cancel
Showing results for 
Search instead for 
Did you mean: 

Schema to be handled does not contain a definition of type SODetailResponse

Former Member
0 Kudos

I am creating a new data type named SODetailResponse

and I get an error trying to import xml schema. I used XMLSpy and Business Connector with the schema and had no problems.

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

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

<xs:element name="SODetailResponse">

<xs:complexType>

<xs:sequence>

<xs:element name="Items" maxOccurs="unbounded">

<xs:complexType>

<xs:sequence>

<xs:element name="SalesOrder" type="xs:string"/>

<xs:element name="SalesOrderLine" type="xs:string"/>

<xs:element name="CustomerName" type="xs:string"/>

<xs:element name="MaterialNumber" type="xs:string"/>

<xs:element name="Description" type="xs:string"/>

<xs:element name="RequestedDate" type="xs:string"/>

<xs:element name="OrderedQty" type="xs:string"/>

<xs:element name="UOM" type="xs:string"/>

<xs:element name="BackOrderQty" type="xs:string"/>

<xs:element name="NetPrice" type="xs:string"/>

<xs:element name="Currency" type="xs:string"/>

<xs:element name="PriceUOM" type="xs:string"/>

<xs:element name="BinLocation" type="xs:string"/>

<xs:element name="ReasonForRej" type="xs:string"/>

<xs:element name="ItemCat" type="xs:string"/>

<xs:element name="CustomerNumber" type="xs:string"/>

<xs:element name="ConfirmQty" type="xs:string"/>

<xs:element name="HighLevelItem" type="xs:string"/>

<xs:element name="SchedBillFlag" type="xs:string"/>

<xs:element name="ConsBilling" type="xs:string"/>

</xs:sequence>

</xs:complexType>

</xs:element>

</xs:sequence>

</xs:complexType>

</xs:element>

</xs:schema>

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Try the following xsd, it should work(i checked in repository). Change the targetNamespace to your specific namespace.

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

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

<xs:complexType name="SODetailResponse">

<xs:sequence>

<xs:element name="Items" maxOccurs="unbounded">

<xs:complexType>

<xs:sequence>

<xs:element name="SalesOrder" type="xs:string"/>

<xs:element name="SalesOrderLine" type="xs:string"/>

<xs:element name="CustomerName" type="xs:string"/>

<xs:element name="MaterialNumber" type="xs:string"/>

<xs:element name="Description" type="xs:string"/>

<xs:element name="RequestedDate" type="xs:string"/>

<xs:element name="OrderedQty" type="xs:string"/>

<xs:element name="UOM" type="xs:string"/>

<xs:element name="BackOrderQty" type="xs:string"/>

<xs:element name="NetPrice" type="xs:string"/>

<xs:element name="Currency" type="xs:string"/>

<xs:element name="PriceUOM" type="xs:string"/>

<xs:element name="BinLocation" type="xs:string"/>

<xs:element name="ReasonForRej" type="xs:string"/>

<xs:element name="ItemCat" type="xs:string"/>

<xs:element name="CustomerNumber" type="xs:string"/>

<xs:element name="ConfirmQty" type="xs:string"/>

<xs:element name="HighLevelItem" type="xs:string"/>

<xs:element name="SchedBillFlag" type="xs:string"/>

<xs:element name="ConsBilling" type="xs:string"/>

</xs:sequence>

</xs:complexType>

</xs:element>

</xs:sequence>

</xs:complexType>

</xs:schema>

Former Member
0 Kudos

It is still not working

This is the namespace http://natoil.com/xi/XI/JohnTest

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

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

targetNamespace="http://natoil.com/xi/XI/JohnTest">

<xs:element name="SODetailResponse">

<xs:complexType>

<xs:sequence>

<xs:element name="Items" maxOccurs="unbounded">

<xs:complexType>

<xs:sequence>

<xs:element name="SalesOrder" type="xs:string"/>

<xs:element name="SalesOrderLine" type="xs:string"/>

<xs:element name="CustomerName" type="xs:string"/>

<xs:element name="MaterialNumber" type="xs:string"/>

<xs:element name="Description" type="xs:string"/>

<xs:element name="RequestedDate" type="xs:string"/>

<xs:element name="OrderedQty" type="xs:string"/>

<xs:element name="UOM" type="xs:string"/>

<xs:element name="BackOrderQty" type="xs:string"/>

<xs:element name="NetPrice" type="xs:string"/>

<xs:element name="Currency" type="xs:string"/>

<xs:element name="PriceUOM" type="xs:string"/>

<xs:element name="BinLocation" type="xs:string"/>

<xs:element name="ReasonForRej" type="xs:string"/>

<xs:element name="ItemCat" type="xs:string"/>

<xs:element name="CustomerNumber" type="xs:string"/>

<xs:element name="ConfirmQty" type="xs:string"/>

<xs:element name="HighLevelItem" type="xs:string"/>

<xs:element name="SchedBillFlag" type="xs:string"/>

<xs:element name="ConsBilling" type="xs:string"/>

</xs:sequence>

</xs:complexType>

</xs:element>

</xs:sequence>

</xs:complexType>

</xs:element>

</xs:schema>

Maybe I am not doing this correctly. I select create datatype and it takes me to the edit datatype screen and then I select tools and import xsd.

John

Former Member
0 Kudos

Hi,

I am sorry i forgot to tell you the corrections i made to ur xsd. follow the bold font

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

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

targetNamespace="http://natoil.com/xi/XI/JohnTest">

<b>

Replace the following two lines with third line

<xs:element name="SODetailResponse">

<xs:complexType></b>

<b><xs:complexType name="SODetailResponse"></b>

<xs:sequence>

<xs:element name="Items" maxOccurs="unbounded">

<xs:complexType>

<xs:sequence>

<xs:element name="SalesOrder" type="xs:string"/>

<xs:element name="SalesOrderLine" type="xs:string"/>

<xs:element name="CustomerName" type="xs:string"/>

<xs:element name="MaterialNumber" type="xs:string"/>

<xs:element name="Description" type="xs:string"/>

<xs:element name="RequestedDate" type="xs:string"/>

<xs:element name="OrderedQty" type="xs:string"/>

<xs:element name="UOM" type="xs:string"/>

<xs:element name="BackOrderQty" type="xs:string"/>

<xs:element name="NetPrice" type="xs:string"/>

<xs:element name="Currency" type="xs:string"/>

<xs:element name="PriceUOM" type="xs:string"/>

<xs:element name="BinLocation" type="xs:string"/>

<xs:element name="ReasonForRej" type="xs:string"/>

<xs:element name="ItemCat" type="xs:string"/>

<xs:element name="CustomerNumber" type="xs:string"/>

<xs:element name="ConfirmQty" type="xs:string"/>

<xs:element name="HighLevelItem" type="xs:string"/>

<xs:element name="SchedBillFlag" type="xs:string"/>

<xs:element name="ConsBilling" type="xs:string"/>

</xs:sequence>

</xs:complexType>

</xs:element>

</xs:sequence>

</xs:complexType>

<b>Remove this line </xs:element></b>

</xs:schema>

<b>Following is the xsd with all the above changes use this</b>

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

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

targetNamespace="http://natoil.com/xi/XI/JohnTest">

<xs:complexType name="SODetailResponse">

<xs:sequence>

<xs:element name="Items" maxOccurs="unbounded">

<xs:complexType>

<xs:sequence>

<xs:element name="SalesOrder" type="xs:string"/>

<xs:element name="SalesOrderLine" type="xs:string"/>

<xs:element name="CustomerName" type="xs:string"/>

<xs:element name="MaterialNumber" type="xs:string"/>

<xs:element name="Description" type="xs:string"/>

<xs:element name="RequestedDate" type="xs:string"/>

<xs:element name="OrderedQty" type="xs:string"/>

<xs:element name="UOM" type="xs:string"/>

<xs:element name="BackOrderQty" type="xs:string"/>

<xs:element name="NetPrice" type="xs:string"/>

<xs:element name="Currency" type="xs:string"/>

<xs:element name="PriceUOM" type="xs:string"/>

<xs:element name="BinLocation" type="xs:string"/>

<xs:element name="ReasonForRej" type="xs:string"/>

<xs:element name="ItemCat" type="xs:string"/>

<xs:element name="CustomerNumber" type="xs:string"/>

<xs:element name="ConfirmQty" type="xs:string"/>

<xs:element name="HighLevelItem" type="xs:string"/>

<xs:element name="SchedBillFlag" type="xs:string"/>

<xs:element name="ConsBilling" type="xs:string"/>

</xs:sequence>

</xs:complexType>

</xs:element>

</xs:sequence>

</xs:complexType>

</xs:schema>

Naveen

Former Member
0 Kudos

That worked but I don't like the solution. I get all kinds of different xml schemas from trading partners that I know I will have problems with.

Thanks for your effort

John

Former Member
0 Kudos

hI,

When given a xsd from external patners, we have taken the following 2 approaches

1. Either try fixing the xsd for importing into XI

2. Or Recreate the structure with in XI

Hope that helps,

Naveen

Answers (0)