As the REST services do not have a published contract (WSDL), when someone is under discovery process exploring for services that they can re-use, how does he/she locate a REST service and its contract ? SOAP based web services offer WSDL that one can browse through and identify the data fields returned by that service et al. But since REST services are driven off of simple URLs, how to make that determination ? Does one have to look into the code ?
Also, in the absence of a formal contract, how does the consumer and provider come to common terms w/r/t what is expected from each party ?
Recall that REST is an architecture / style - not a messaging API like SOAP.
You drove the nail on its head. Thanks !
Also, thinking more about it, the whole purpose of the discovery process is to establish the re-usability of the services in the inventory. So, a human readable document helps the cause even more to make better decisions compared to navigating through WSDLs, which at times stymies developers ! I think the intent then would be how great a document be produced compared to ones that will get generated from sporadic developer comments (akin to javadocs), which may not be at times explaining things clearly.
Swagger looks cool as well.
Joined: Mar 22, 2005
WSDL and WADL aren't mean't to help with discovery, they're documenting a service in a machine-processable form. That way you can create client-side code for accessing the WS automatically.
The standard for discovering SOAP WS is called UDDI, but after initial enthusiasm, its use has waned to a large degree. There are now no public UDDI directories left that I know of. No comparable standard exists for REST WS.
Joined: Jun 17, 2000
Yep, I totally agree.
However as UDDI is practically non existent, what is the best way to determine the contractual obligations or to assess the fields to/from the service ?
In my company WSDLs and schemas (more so the latter than the former) are primary means of getting this information. We could use tools such as Ignite XML, but they also pour over schema definitions and WSDLs to extract any meaningful info right ?
Sorry, we deviated a little bit from original intent of the post, but love the discussion nevertheless....
Joined: Mar 22, 2005
Neither WSDL/WADL nor UDDI is a substitute for proper documentation. If that's missing, there isn't much that you can do automatically, besides contacting the author of the WS and getting them to provide the necessary information.