permaculture playing cards*
The moose likes XML and Related Technologies and the fly likes JAXB: Nested interfaces results in compile error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "JAXB: Nested interfaces results in compile error" Watch "JAXB: Nested interfaces results in compile error" New topic
Author

JAXB: Nested interfaces results in compile error

Andy Metcalfe
Greenhorn

Joined: Nov 23, 2004
Posts: 5
I'm trying to figure out JAXB, I've succesfully autogenerated the classes and interfaces, but I ran into an error.

One of the nested interfaces gives the error "Nested Type FOO hides an enclosing type".

The code looks something like:



package myPackage.jaxb;
public interface FOO {

java.util.List getBAR();

public interface BAR
extends javax.xml.bind.Element, myPackage.jaxb.FOO.FOO
{

}

public interface FOO {
java.lang.String getAssortedStuff();
void setAssortedStuff(java.lang.String value);
...
...
...
}
}



The source schema looks something like



What's going on here? Why is JAXB generating classes that won't compile?

_Am
[ February 22, 2005: Message edited by: Andy Metcalfe ]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JAXB: Nested interfaces results in compile error
 
Similar Threads
JAXB nested interfaces.
What is "NewDataSet" in XSD file?
is there any way to add inline schema with xml using jaxb
Webservice Design
How to add xml schema within xml using jaxb