On Thu, Sep 22, 2011 at 7:41 AM, Miguel Tinte <[email protected]> wrote: > Hi Serafín, > this is the request code: > > INTERFACES: > @Remotable > public interface ComponentService { > // This method is called if XML is request > @GET > @Path("/hello") > @Consumes(MediaType.APPLICATION_XML) > public String sayXMLHello(); > ... > @Remotable > public interface JaxrsComponentService { > // This method is called if XML is request > @GET > @Path("/hello") > @Consumes(MediaType.APPLICATION_XML) > public String sayXMLHello(); > > > IMPLEMENTATION: > @Service(JaxrsComponentService.class) > public class ComponentCaller implements JaxrsComponentService, > IComponentService { > @Reference > private IComponentService componentService; > public String sayXMLHello() { > return "<?xml version=\"1.0\"?>" + "<hello> Hello World!" + > "</hello>"; > } > ... > > Regards >
Could you try two things : - Remove consumes - Change consumes to text The issue is that the browser is not sending XML (and xml related headers) to the service. But also, you are actually producing xml from your example, and not consuming xml. -- Luciano Resende http://people.apache.org/~lresende http://twitter.com/lresende1975 http://lresende.blogspot.com/
