axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Rheinheimer (JIRA)" <>
Subject [jira] Commented: (AXIS2-1989) jaxws should detect default sub-package for JAXB context
Date Thu, 18 Jan 2007 23:33:30 GMT


Mike Rheinheimer commented on AXIS2-1989:

AHA!  Found two problems that need to be resolved:

1.  The second line in JAXBUtils.getClassesFromJar may throw a ClassCastException, which trickles
up too far.
2.  The JAXBUtils.getAllClassesFromPackage should be a best-effort method.  Currently, it
can throw a ClassNotFound exception,
thus not return its classes object, thus too few classes are populated into the list for use
by the JAXBContext.

The attached patch fixes 2.  It does NOT fix 1, but rather has a hack in it to protect callers
from the ClassCastException it may throw.

> jaxws should detect default sub-package for JAXB context
> --------------------------------------------------------
>                 Key: AXIS2-1989
>                 URL:
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: jaxws
>            Reporter: Mike Rheinheimer
>         Assigned To: Nikhil Thaker
>         Attachments: jaxbutils_patch.txt, patch.txt
> Generated server code may or may not have an ObjectFactory class.  Also, generated server
code may or may not have @RequestWrapper or @ResponseWrapper annotations.  If the ObjectFactory
class is missing, and the @RequestWrapper and/or @ResponseWrapper annotation is missing, the
jaxws code currently throws exception:
> javax.xml.bind.UnmarshalException: unexpected element (uri:"",
local:"returnArrayOfString"). Expected elements are (none)
> As I understand, the JAXWS code now has JAXBUtils.getClassesFromJarFile().  This new
method, in conjunction with the attached patch, should get us the default wrapper class(es)
in the absence of the annotations and ObjectFactory class.
> I hope.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


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

View raw message