cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CXF-3617) Automatic Type Converters for Restful Clients
Date Thu, 21 Jul 2011 11:36:58 GMT

    [ https://issues.apache.org/jira/browse/CXF-3617?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13068919#comment-13068919
] 

Sergey Beryozkin commented on CXF-3617:
---------------------------------------

Sorry - saw this issue but got sidetracked, 

You can register Jackson provider or xStream one (as suggested at StackOverflow page you linked
to) when creating WebClient.
Do you agree this is a non-fix issue, but mainly a configuration issue ?

> Automatic Type Converters for Restful Clients
> ---------------------------------------------
>
>                 Key: CXF-3617
>                 URL: https://issues.apache.org/jira/browse/CXF-3617
>             Project: CXF
>          Issue Type: Improvement
>          Components: JAX-RS
>            Reporter: Shaun Elliott
>
> Given the following interface:
> {code}
> @POST
> @Path( "execute" )
> @Produces( "application/json" )
> MyObject execute( MyObject myObject );
> {code}
> One must provide MessageBodyReader\Writer or face the following exception:
> {code}
> Exception in thread "main" org.apache.cxf.interceptor.Fault: .No message body writer
found for class : class com.company.datatype.normal.MyObject.
>     at org.apache.cxf.jaxrs.client.ClientProxyImpl$BodyWriter.handleMessage(ClientProxyImpl.java:523)
>     at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
>     at org.apache.cxf.jaxrs.client.ClientProxyImpl.doChainedInvocation(ClientProxyImpl.java:438)
>     at org.apache.cxf.jaxrs.client.ClientProxyImpl.invoke(ClientProxyImpl.java:177)
>     at $Proxy13.execute(Unknown Source)
>     at com.company.JaxTestClient.main(JaxTestClient.java:26)
> {code}
> Other competing libraries (such as Restlet) support automatic type mapping out of the
box via XStream and Jackson. Given CXF's compliance to JAX-RS it would be helpful if this
boilerplate type code were given out of the box too.
> See here for more information: 
> http://stackoverflow.com/questions/6312030/cxf-no-message-body-writer-found-for-class-automatically-mapping-non-simple-re

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message