I have created a REST web service and successfully used it with a client. The issue I am facing is that when I am calling any method of the service then I have to provide the ‘Path’ of the method to the client. But for a real time service how one could know that what are the methods exposed by the service and what are their ‘Paths’.
In SOAP based services the same could be specified in the WSDL file and just by accessing the WSDL file the client could make out that what are the methods exposed by the service.
Is there any similar way with REST web services such that if the client only knows the URL of the service then it could find what are the methods present in the service and what are their paths and thus could use them by appending their paths to the URL of the service.
Thanks
no, Rest web services are expected to follow an Object pattern where a GET request to http://www…/company would return all the companies, a POST to http://www…/company with some data would add a new company to a list / db, a DELETE would delete and so on.
So developers should be able to figure how to use each URL, but in the same way you have to find a website or know its URL, you have to be told the locations of these services.