axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rich Scheuerle (JIRA)" <>
Subject [jira] Created: (AXIS2-4803) JAXWS: A RequestWrapper or ResponseWrapper class may lack an @XmlRootElement
Date Sat, 28 Aug 2010 14:47:53 GMT
JAXWS: A RequestWrapper or ResponseWrapper class may lack an @XmlRootElement

                 Key: AXIS2-4803
             Project: Axis2
          Issue Type: Bug
            Reporter: Rich Scheuerle
            Assignee: Rich Scheuerle


The JAX-WS @RequestWrapper and @ResponseWrapper annotations identify JAXB beans to marshal
and unmarshal the data.
The JAXB wrapper bean normally contains an @XmlRootElement annotation, which defines the xsd:element
rendering of the data.
However the @XmlRootElement is not required.  
Prior changes to the JAX-WS runtime have enabled support for wrappers with just the @XmlType

The JAX-WS engine constructs a JAXBContext using the packages referenced by the web service
when all of the referenced packages contain a JAXB ObjectFactory.
This strategy assumes that each ObjectFactory will reference all of the beans representing
root types and that all other necessary beans have an @XmlRootElement annotation.


We encountered the following scenario:  
   * The @RequestWrapper references a JAXB bean.
   * The wrapper bean does not have an @XmlRootElement, but it does have an @XmlType.
   * The ObjectFactory does not reference the wrapper bean.

The current runtime fails to include the JAXB bean in its JAXBContext.  This causes marshaling
and unmarshaling failures.

   The JAXBUtils code constructs the JAXBContext.  JAXBUtils has a list of all of the classes
referenced by the web service.
   Code will be added to inspect the new JAXBContext to ensure that it contains all of the
referenced classes.
   If it does not, the code will fall back to the pre-existing "construct JAXBContext using
individual classes" algorithm.

This is a small change.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message