-
1. Re: rest calls another rest, but classCastException while passing around POJO
seungchan.lee-evault.com Jun 14, 2013 11:10 AM (in response to seungchan.lee-evault.com)I think I should rephrase this question ...
I have a rest service:
@Path("/")
@Produces("application/json")
public interface DataServiceResource {
@GET
@Path("/account/{param}")
Account getAccount(@PathParam("param") String accountId);
}
I have another service which uses this DataService from inside of bean:
@Service(HelloRestService.class)
public class HelloRestServiceBean implements HelloRestService {
@Override
public Account getAccount(String accountId) {
Account a = dataService.getAccount(accountId);
return al;
}
..
}
Obviously, DataService getAccount() returns the json representation of Account instance and ths line Account a = dataService.getAccount(accountId); in HelloRestServiceBean throws ClassCastException without any transform, I think. I'd like to know how to write this transformer and where to put it??
Thanks
-
2. Re: rest calls another rest, but classCastException while passing around POJO
kcbabo Jun 19, 2013 12:14 PM (in response to seungchan.lee-evault.com)Attach the entire application and we can provide some advice.