incubator-wink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Miguel Tinte <miguel.ti...@gmail.com>
Subject Re: HTTP ERROR 500
Date Thu, 22 Sep 2011 16:13:47 GMT
Yes, it's a browser

2011/9/22 Raymond Feng <enjoyjava@gmail.com>

> What's your rest client? A browser?
>
> Raymond Feng
> Sent from my iPhone
>
> On 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
>
>
> 2011/9/22 Serafin Sedano < <serafin.sedano@abiquo.com>
> serafin.sedano@abiquo.com>
>
>> It looks like you are either omitting the "Accept: " header or the Service
>> API has defined an empty @Consumes.
>>
>> Since it is a 500 I bet the service is wrong.
>>
>> Please add the actual request you are performing.
>>
>> Kind regards.
>>
>> Serafín.
>>
>> 2011/9/22 Miguel Tinte < <miguel.tinte@gmail.com>miguel.tinte@gmail.com>
>>
>>>
>>> Hi,
>>>> I am using Wink to access via REST service to a SCA component deployed
>>>> in <http://localhost:8080/component>http://localhost:8080/component.
>>>> When I load my REST request by adding "/hello" to the previous URL it
>>>> returns:
>>>>
>>>>     INTERNAL_SERVER_ERROR
>>>>
>>>> Caused by:
>>>>
>>>> java.lang.NullPointerException
>>>> 	at org.apache.wink.common.internal.http.Accept.valueOf(Accept.java:139)
>>>>
>>>> Any idea?
>>>>
>>>> Thanks in advance
>>>>
>>>
>>>
>>
>

Mime
View raw message