问题
I am currently learning Glassfish and I see that it is possible to add the annotation @WebService (javax.jws.WebService) and the container will automatically enable a SOAP web service for the particular bean. Since I am not really interested in using SOAP, I was wondering if the same can be accomplished using the server built-in functionality but for a RESTful service, without explicitly writing my own.
Thanks
回答1:
JAX-RS (the standard) and Jersey (one implementation of this standard) is what you are looking for. Have a look at the Jersey site for documentation: http://jersey.java.net/. You will also find tutorials on the Netbeans site.
来源:https://stackoverflow.com/questions/12654579/glassfish-built-in-restful-ejb-interface-in-addition-to-soap