Could you test it with one of the latest releases (CXF 3.2.6 / 3.1.16) in
case it's a bug that has been subsequently fixed?

Colm.

On Fri, Sep 14, 2018 at 3:06 PM Bertrand TROLARD <[email protected]>
wrote:

> Hi,
>
> I got a problem with a REST service when I use CXF 3.x, it's working
> fine with CXF 2.7.
> "No message body writer has been found for class java.lang.Integer"
>
> Response-Code: 500
> Content-Type: text/plain
> Headers: {Content-Type=[plain/text], Date=[Fri, 14 Sep 2018 13:41:18 GMT]}
> Payload: No message body writer has been found for class
> java.lang.Integer, ContentType: plain/text
>
>
> I got this error with this function :
>      @POST
>      @Path("/state/")
>      public int getStateBatchResult(@QueryParam("uid") String id);
>
>
> I use SPRING to define the service
>      <jaxrs:server xmlns:tns="http://www.xxx/AnalyzeRESTService";
> id="restServer" address="/asynchrone" serviceName="tns:AnalyzeREST" >
>          <jaxrs:serviceBeans>
>              <ref bean="serviceImplCXF"/>
>          </jaxrs:serviceBeans>
>          <jaxrs:features>
>              <bean class="org.apache.cxf.feature.LoggingFeature" />
>          </jaxrs:features>
>          <jaxrs:dataBinding>
>              <bean class="org.apache.cxf.jaxb.JAXBDataBinding"/>
>          </jaxrs:dataBinding>
>      </jaxrs:server>
>
> but we have no problem with this one :
>      @POST
>      @Path("/result/")
>      @Produces({"plain/text"})
>      public DataHandler getBatchResultDH(@QueryParam("uid") String id,
>              @QueryParam("comp") int typeCompression);
>
>
> I test it with eclipse, Java 8, CXF 3.1.4 or 3.0.16
>
> Do I miss some dependencies or something else ?
>
> Thanks,
> Bertrand
>
>

-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com

Reply via email to