aspose file tools*
The moose likes Web Services and the fly likes can't create java objects from schemas using xjc Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "can Watch "can New topic

can't create java objects from schemas using xjc

Ranch Hand

Joined: Dec 08, 2004
Posts: 111


i'm new to web services, i was just trying to generate java classes from my schemas, using xjc ant task. but it always complains.


ant task


i have really no idea what's wrong here. any help would be appreciated. thanks in advance.

Paulo Salgado
Ranch Hand

Joined: Jan 18, 2002
Posts: 98
Hi Sanat.

It looks like you have a conflict between the element name and the type name. JAXB will generate interfaces and classes for both, so they can't have the same name. Try renaming either one of them. For instance, rename the element on your XML Schema like this:

I agree. Here's the link:
subject: can't create java objects from schemas using xjc
Similar Threads
[schema] Allow an element to have any content
Jaxb marshalling exception
[JAXB] Not able to generate IMPL file using xjc
JAXB XJC compiling Issue
Creating a JMS TextMessage From XML