Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » XSD Error(Error during Import XSD)
XSD Error [message #1768481] Wed, 19 July 2017 10:51 Go to next message
saravannan sithambaram is currently offline saravannan sithambaramFriend
Messages: 1
Registered: July 2017
Junior Member
HI Experts,

I am actually SAP Consultant and dont have knowledge on XML.
I am trying to import 1 xsd file from the customer but it is giving an error.
Could anyone guide me with the error.

Code:


<xs:schema
xmlns:xs="" attributeFormDefault="unqualified" elementFormDefault="qualified">
<xs:element name="message" type="messageType" />
<xs:complexType name="headerType">
<xs:sequence>
<xs:element type="xs:messageIDType" name="messageID" />
<!-- GUID etc. unique identifier -->
<xs:element type="xs:dateTime" name="messageTime" />
<!-- timestamp when message was generated -->
<xs:element type="xs:string" name="systemID" />
<!-- ID of the system which generated the message (e.g. Far Eye SIT, or Far Eye Prod. -->
<xs:element type="xs:string" name="sourceID" />
<!-- ID to differentiate the different systems (e.g. FE) -->
<xs:element type="xs:byte" name="numberOfItems" />
<!-- Number of items in the message -->
</xs:sequence>
</xs:complexType>
<xs:complexType name="quantType">
<!-- Quantity of service provided -->
<xs:simpleContent>
<xs:extension base="xs:decimal">
<xs:attribute type="xs:string" name="unit" use="required">
<!-- ISO code of Unit of quantity -->
<xs:restriction base="xs:string">
<xs:minLength value="2" />
<xs:maxLength value="3" />
</xs:restriction>
</xs:attribute>
<xs:restriction base="xs:decimal">
<xs:fractionDigits value="2" />
</xs:restriction>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="messageIDType">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="16" />
</xs:restriction>
</xs:simpleType>
</xs:complexType>
<xs:complexType name="itemType">
<xs:sequence>
<xs:element type="xs:string" name="shopID" />
<!-- ID of the parcel shop, should be the ID of the pick-up location received via master data interface -->
<xs:element type="xs:string" name="vendor" />
<!-- ID of the of the sold-to received via master data interface -->
<xs:element type="xs:string" name="orgUnit" />
<!-- sales org. / purchasing org. etc. -->
<xs:element type="xs:string" name="parcelID" minOccurs="0" />
<!-- DHL eCommmerce Parcel ID -->
<xs:element type="xs:string" name="ccn" />
<!-- DHL eCommmerce Customer Confirmation number -->
<xs:element type="xs:string" name="customer" minOccurs="0" />
<!-- identifier of DHL eCommerce customer, who dropped of a parcel in the shop (if available) -->
<xs:element type="xs:string" name="matNr" />
<!-- identifier of service for which remuneration is given (SAP material number) -->
<xs:element type="quantType" name="quant" />
<!-- Quantity -->
<xs:element type="xs:dateTime" name="timestamp" />
<!-- time stamp when service was provided -->
</xs:sequence>
</xs:complexType>
<xs:complexType name="messageType">
<xs:sequence>
<xs:element type="headerType" name="header" />
<!-- header information of service -->
<xs:element type="itemType" name="item" maxOccurs="unbounded" minOccurs="1" />
<!-- items in the message -->
</xs:sequence>
</xs:complexType>
</xs:schema>

Error:

Unable to convert imported document to WSDL
Reason:
Element "restriction" is not permitted in the "/schema/complexType("quantType")/simpleContent/extension/attribute("unit")" elementCheck selected category

Thank you,
S,Saravannan
Re: XSD Error [message #1768510 is a reply to message #1768481] Wed, 19 July 2017 15:07 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 29035
Registered: July 2009
Senior Member
The schema is just completely ill formed. Ask the customer for one that isn't bogus.
Previous Topic:XML Schema question
Next Topic:Get cvc-complex-type.3.2.2 error in some, but not all, maven POM files
Goto Forum:
  


Current Time: Thu Dec 14 08:26:18 GMT 2017

Powered by FUDForum. Page generated in 0.02958 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software