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

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -