Glass Fish |
MOXy is enabled by default if you add the dependency to your Maven project.
This is a great feature, and I wanted to give it a spin instead of using Jackson, or Jettison. The usage was as simple as adding a
@XmlRootElement
annotation to the model class. The rest was handled automagically.The entire project including a war file are available on Github: jaxrs-form-data-parameters.
A simple platform independent file is used to setup the application.
We set up web resource (service) to handle our requests.
That's it! You now have a JAX-RS Web Service. The project runs successfully on GlassFish 5.0 (.war file on GitHub).
NOTE: MOXy has some issues running on GlassFish 4.1, 4.1.1, and 4.2.
0 comments :
Post a Comment