简体   繁体   English

RESTful WCF 服务代理

[英]Proxy for RESTful WCF service

My standard WCF/ RESTful service is going to return big complex object. In WCF as and when someone adds the service reference it creates a proxy of it, ie I am exposing data contract to client and its strongly typed at the client level.我的标准 WCF/RESTful 服务将返回大型复杂 object。在 WCF 中,当有人添加服务引用时,它会创建它的代理,即我向客户端公开数据合同,并在客户端级别强类型化。

How are we going to do with RESTful service, is there anyway to the same for RESTful service.我们将如何处理 RESTful 服务,RESTful 服务是否也一样。

One of the benefits of RESTful services is that they are lightweight. RESTful 服务的好处之一是它们是轻量级的。 That implies no infrastructure like WSDL files, proxies, etc.这意味着没有像 WSDL 文件、代理等基础设施。

RESTful services are not self-describing, so you don't have to worry about providing a WSDL file; RESTful 服务不是自描述的,因此您不必担心提供 WSDL 文件; maintaining all the schemas online, etc.在线维护所有模式等。


If the payload is complex, then why are you using REST?如果有效载荷很复杂,那你为什么要使用 REST? Just because it's a fad?仅仅因为它是一种时尚? Do the operations on your service correspond to HTTP operations on "resources" as the HTTP Protocol specification defines it?您的服务上的操作是否对应于 HTTP 协议规范定义的“资源”上的 HTTP 操作?

If not, then don't use REST.如果不是,则不要使用 REST。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM