jQuery in Action, 2nd edition*
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
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:

With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: can't create java objects from schemas using xjc
Similar Threads
[JAXB] Not able to generate IMPL file using xjc
Creating a JMS TextMessage From XML
Jaxb marshalling exception
JAXB XJC compiling Issue
[schema] Allow an element to have any content