-
Bug
-
Resolution: Done
-
Major
-
3.0.7.Final
-
None
Example:
Hello.java
public interface Hello<T> { @POST @Path("/hello") @Produces("text/plain") @Consumes("text/plain") String sayHi(T in); }
HelloString.java
@Path(value = "/say") public interface HelloString extends Hello<String> { }
The following code
ResteasyClient client = new ResteasyClientBuilder().build(); ResteasyWebTarget target = client.target("http://localhost:9095"); HelloString proxy = target.proxy(HelloString.class); String hello = proxy.sayHi("hello");
results in
java.lang.IllegalArgumentException: The type is incompatible with the class of the entity.
at javax.ws.rs.core.GenericEntity.checkTypeCompatibility(GenericEntity.java:173)
at javax.ws.rs.core.GenericEntity.<init>(GenericEntity.java:152)
at org.jboss.resteasy.client.jaxrs.internal.proxy.processors.invocation.MessageBodyParameterProcessor.process(MessageBodyParameterProcessor.java:35)
at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.createRequest(ClientInvoker.java:135)
at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invoke(ClientInvoker.java:101)
at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientProxy.invoke(ClientProxy.java:62)