Web Services Development: Generating JAXB Types

This document describes the following:


1. Generating a JAXB Type JAR File

Using OEPE, you can generate JAXB classes from an existing XML schema for your Web service project, as follows:
  1. In the Project Explorer, right-click the schema file (XSD file) in your Web service project, and then select WebLogic Web Services > Generate JAXB Types from the drop-down menu, as Figure 1 shows. This will open the New JAXB Types > Generated Artifacts dialog that Figure 2 shows.



    Figure 1.
    Generate JAXB Types Menu





    Figure 2.
    New JAXB Types Wizard - Generated Artifacts


  2. On the New JAXB Types > Generated Artifacts dialog, specify the output location of the generated JAR file, as well as the Ant script generation options, and then click Next.
    Note that you can also save the generated Ant script for future modifications to the generation of the JAXB artifacts. To do so, select Keep generated Ant script to save the file.
  3. On the next New JAXB Types > Customization Options screen, shown in Figure 3, you may choose to specify additional options, and then click Finish.



    Figure 3.
    New JAXB Types Wizard - Customization Options


Upon completion of the preceding procedure, Eclipse creates the JAXB type JAR file in your Web service project's WebConent/WEB-INF/lib directory, as Figure 4 shows.




Figure 4.
Generated JAXB Type JAR File


For information on using generated JAXB types with your Web service, see Web Services Development: Starting Points for JAX-WS.


2. Related Information


JAX-WS Documenation

Getting Started With WebLogic Web Services Using JAX-WS

JAXB: Using XJC with Ant

Oracle WebLogic Server: Ant Task Reference for jwsc

Oracle WebLogic Server: Ant Task Reference for jws