on 07-26-2005 3:08 PM
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>
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>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.