background image

External Customize Example

<< Class Declarations | Create Marshal Example >>
<< Class Declarations | Create Marshal Example >>

External Customize Example

External Customize Example
The External Customize example is identical to the Datatype Converter example, except that
the binding declarations in the External Customize example are made by means of an external
binding declarations file rather than inline in the source XML schema.
The binding customization file used in the External Customize example is
tut-install/javaeetutorial5/examples/jaxb/external-customize/binding.xjb.
This section compares the customization declarations in bindings.xjb with the analogous
declarations used in the XML schema, po.xsd, in the Datatype Converter example. The two sets
of declarations achieve precisely the same results.
Building and Running the External Customize Example Using NetBeans
IDE
Follow these instructions to build and run the External Customize example on your Application
Server instance using the NetBeans IDE.
1. In NetBeans IDE, select File
Open Project.
2. In the Open Project dialog, navigate to tut-install/javaeetutorial5/examples/jaxb/.
3. Select the external-customize folder.
4. Select the Open as Main Project check box.
5. Click Open Project Folder.
6. Right-click the external-customize project and select Run Project.
Building and Running the External Customize Example Using Ant
To compile and run the External Customize example using Ant, in a terminal window, go to the
tut-install/javaeetutorial5/examples/jaxb/external-customize/ directory and type the
following:
ant runapp
Java-to-Schema Examples
The Java-to-Schema examples show how to use annotations to map Java classes to XML
schema.
Java-to-Schema Examples
The Java EE 5 Tutorial · September 2007
536