什么是一个基于REST的服务的WSDL的地步? [英] What is the point in a WSDL with a rest based service?

查看:176
本文介绍了什么是一个基于REST的服务的WSDL的地步?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果基于REST的Web服务一样简单,歌厅和张贴到一个网址和解析西隧做准确的响应,我们需要一个WSDL?重点是什么。据我所知,使用基于SOAP服务时,它被用来构造SOAP请求和响应,但真的不明白为什么Visual Studio提供了我一个WSDL当我创建一个基于REST的服务...

If REST based web services are as simple as GETing and POSTing to a url and parsing the response wht exactly do we need a wsdl? Whats the point. I understand that when using SOAP based services it is used to construct the SOAP requests and responses but dont really see why visual studio provides me with a wsdl when I create a REST based service...

推荐答案

有在WSDL与WCF创建REST服务没有意义,因为只有WCF支持WSDL 1.1(或1.0),它无法描述REST seevice。如果您尝试使用WCF REST服务生成的WSDL来创建一个客户端代理,你将无法反正调用服务。对REST Visual Studio的模板不暴露元数据,以便只有当您添加serviceMetada行为(也可能MEX端点)自己会得到无用的WSDL。

There is no point in WSDL for REST services created with WCF because WCF supports only WSDL 1.1 (or 1.0) which cannot describe REST seevice. If you try to use WSDL generated for WCF REST service to create a client proxy you will not be able to call the service anyway. Visual studio templates for REST don't expose metadata so you will get useless WSDL only if you add serviceMetada behavior (and possibly also mex endpoint) yourselves.

WSDL 2.0和WADL支持REST服务描述和观点是与SOAP服务类似 - 形容你可以通过该服务,但在REST方式做什么

WSDL 2.0 and WADL supports description of REST services and the point is similar as with SOAP services - describe what you can do with the service but in the REST way.

这篇关于什么是一个基于REST的服务的WSDL的地步?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆