Hi,

I'm trying to integrate the JAX-RS implementation now included in CXF 2.1
(snapshot).

The service is correctly called and the parameters arrive fine but then I
get a page with the message:

No message body writer found for response class : SimpleResponse.

Where SimpleResponse is my custom response bean extending the
javax.ws.rs.core.Response.

Here the code:

@Path("/ButtonService")
public class ButtonWebServiceImpl implements ButtonWebService {


    @Path("/addressButton/{action}/{apiKey}/{countryCode}/{state}/{city}/"
            +
"{street}/{number}/{postCode}/{attribution}/{logoUrl}/{name}/{description}/{source}/{buttonServer}/{buttonArtUrl}")
    @GET
    public SimpleResponse createForAddress(@PathParam(value = "action")
    String action, @PathParam(value = "apiKey")
    String apiKey, @PathParam(value = "countryCode")
    String countryCode, @PathParam(value = "state")
    String state, @PathParam(value = "city")
    String city, @PathParam(value = "street")
    String street, @PathParam(value = "number")
    String number, @PathParam(value = "postCode")
    String postCode, @PathParam(value = "attribution")
    String attribution, @PathParam(value = "logoUrl")
    String logoUrl, @PathParam(value = "name")
    String name, @PathParam(value = "description")
    String description, @PathParam(value = "source")
    String source, @PathParam(value = "buttonServer")
    String buttonServer, @PathParam(value = "buttonArtUrl")
    String buttonArtUrl) {
...
    }
}

and in Spring:

    <jaxrs:server id="buttonWebServiceRest"
        address="/rest/">
        <jaxrs:serviceBeans>
            <ref bean="buttonWebServiceImpl" />
        </jaxrs:serviceBeans>
    </jaxrs:server>


Have any glue on that?


Further questions:

- My SimpleResponse extend the javax Response as I red in the JAXRS new
documentation that this is a requirement for the HTTPMerthod annotation. Is
this valid also for the @GET annotation? How I have to implement it?

- Before the JAXRS implementation I always used to put the annotations at
the interface level but now in this way it doesn't seem to work anymore. I'm
missing something to make it possible? Maybe is this a JAXRS specification?




Thanks in advance,
Vicio.

Reply via email to