Simple REST web service using Eclipse
As part of my work I had to create a REST client using Java and I ended up creating a REST web server to test my client
Before you start, you should have a minimum understanding of Web service, HTTP, Eclipse and Java (JAX-RS)
Things you need to have installed JDK, Eclipse and Tomcat (or TomEE). I Used Eclipse Version: 2020-06 (4.16.0) and Tomcat version 9 and JDK 8
Below are the steps
1. Create an eclipse Maven project (File->New->Maven Project or File->New->Other->Maven Project)
Click Next
2. In the next screen, leave the defaults as is and click Next
5. Once eclipse is done, you can create a WAR file and deploy to Tomcat to test the sample Rest webservice and resource
You can test your web service using a client like SOAP UI or Postman
6. Now you can add your custom logic in the generated class or add your own implementation









Comments
Post a Comment