incubator-wink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luciano Resende <luckbr1...@gmail.com>
Subject Re: HTTP ERROR 500
Date Thu, 22 Sep 2011 16:59:33 GMT
On Thu, Sep 22, 2011 at 7:41 AM, Miguel Tinte <miguel.tinte@gmail.com> 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/

Mime
View raw message