java - POST using jersey not converting JSON to JAXBObject in REST service -
i writing post rest api service , , service class is
@post @path("/create") @consumes({ mediatype.application_xml, mediatype.application_json }) @produces({ mediatype.application_xml, mediatype.application_json }) public response producejson(student student) { system.out.println("===============" + student.getfirstname()); return response.ok().build(); }
i using dev http client , sending xml request complete student object , working fine. when sending json request student object , provides me student
object null values. student.getfirstname()
coming null , though setting value. solutions ?