Using Java tools,
wscompile for RPC
wsimport for Document
etc..
I can use WSDL to generate the stub and Classes required to hit the SOAP Web Service.
But I have no idea how I can do the same in REST. How can I get the Java classes required for hitting the REST Web Service. What is the way to hit the service anyway?
Can anyone show me the way?
You can able to consume a Restful Web service in Spring using RestTemplate.class.
Example :
Reference
Its just a 2 line of code.
Ref. Spring.io consuming-rest
As others have said, you can do it using the lower level HTTP API, or you can use the higher level JAXRS APIs to consume a service as JSON. For example:
From your question its not clear whether you are using any frameworks.For REST you will be getting an WADL & Apache CXF recently added support for WADL-first development of REST services.Please go through http://cxf.apache.org/docs/index.html
Look at Jersey. Again, REST is all about the data. And a tutorial here