Using JAXB

This topic will get you started using JAX-B in your web services.

Generate a JAXB Type Jar

To generate a JAXB classes from an XML schema, right click your schema file (XSD file) and select Web Services > Generate JAXB Type Jar.

The first page of the wizard lets you specify where you would like the JAR file saved.

You can also save a generated Ant script so you can modify the generation of the JAXB artifacts in the future. Select Keep generated Ant Script to save the file. See the Ant Task Reference for jwsc in the WebLogic Server documentation for details on how to use the <jws> element's type="JAXWS" attribute to generate JAXB artifacts.

alt

The second page of the wizard lets you specify the package name and any binding files.

alt

See Web Service Development Starting Points, especially the section Starting from an XML Schema, for details on using generated types in your web service.

Related Topics

Using JAX-WS and JAXB with WebLogic Server 10: JAX-WS Customization Binding on dev2dev.bea.com

Using JAX-WS and JAXB with WebLogic Server 10 on dev2dev.bea.com

Web Service Development Starting Points

Java documentation: JAX-WS web site


Still need help? Post a question on the Workshop newsgroup.