|
From: Andreas H. <a...@ho...> - 2008-04-09 06:19:10
|
Hello,
I have recently started testing Resteasy JAX-RS. I'm extremely happy so far,
but I have run into a few problems. I have a application that was working
with Jersey that is now deployed on Resteasy. The problem here is the
following:
I have a method in my root resource that returns an interface called Device
such as:
@Path("{id}")
Device getDevice(@PathParam("id") String id);
The device interface in turn has JAX-RS annotations on it:
interface Device {
@GET
Device getSelf();
}
The device implementation have several implementations that each one have
different JAX-RS resource. My problem is that it seems to be impossible reach
those resources as it seems that Resteasy always works against the interface
for lookups.
Is this the intended behavior? I don't remember what the JSR says about this,
but it worked fine with Jersey.
Also on a related note it seems that MessageBodyWriter.isWriteable(Class,
Type, Annotation[]) gets passed the declared type of the method instead of
the actual class of the return value. This caused problems with JAXBProvider
as my concrete implementations had a @XmlRootElement annotation but the
actual Device implementation did not.
Oh, both of these issues are tested against 1.0-beta-2, as I don't have time
right now to check against the trunk.
// Andreas Holstenson
|