I have below code INTERFACE consuming application xml
@Path("/user")
public interface UserService {
@CONSUMES(MediaType.APPLICATION_XML)
@POST
@Path("/{userId}")
public Response creaTeUser(@PathParam("userId") Long userId);
}
I have implementation which consume application JSON
class UserServiceImpl implements UserService {
@Override
@POST
@Path("/{userId}")
@CONSUMES(MediaType.APPLICATION_JSON)
public Response getUser(@PathParam("userId") Long userId) {
// TODO Auto-generated method stub
return null;
}
}
when i do post user what will be actual media type