aspose file tools
The moose likes SOA and ESB and the fly likes how correctly produce json by RESTFUL web service on Fuse ESB? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » SOA and ESB
Reply Bookmark "how correctly produce json by RESTFUL web service on Fuse ESB?" Watch "how correctly produce json by RESTFUL web service on Fuse ESB?" New topic
Author

how correctly produce json by RESTFUL web service on Fuse ESB?

eman azmy
Greenhorn

Joined: Jan 02, 2013
Posts: 1
I'm using FUSE ESB and CXf and JSON, I implement a restful web service as the following:

RestFul Method:
@GET
@Path("/user")
@Produces(MediaType.APPLICATION_JSON)
public User handleGeUser() {
User user = new User();
return user;
}
The provider in the bundle-context.xml
<jaxrs:providers>
<bean class="org.apache.cxf.jaxrs.provider.JSONProvider">
<property name="dropRootElement" value="true" />
<property name="supportUnwrapped" value="true" />
</bean>
</jaxrs:providers>


and I got this error "No message body writer has been found for response class User." when calling the my rest service.

could any one advise?
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: how correctly produce json by RESTFUL web service on Fuse ESB?
 
Similar Threads
Spring: Not able to redirect to a bean
Spring-Hibernate transaction management
ContentNegotiatingViewResolver
Tiles view and Json view independently
Multiple Web Service Clients in Spring