Skip to main content

JAXB & Eclipse

2 replies [Last post]
alexsli06
Offline
Joined: 2007-06-18

Hi, all:

I am new to this, hope someone will enlighten me on this problem. I am trying to generate both interface and implementation java files following this example tutorial:
http://java.sun.com/developer/technicalArticles/WebServices/jaxb/index.h...

I have a proper *.xsd files, and I am using Eclipse Web Service tools IDE with JDK/JRE 1.6, and having JAXB plugged-in. I was only able to generate all the interfaces files, but couldn't find any the implementation files after running "Run XJC". Is this normal, or something went wrong? How could I make JAXB generate the impl files as it was shown.

Thank you all very much in advance!

Alex

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
alexsli06
Offline
Joined: 2007-06-18
alexsli06
Offline
Joined: 2007-06-18

Hi, all:

still, I couldn't figure out a solution for the above problem.

This time, I am using JAXB as a stand-alone without its plug-in in Eclipse.

I am trying to generate the Java classes, i.e. interface and implementation, files from a XML schema (*.xsd file). I was following this example "book.xsd" (found here:http://java.sun.com/developer/technicalArticles/WebServices/jaxb/bookxsd.txt) and the tutorial http://java.sun.com/developer/technicalArticles/WebServices/jaxb/index.html, except I am using the latest version of JAXB 2.1.3. I issued a command from my Windows Cygwin window:

=========================
$ ../xjc.sh -xmlschema books.xsd -verbose

which outputs:
../xjc.sh: line 51: cd: /cygdrive/c/Documents: Not a directory
parsing a schema...
compiling a schema...
[INFO] generating code
unknown location

generated\BookCategoryType.java
generated\BookType.java
generated\Collection.java
generated\ObjectFactory.java
=========================

As you can see, only the interface classes are generated, not the implementations. I think this might be a simple problem, but since I am a newbie to this, I couldn't figure out why this is happening? Please, someone enlighten me! Thank you very much!