[jboss-user] [JBossWS] - JAXBContext doesn't know ArrayList or complex types - object
komet
do-not-reply at jboss.com
Tue May 27 10:26:29 EDT 2008
Hallo, I've got a simple web service with a stateless session bean as endpoint.
I use jboss 4.2.2.GA and the current jaxws 3.0.1.
The wsdl file of my service is generated automatically and accessing the methods by a jaxws-client works fine, but...
I would like to have a simple get-method in my ws:
|
| public Object get(Long param);
|
|
The generated wsdl file maps the return value to :anyType.
If the implementation of this method returns a default Java Object like a String, there are no problems in marshal or unmarshal, but if the object is an ArrayList or even an own complex type, the following error occurs on the server side:
class ArrayList|MyOwnClass nor any of its super class is known to this context.
How can I put the classes into the JAXBContext at runtime?
I tried the @XmlSeeAlso annotation without success. Creating my own JAXBContext in the stateless session bean method, adding the arraylist and marshalling causes another exception:
@XMLRootElement is missing in ArrayList ...
Thanks a lot for help!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4153629#4153629
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4153629
More information about the jboss-user
mailing list