I have these 2 methods below defined in my restful resource class. I'm using Jersey. But when I try to run a unit it says error, they have the same media type. Am I missing something ?
SEVERE: The following errors and warnings have been detected with resource and/or provider classes: SEVERE: Producing media type conflict. The resource methods public javax.ws.rs.core.Response com.thomsonreuters.codes.sourcedocweb.resource.DocumentsResource.findDocumentMetadataByCorId(java.lang.String) and public javax.ws.rs.core.Response com.thomsonreuters.codes.sourcedocweb.resource.DocumentsResource.findDocumentMetadata(java.lang.String) can produce the same media type Feb 11, 2013 5:43:56 PM com.sun.jersey.test.framework.spi.container.inmemory.InMemoryTestContainerFactory$InMemoryTestContainer stop INFO: Stopping low level InMemory test container
@GET
@Path("/{docId}/metadata")
@Produces(MediaType.APPLICATION_XML)
public Response findDocumentMetadata(@PathParam("docId")
final String docId)
{
Response response = findMetadataForDocument(docId);
return response;
}
@GET
@Path("/{corid}/metadata")
@Produces(MediaType.APPLICATION_XML)
public Response findDocumentMetadataByCorId(@PathParam("corid")
final String corid)
{
Response response = findMetadataForDocument(corid);
return response;
}