In soap there is WSDL for communication but in rest what is there ?

断了今生、忘了曾经 提交于 2019-12-24 07:06:19

问题


In SOAP there is WSDL for communication. I read in blogs that WSDL 2.0 supports REST but it is not properly define the REST so is there any equivalent for REST ? I'm doing communication using JSON data between client and server so i need something that properly fit for communication so is there is something for this ?


回答1:


There are different proposals in the industry, such as WADL (see http://en.wikipedia.org/wiki/Web_Application_Description_Language ), but unfortunately there is no commonly accepted REST metadata standard yet.




回答2:


In real WSDL can be used for REST but in reality it is not best fit for REST.




回答3:


I would rather stay away from using WADL or any other descriptive languages, when it comes to REST style. RESTful services are fundamentally well-defined and self-descriptive in nature, hence the name Representational State Transfer. Given that they adhere to the HTTP vocabulary (CRUD) and payload structure can be any character-set (raw, JSON, XML. etc.), there is no need for any standard descriptive language.

This is the fundamental shift from SOAP based services, where application developers need to worry about describing the service interfaces in WSDL for discovery and other purposes.



来源:https://stackoverflow.com/questions/13913264/in-soap-there-is-wsdl-for-communication-but-in-rest-what-is-there

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!