-
1. Re: Apache CXF and RESTful web services...
kieselhorst Nov 29, 2012 9:05 AM (in response to blalux)I'd also like to use CXF as JAX-RS provider and tried to exclude Resteasy in jboss-deployment-structure.xml as follows:
<module name="org.jboss.resteasy.resteasy-atom-provider"/> <module name="org.jboss.resteasy.resteasy-cdi"/> <module name="org.jboss.resteasy.resteasy-jaxrs"/> <module name="org.jboss.resteasy.resteasy-jaxb-provider"/> <module name="org.jboss.resteasy.resteasy-jackson-provider"/> <module name="org.jboss.resteasy.resteasy-jsapi"/> <module name="org.jboss.resteasy.resteasy-multipart-provider"/> <module name="org.jboss.resteasy.async-http-servlet-30"/>
Unfortunately this doesn't work:
Caused by: java.lang.ClassCastException: org.jboss.resteasy.core.ServerResponse cannot be cast to org.apache.cxf.jaxrs.impl.ResponseImpl
at org.apache.cxf.jaxrs.client.WebClient.handleResponse(WebClient.java:975)
... 61 more
-
2. Re: Apache CXF and RESTful web services...
sergeyb Nov 30, 2012 6:00 AM (in response to blalux)Hi Blalux, please see my comment at
In summary - I appreciate your support but IMHO the better approach is simply make it simpler for users to plugin alternative implementations if they choose so.
Cheers, Sergey
-
3. Re: Apache CXF and RESTful web services...
swd847 Nov 30, 2012 3:56 PM (in response to blalux)If you are using EAP, or a custom built version of AS7 upstream you should be able to get it to work by adding this into your jboss-deployment-structure.xml:
<
jboss-deployment-structure
xmlns
=
"urn:jboss:deployment-structure:1.2"
>
<
deployment
>
<
exclude-subsystems
>
<
subsystem
name
=
"resteasy"
/>
</
exclude-subsystems
>
</deployment>
</jboss-deployment-structure>
Unfortunatly this was added after 7.1.1, however it basically means that the container will not add resteasy into your deployment, or attempt to do any jax-rs integration.
-
4. Re: Apache CXF and RESTful web services...
kieselhorst Dec 3, 2012 3:51 AM (in response to swd847)Thanks for the hint Stuart. I'm using EAP 6 so it should work, but there is still a ClassCastException, so it seems that there are still resteasy classes on classpath.
-
5. Re: Apache CXF and RESTful web services...
swd847 Dec 3, 2012 3:24 PM (in response to kieselhorst)Can you post the exception you are getting?
-
6. Re: Apache CXF and RESTful web services...
kieselhorst Dec 4, 2012 2:59 AM (in response to swd847)I already posted it above, the CXF client picks up the RESTEasy ServerResponse class from classpath instead of the CXF ResponseImpl. See also my post in the CXF user mailinglist where the JAX-RS API is suspected to cause this conflict.