{"rsdb":{"rid":"87972","subhead":"","postdate":"0","aid":"65327","fid":"76","uid":"1","topic":"1","content":"
\n Java<\/a> defines REST support via the Java Specification Request 311 (JSR). This specificiation is called JAX-RS (The Java API for RESTful Web Services). JAX-RS uses annotations to define the REST relevance of Java classes. \n
\n Jersey is the reference implementation for this specification. Jersey contains basically a REST server and a REST client. The core client can be used provides a library to communicate with the server.\n <\/div> \n
\n On the server side Jersey uses a servlet which scans predefined classes to identify RESTful resources. Via the web.xml configuration file for your web application, registers this servlet which is provided by the Jersey distribution\n <\/div> \n
\n This servlet analyzes the incoming HTTP request and selects the correct class and method to respond to this request. This selection is based on annotations in the class and methods.\n <\/div> \n
\n A REST web application consists therefore out of data classes (resources) and services. These two types are typically maintained in different packages as the Jersey servlet will be instructed via the web.xml to scan certain packages for data classes.\n <\/div> \n
\n JAX-RS supports the creation of XML and JSON via the Java Architecture for XML Binding (JAXB).\n <\/div> \n
\n Java Architecture for XML Binding (JAXB) is a Java standard that defines how Java objects are converted from and to XML. It uses a standard set of mappings.\n <\/div> \n
\n JAXB defines an API for reading and writing Java objects to and from XML documents.\n <\/div> \n
\n As JAXB is defined via a specification, it is possible to use different implementations for this standard. JAXB defines a service provider which allows the selection of the JAXB implementation.\n <\/div> \n
\n \n <\/div> \n<\/dd>","orderid":"0","title":"An introduction to JAX-RS and JAXB","smalltitle":"","mid":"0","fname":"JAVA","special_id":"0","bak_id":"0","info":"0","hits":"540","pages":"1","comments":"0","posttime":"2014-11-24 12:04:54","list":"1416801894","username":"admin","author":"","copyfrom":"","copyfromurl":"","titlecolor":"","fonttype":"0","titleicon":"0","picurl":"https:\/\/www.cppentry.com\/upload_files\/","ispic":"0","yz":"1","yzer":"","yztime":"0","levels":"0","levelstime":"0","keywords":"introduction<\/A> JAX-RS<\/A> and<\/A> JAXB<\/A>","jumpurl":"","iframeurl":"","style":"","template":"a:3:{s:4:\"head\";s:0:\"\";s:4:\"foot\";s:0:\"\";s:8:\"bencandy\";s:0:\"\";}","target":"0","ip":"114.215.104.12","lastfid":"0","money":"0","buyuser":"","passwd":"","allowdown":"","allowview":"","editer":"","edittime":"0","begintime":"0","endtime":"0","description":"An introduction to JAX-RS and JAXB","lastview":"1703105351","digg_num":"8350","digg_time":"0","forbidcomment":"0","ifvote":"0","heart":"","htmlname":"","city_id":"0"},"page":"1"}