cancel
Showing results for 
Search instead for 
Did you mean: 

XSD Error

former_member205101
Participant
0 Kudos

Guys,

When i try to import this XSD below in external definition, I am getting error while activating and i tried with ALTOVA XML SPY.

Is it possible to validate XSD struture in SOAP UI or any other Open source tool?

XSD:

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

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

<xs:element name="XMLFORMPOST">

<xs:complexType>

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

<xs:element name="LOGIN" >

<xs:complexType>

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

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

</xs:complexType>

</xs:element>

<xs:element name="ORDERHEADER">

<xs:complexType>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

</xs:complexType>

</xs:element>

<xs:element name="ORDERITEMS">

<xs:complexType>

<xs:element name="ITEM" maxOccurs="250">

<xs:complexType>

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

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

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

</xs:complexType>

</xs:element>

</xs:complexType>

</xs:element>

</xs:complexType>

</xs:element>

</xs:schema>

Error in PI:

Activation of the change list canceled Check result for External Definition OrderEntryXSD | http://www.xxx.com/sd/PO850: Document check found errors Cause: Unable to recognize the loaded document as valid XSD Error when parsing XSD document com.sap.aii.utilxi.xsd.api.XsdException: The tag <element> is not allowed at <<xs:schema><xs:element><xs:complexType><xs:element>>

Error in altova XML spy:

Unable to show schema:

C:\Users\prangasamy\Desktop\EDI\XSD\orderEntry.xsd

Element <xs:element> is not allowed under element <xs:complexType>.

Error location: xs:schema / xs:element / xs:complexType / xs:element

If i try to validate with sample XSD structure, XS element is needed.

http://www.w3schools.com/schema/schema_complex.asp

I appreciate for any input reg. this.

Thanks

Praba

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I checked the XSD on Stylus Studio and there were no errors as such. Use this tool to see where you are having issues. It will point the line number if there are any errors.

former_member205101
Participant
0 Kudos

Thanks for ur info. Let me try after downloading stylus studio. Please try this XSD in PI and activate.

Former Member
0 Kudos

I am getting error while importing the XSD in PI. I don't have time right now to look into this, but I will spend sometime in the evening.

Former Member
0 Kudos

You are missing the <xs:sequence>..</xs:sequence> between the complexType and element

For example

<xs:element name="XMLFORMPOST">

<xs:complexType>

<xs:sequence>

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

<xs:element name="LOGIN">

<xs:complexType>

<xs:sequence>

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

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

</xs:sequence>

</xs:complexType>

</xs:element>

.....

.....

If you use xmlspy go to text mode it will highlight the location where you need add it.

thanks

Asif

former_member205101
Participant
0 Kudos

Hi,

This XSD is having some issue, so it is fixed by the creator. After then it worked fine.

Thanks

Praba