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 <[email protected]>
> 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 <[email protected]>
>
>>
>> Hi,
>>> I am using Wink to access via REST service to a SCA component deployed in
>>> 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
>>>
>>
>>
>