I tried modifying my jersey-atom-abdera unit tests to use the new
Client.getProviders() call, but it fails to find the appropriate
provider (even though it correctly lists this provider as having been
discovered). More specifically, if I uncomment line 89 of
ProvidersTest.java (as of r1913), I get the following failure:
testGetContent(com.sun.jersey.atom.abdera.impl.provider.entity.ProvidersTest):
Time elapsed: 1.067 sec <<< ERROR!
java.lang.IllegalArgumentException: No MessageBodyReader for class
'com.sun.jersey.atom.abdera.impl.provider.entity.ContentBean' and media
type 'application/xml'
at
com.sun.jersey.atom.abdera.ContentHelper.getContentEntity(ContentHelper.java:154)
at
com.sun.jersey.atom.abdera.impl.provider.entity.ProvidersTest.testGetContent(ProvidersTest.java:186)
The startup logging indicates that the
com.sun.jersey.atom.abdera.impl.provider.entity.ContentBeanProvider
class was discovered as a provider, and this class does indeed implement
MessageBodyREader<ContentBean> as well as includes a
@Consumes("application/xml") annotation.
Paul, it seems to me that this should "just work". Could you take a
quick look and see what I am missing?
Craig