| Author |
JAXB in eclipse
|
bhargavi kakarala
Ranch Hand
Joined: Jan 03, 2002
Posts: 82
|
|
Hi, Are there any samles how to create and run JAXB(Generate schema derived Java classes,Unmarshll XML into Java Objects) in Eclipse IDE. I was able to generate schema derived classes from command line but now I dont know how to Unmarshall XML doc into JAva Objects. Thanks in Adavance.
|
Bhargavi
SCJP2,SCWD,SCBCD,IBM Certified SOA Associate,IBM Certified Architectural Design of SOA Solutions
|
 |
Peer Reynders
Bartender
Joined: Aug 19, 2005
Posts: 2906
|
|
I'm not quite sure what you are asking - seems that there are two questions: 1. How do I run the JAXB binding compiler from Eclipse? Include a build.xml file in your project that makes use of Sun's XJCTask ant-task (in jaxb-xjc.jar for JAXB 1.0). Right-click (the build.xml in your project) Run As Ant Build Note that jaxb-xjc.jar is in the "lib" directory specified by the classpath. 2. How do I unmarshal an XML document to a Java content-tree? Sun's JWSDP 1.6 samples shows how: To run the (JAXB 1.0) examples you will need to add jaxb\lib\jaxb-api.jar jaxb\lib\jaxb-impl.jar jaxb\lib\jaxb-libs.ja jwsdp-shared\lib\relaxngDatatype.jar jwsdp-shared\lib\xsdlib.jar from the JWSDP 1.6 distribution to your project's Java Build Path. jaxb\lib\jaxb-xjc.jar is only needed for its ant task and to compile the bindings. JWSDP 1.6 Tutorial: Chapter 2 Using JAXB [ February 28, 2006: Message edited by: Peer Reynders ]
|
"Don't succumb to the false authority of a tool or model. There is no substitute for thinking."
Andy Hunt, Pragmatic Thinking & Learning: Refactor Your Wetware p.41
|
 |
 |
|
|
subject: JAXB in eclipse
|
|
|