A practical guide to JAXB 2.0
Take a peek at its new features
Posted in Developer, 22nd September 2006 11:40 GMT
Free Download - Security Web 2.0
The directory structure of the JAXB2 project is shown in Figure 2.

Compiling an XML Schema
In this section, we will bind the catalog schema, catalog.xsd, to Java classes with the xjc compiler. We shall configure xjc as an external tool in Eclipse. Select Run>External Tools>External Tools. In the External Tools frame, right-click on the Program node and select New to create a new configuration as shown in Figure 3. 
Also, set environment variables JAVA_HOME and JAXB_HOME in the external tool configuration for xjc in the Environment tab, as shown in Figure 4.

Run xjc compiler on the example schema, catalog.xsd. Select catalog.xsd file in the Package Explorer window and then Run>External Tools>XJC.
The output from the XJC compiler is shown in Figure 5.

Schema-derived classes get generated in the gen_source folder, as shown in Figure 6.

Java classes and interfaces are generated in package generated, by default. For each xsd:complexType schema component, one value class gets generated, instead of an interface and an implementation class. For example, for catalogType complexType a Java value class CatalogType.java gets generated. An ObjectFactory.java class also gets generated. The factory class consists of create methods to create Java value class objects.
Next page: Unmarshalling an XML Document

Implementing Energy Efficient Data Centers [WP114]
An Improved Architecture for High-Efficiency, High-Density Data Centers [WP126]
Web application security [3-2APYM3X]
The Register Guide to Extended Validation
Software Configuration Management
Rock-solid Fedora 10 brings salvation to Ubuntu weary
Hidden recipes for OS X charts and graphs
Rock-solid Fedora 10 brings salvation to Ubuntu weary
Windows 7 early promise: Passes the Vista test