Version 10

    JAXBIntroductions allows you to specify JAXB Annotations for a Java typeset in an external XML file.  This allows you to use a JAXB unannotated Java typeset for binding to and from XML using JAXB.


    JBossWS 2.0.1.SP2+ supports JAXB Introductions out of the box.  JBossWS 2.0.0.GA requires some modification.


    Enabling Support For JAXB Annotation Introduction On JBossWS 2.0.0

    After installing JBossWS 2.0.0 on your JBoss Application Server, you need to do the following in order to enable the JAXB Annotation Introductions feature:


    1: Build jboss-jaxb-intros.jar as outlined in JAXBIntroductions.


    2: Copy &147;jboss-jaxb-intros.jar&148; from the &147;target&148; folder to the root of the &147;jbossws.sar&148; folder in your JBoss Application Server deploy folder.  


    3: Go to &147;jbossws.sar/jbossws.beans/META-INF/jboss-beans.xml&148; on your App Server and add the following bean config.  Add it just before the "WSEndpointHandlerDeployer" bean config:

      <bean name="WSEndpointJAXBIntrosCustomizationsDeployer" class="org.jboss.wsf.spi.deployment.JAXBIntrosCustomizationsDeployer" ></bean>


    4: Then add an "inject" element for the "WSEndpointJAXBIntrosCustomizationsDeployer" bean config in the deployer list configured on the "WSMainDeployerManager" bean. e.g.:

      <bean name="WSMainDeployerManager" class="org.jboss.wsf.spi.deployment.BasicDeployerManager">
        <property name="deployers">
          <list class="java.util.LinkedList" elementClass="org.jboss.wsf.spi.deployment.Deployer">
            <inject bean="WSEndpointNameDeployer"></inject>
            <inject bean="WSEndpointJAXBIntrosCustomizationsDeployer"></inject>
            <inject bean="WSEndpointHandlerDeployer"></inject>
            <inject bean="WSPublishContractDeployer"></inject>
            <inject bean="WSClassLoaderInjectionDeployer"></inject>
            <inject bean="WSServiceEndpointInvokerDeployer"></inject>
            <inject bean="WSEagerInitializeDeployer"></inject>
            <inject bean="WSEventingDeployer"></inject>
            <inject bean="WSEndpointMetricsDeployer"></inject>
            <inject bean="WSEndpointRegistryDeployer"></inject>
            <inject bean="WSEndpointLifecycleDeployer"></inject>

    Note that after performing these configurations, you must restart your Application Server instance.


    Defining JAXB Introduction Configurations for JBossWS 2.0.x Webservice Endpoints

    Simply add the JAXB Introductions configuration to a file named "jaxb-intros.xml" and place this file in the "META-INF" directory of the endpoint's deployment (e.g. .war).


    For details on how to write a JAXB Introductions Configuration, see JAXBIntroductions.