Red Hat Training

A Red Hat training course is available for JBoss Enterprise SOA Platform

16.3. Writing JAXB Annotation Introduction Configurations

The XSD for the configuration is available online at (In your IDE, register this XSD against the namespace.)
@XmlElement This goes on the “Field” and “Method” elements.
The basic structure of the configuration file follows the that of a Java class (that is, a "Class" containing "Fields" and "Methods".) The <Class>, <Field> and <Method> elements all require a “name” attribute. This attribute provides the name of the class, field or method. This name attribute's value is able to support regular expressions. This allows a single annotation introduction configuration to be targeted at more than one class, field or member by, for example, setting the name-space for a field in a class, or for all classes in a package.
The Annotation Introduction configurations match exactly with the Annotation definitions themselves, with each annotation “element-value pair” represented by an attribute on the annotations introduction configuration. Use the XSD and your IDE to editing the configuration.
Here is an example:
<?xml version = "1.0" encoding = "UTF-8"?>
<jaxb-intros xmlns="">

  The type namespaces on the customerOrder are 
  different from the rest of the message...
  <Class name="com.activebpel.ordermanagement.CustomerOrder">
    <XmlType propOrder="orderDate,name,address,items" />
      <Field name="orderDate">
        <XmlAttribute name="date" required="true" />
      <Method name="getXYZ">
         nillable="true" />
  <!-- More general namespace config for the rest of the message... -->
  <Class name="com.activebpel.ordermanagement.*">
    <Method name="get.*">
      <XmlElement namespace="" />