0 Replies Latest reply on Mar 26, 2019 2:00 PM by a.mariano

    Rest client on WF16

    a.mariano

      Hi,

       

      I'm facing a problem trying to port my web app from wf14 to wf16.

      The same code(a rest call) works on wf14 but not on wf16.

       

      On wf 16 I have

       

      .....
      javax.ws.rs.ProcessingException: RESTEASY004655: Unable to invoke request
      ......
      Caused by: javax.ws.rs.ProcessingException: RESTEASY003215: could not find writer for content-type application/json type: java.lang.String

       

      The call code is very simple

       

      Response response = ClientBuilder.newBuilder().build().target(serviceUrl).request().post(Entity.entity(request, MediaType.APPLICATION_JSON));

       

      where "request" is the string obtained converting my entity in json using Gson.

       

      I have not any specific "rest" dependencied but

       

      <dependency>

            <groupId>javax</groupId>

            <artifactId>javaee-api</artifactId>

            <version>[8.0]</version>

            <scope>provided</scope>

      </dependency>

       

      Any ideas?  Any help is appreciated.

      Thanks

       

      Antonio