Home > Articles > Programming > Java

  • Print
  • + Share This
Like this article? We recommend

Like this article? We recommend

Turning Simple Java Classes into Web Services

Turning Simple Java Classes into Web Services

Wouldn't it be nice if you had an existing Java application that had classes and methods which could easily be converted to web service components or endpoints? With JEE 6, using Plain Old Java Objects (POJOs), you can do just that with the help of annotations.

Annotations have been around for awhile (since JEE 5), but as the specifications evolve, so do the annotations they use. With the introduction of JAX-RS came a series of new annotations for marking up POJOs as web services.

Converting existing methods/classes into web services will be saved for a later article, as it goes beyond the scope of creating RESTful web services using JAX-RS from scratch. With that in mind, let's code a simple "hello world" example from scratch using annotations that map to HTTP methods for basic CRUD operations.

  • + Share This
  • 🔖 Save To Your Account