-
1. Jboss 5.1.0 GA jdk6 and restEasy
nickarls Feb 1, 2011 3:17 PM (in response to mid491)Pointers in https://issues.jboss.org/browse/RESTEASY-158 ?
-
2. Jboss 5.1.0 GA jdk6 and restEasy
mid491 Feb 2, 2011 3:05 AM (in response to nickarls)hi, thanks for answer, but it's not realy "pointers".
The documentation says "
19.6. Arrays and Collections of JAXB Objects
RESTEasy will automatically marshal arrays, java.util.Set's, and java.util.List's of JAXB objects to
and from XML, JSON, Fastinfoset (or any other new JAXB mapper Restasy comes up with)."
The error I had wrote is done with an array of Strings :
@GET
@Path("/foo")
@Produces("application/*+xml")
public String[] getfoo() {
String[] tab = new String [2];
tab[0] = "hello";
tab[1] = " world";
return tab;
}
I guess I have a jar confilct/missing somewhere but just can't find :
- using Struts 2
- using jax-ws
building with Maven.
-
3. Jboss 5.1.0 GA jdk6 and restEasy
mid491 Feb 4, 2011 2:46 AM (in response to mid491)One step to resolve array problems :
it's a scoped class loading problem.
Had to add a jboss-web.xml file and set as :
<class-loading java2ClassLoadingCompliance="true">
<loader-repository>
com.mycompanyfr:loader=test-0.1.1-SNAPSHOT.war
</loader-repository>
</class-loading>
pointers :
http://community.jboss.org/wiki/classloadingconfiguration
http://atmosphere-users-mailling-list.2493822.n2.nabble.com/PubSub-example-on-JBoss-td4471090.html
Now I can return an array of Objects annoted @XmlRootElement
But I can't still return an array of String...