JAXRS client ne peut pas trouver le corps du message de l'écrivain

J'ai un jaxrs client configuré comme ceci:

<jaxrs:client id="opaRestProxy" name="opaRestProxy"
        address="${endpoint}" serviceClass="com.test.RestProxy"
        inheritHeaders="true" threadSafe="true">
        <jaxrs:headers>
            <entry key="Accept" value="application/json" />
            <entry key="Content-Type" value="application/json" />
        </jaxrs:headers>
    </jaxrs:client>

Mais quand j'envoie une demande, j'obtiens l'exception suivante:

Caused by: org.apache.cxf.interceptor.Fault: .No message body writer has been found for class : class com.test.RequestObject, ContentType : application/json.
    at org.apache.cxf.jaxrs.client.ClientProxyImpl$BodyWriter.handleMessage(ClientProxyImpl.java:646)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
    at org.apache.cxf.jaxrs.client.ClientProxyImpl.doChainedInvocation(ClientProxyImpl.java:527)
    ... 47 more

Mon RestProxy classe ressemble à ceci:

@Component
public interface RestProxy {

  @POST
  @Path("/getSomething")
  String getSomething(RequestObject RequestObject);
}
Êtes-vous à l'aide d'un JSON bibliothèque? Il semble que vous n'avez pas de fournisseur de configuré.
comment faire pour configurer le fournisseur pour une bibliothèque comme Jackson

OriginalL'auteur wvp | 2014-07-09