mulesoft-labs / raml-for-jax-rs

This project is all about two way transformation of JAX-RS-annotated Java code to RAML API description and back.
Other
296 stars 181 forks source link

Generted client proxy is not working with RESTEasy #438

Open amreladawy opened 4 years ago

amreladawy commented 4 years ago

Using RestEasy with the generated Rest client is failing with the following error.

ClassCastException : class org.jboss.resteasy.client.jaxrs.engines.ManualClosingApacheHttpClient43Engine$2 cannot be cast to class MyResponse

The reason is that the generated MyReponse inherits ResponseDelegate which inherits javax.ws.rs.core.Response. RESTEasy will return ManualClosingApacheHttpClient43Engine and it fails casting to MyReponse class.

How to get the generated code to work using RESTEasy?

jpbelang commented 4 years ago

Looking into it.

But, from the top of my head, does RestEasy implement jaxrs ?

amreladawy commented 4 years ago

Yes, it does. It is like Jersey. Actually when I switched to Jersey, the deserialisation is failing also, but I am going to list this in another issue.

Here is the StackOverflow question. https://stackoverflow.com/questions/61431765/classcastexception-class-org-jboss-resteasy-client-jaxrs-engines-manualclosing