A
Anna
Hi,
I'm having problems compiling the classes generated by Jaxb when using
the schema below. (Note the xsd below is part of a bigger xsd file i
just pulled out the section that was giving me issues ). If anyone can
see a problem with the xsd defined below I would appreicate the
information.
The inner interface defined within the generated java class is causing
me issues. The error I get is "Nested type GuestCountType hides an
enclosing type". i would appreciate any help with this.
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:complexType name="GuestCountType">
<xs:sequence>
<xs:element name="GuestCount" maxOccurs="99">
<xs:complexType>
<xs:attributeGroup ref="GuestCountGroup"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="IsPerRoom" type="xs:boolean" use="optional"/>
</xs:complexType>
<xs:complexType name="RoomStayCandidateType">
<xs:sequence>
<xs:element name="GuestCounts" type="GuestCountType" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:attributeGroup name="GuestCountGroup"/>
</xs:schema>
//
// This file was generated by the JavaTM Architecture for XML
Binding(JAXB) Reference Implementation, v1.0.4-b18-fcs
// See <a
href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of
the source schema.
// Generated on: 2006.05.06 at 09:47:52 EDT
//
package generated;
/**
* Java content class for GuestCountType complex type.
* <p>The following schema fragment specifies the expected content
contained within this java content object. (defined at
file:/C:/xsdfiles/test.xsd line 4)
* <p>
* <pre>
* <complexType name="GuestCountType">
* <complexContent>
* <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="GuestCount" maxOccurs="99">
* <complexType>
* <complexContent>
* <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
* <attGroup ref="{}GuestCountGroup"/>
* </restriction>
* </complexContent>
* </complexType>
* </element>
* </sequence>
* <attribute name="IsPerRoom"
type="{http://www.w3.org/2001/XMLSchema}boolean" />
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*/
public interface GuestCountType {
/**
* Gets the value of the isPerRoom property.
*
*/
boolean isIsPerRoom();
/**
* Sets the value of the isPerRoom property.
*
*/
void setIsPerRoom(boolean value);
/**
* Gets the value of the GuestCount property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the
GuestCount property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getGuestCount().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link generated.GuestCountType.GuestCountType}
*
*/
java.util.List getGuestCount();
/**
* Java content class for anonymous complex type.
* <p>The following schema fragment specifies the expected content
contained within this java content object. (defined at
file:/C:/xsdfiles/test.xsd line 7)
* <p>
* <pre>
* <complexType>
* <complexContent>
* <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
* <attGroup ref="{}GuestCountGroup"/>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*/
public interface GuestCountType {
}
}
I'm having problems compiling the classes generated by Jaxb when using
the schema below. (Note the xsd below is part of a bigger xsd file i
just pulled out the section that was giving me issues ). If anyone can
see a problem with the xsd defined below I would appreicate the
information.
The inner interface defined within the generated java class is causing
me issues. The error I get is "Nested type GuestCountType hides an
enclosing type". i would appreciate any help with this.
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:complexType name="GuestCountType">
<xs:sequence>
<xs:element name="GuestCount" maxOccurs="99">
<xs:complexType>
<xs:attributeGroup ref="GuestCountGroup"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="IsPerRoom" type="xs:boolean" use="optional"/>
</xs:complexType>
<xs:complexType name="RoomStayCandidateType">
<xs:sequence>
<xs:element name="GuestCounts" type="GuestCountType" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:attributeGroup name="GuestCountGroup"/>
</xs:schema>
//
// This file was generated by the JavaTM Architecture for XML
Binding(JAXB) Reference Implementation, v1.0.4-b18-fcs
// See <a
href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of
the source schema.
// Generated on: 2006.05.06 at 09:47:52 EDT
//
package generated;
/**
* Java content class for GuestCountType complex type.
* <p>The following schema fragment specifies the expected content
contained within this java content object. (defined at
file:/C:/xsdfiles/test.xsd line 4)
* <p>
* <pre>
* <complexType name="GuestCountType">
* <complexContent>
* <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="GuestCount" maxOccurs="99">
* <complexType>
* <complexContent>
* <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
* <attGroup ref="{}GuestCountGroup"/>
* </restriction>
* </complexContent>
* </complexType>
* </element>
* </sequence>
* <attribute name="IsPerRoom"
type="{http://www.w3.org/2001/XMLSchema}boolean" />
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*/
public interface GuestCountType {
/**
* Gets the value of the isPerRoom property.
*
*/
boolean isIsPerRoom();
/**
* Sets the value of the isPerRoom property.
*
*/
void setIsPerRoom(boolean value);
/**
* Gets the value of the GuestCount property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the
GuestCount property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getGuestCount().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link generated.GuestCountType.GuestCountType}
*
*/
java.util.List getGuestCount();
/**
* Java content class for anonymous complex type.
* <p>The following schema fragment specifies the expected content
contained within this java content object. (defined at
file:/C:/xsdfiles/test.xsd line 7)
* <p>
* <pre>
* <complexType>
* <complexContent>
* <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
* <attGroup ref="{}GuestCountGroup"/>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*/
public interface GuestCountType {
}
}