Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6087817
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:54:48+00:00 2026-05-23T11:54:48+00:00

I have a xsd file with the following xml structure. No matter what i

  • 0

I have a xsd file with the following xml structure. No matter what i do the MyVals enumerator is not getting generated.

<xs:simpleType name="MyVals">
     <xs:restriction base="xs:string">
       <xs:enumeration value="1" />
       <xs:enumeration value="2" />
       <xs:enumeration value="3" />
       <xs:enumeration value="4"/>
     </xs:restriction>   
</xs:simpleType>

All other structures are correctly populating. Complete xsd is given below.

<?xml version="1.0"?>
<xs:schema targetNamespace="http://www.simple.com/xsd" 
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" jaxb:version="1.0"
    xmlns:wepa="http://www.simple.com/xsd"
    xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
    >

  <xs:element name="MessageProtocol" >
    <xs:complexType >
      <xs:sequence>
        <xs:element name ="Header" type="xs:string" minOccurs="1" maxOccurs="1"/>
        <xs:element name ="Body" type="xs:string" minOccurs="1" maxOccurs="1"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>




  <xs:simpleType name="MyVals">
    <xs:restriction base="xs:string">
      <xs:enumeration value="1" />
      <xs:enumeration value="2" />
      <xs:enumeration value="3" />
      <xs:enumeration value="4"/>
    </xs:restriction>
  </xs:simpleType>

</xs:schema>

XSD generation command:C:\Progra~1\”Microsoft SDKs”\Windows\v6.0A\bin\xsd.exe -c /enabledDataBinding -l:c# /namespace:Simple.SimpleXSD Simple.xsd

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T11:54:49+00:00Added an answer on May 23, 2026 at 11:54 am

    Your MyVals type is not used within your MessageProtocol element

    For starters, try declaring the Body element as follows:

    <xs:element name="Body" type="MyVals" minOccurs="1" maxOccurs="1"/>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following regex type in my xsd file: <xsd:simpleType name="Host"> <xsd:restriction base="xsd:string">
Suppose I have an XSD file having below lines of code; <xsd:simpleType name=test> <xsd:restriction
I have xml file whose structure is defined with following xsd: <?xml version=1.0 encoding=utf-8?>
Hi I have following which is not generating class file for complextypes using bindigs.xml
I have a client supplied wsdl file containing an enum: <xsd:simpleType name=OurEnum> <xsd:annotation> <xsd:appinfo>
I have one xsd file I'd rather not modify (Exceptions.xsd): <xs:schema xmlns:xs=http://www.w3.org/2001/XMLSchema xmlns=http://me.com/Exceptions.xsd targetNamespace=http://me.com/Exceptions.xsd
I have an XML file that I used to create an XSD File and
I have an XML Schema Definition file .XSD who's elements are in Spanish. I
I have been provided an XSD and a sample Xml file that contains the
I have the following xml file <Layout xmlns=http://tempuri.org/Layout/> <Numeric Id=temperature Caption=Temperature> <validation:IsValidWhen xmlns:validation=http://tempuri.org/Validation/> </validation:IsValidWhen>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.