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 ?


Popular posts from this blog

javascript - Js, document.getElementById("ID").innerHTML, error -

objective c - Is there a way in OCMockito to make stubs fail when an unknown method is called? -

jquery - jqGrid update specific column data with out refreshing the entire column? -