tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cedric Hurst <>
Subject Re: Returning complex data types in @WebResult
Date Sun, 27 Jan 2008 05:53:41 GMT

Thanks for the suggestion, Dain.

I tried adding the @XmlType annotation:

...but referencing the object in the @WebReturn resulted in a classloading
error for geronimo's wsgen tool (the jar for "javax.xml.bind" is included
but the jar for "javax.xml.bind.annotation" is not).  I'm pretty sure that
is a Geronimo-specific issue because I ran into a similar problem generating
WSDL files which return @Entity classes.  So, I'll take that issue to the
Geronimo mailing list or open a JIRA.

In the meantime, there still seems to be an issue returning any kind of
java.util.List in a @WebService.  To test this out, I replaced the return
type of List<Customer> with List<String>

And I'm still getting the "java.util.List is not known to this context"

However, I have noticed that if I return a String[]: seems to work just fine.  So that will probably do for now.

Dain Sundstrom wrote:
> FWIU, JaxWS requires that all complex type be annotated with JaxB  
> annotations (this is why the root most exception is a JAXBException).   
> These annotations tell JaxWS how to convert between XML and the Java  
> Object.
> I think (and I'm not JaxWS expert) you only need to add @XmlType or  
> @XmlRootElement to your Customer class, but you may want to check the  
> Axis2 docs.
> -dain

View this message in context:
Sent from the OpenEJB User mailing list archive at

View raw message