WCF 代理生成:svcutil.exe 与 wsdl.exe [英] WCF proxy generation: svcutil.exe vs wsdl.exe

查看:29
本文介绍了WCF 代理生成:svcutil.exe 与 wsdl.exe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有来自 WebService 的 .wsdl 和 .xsd 文件,需要通过它们生成代理.Svcutil.exe 和 wsdl.exe 生成非常不同的输出.这两种代理生成工具有什么区别,哪种方式更可取?

I have .wsdl and .xsd files from WebService and need to generate proxy by them. Svcutil.exe and wsdl.exe generate very different output. What is the difference between these two tools for proxy generation and which way is more preferable?

推荐答案

Svcutil 和 wsdl 是两种不同的技术,用于生成使用服务的代理.但是 wsdl.exe 是为旧的 .NET 2.0 Web 服务制作的.它就像旧版本的 svcutil.Svcutil 允许您为 Web 服务和 WCF 服务生成代理.为了生成代理,wsdl 通过 DISCO discovery 协议检索数据.Svcutil 还支持 DISCO.但它可以使用WS-Metadata Exchange协议进行代理检索,这是一个互操作的标准的 SOA.

Svcutil and wsdl are two different technologies for generating a proxy for consuming your service. But wsdl.exe was made for old .NET 2.0 web services. It is like old version of svcutil. Svcutil allows you to generate proxies for both - web services and WCF services. For generating a proxy wsdl retieves the data by means of DISCO discovery protocol. Svcutil also supports DISCO. But it can make the proxy retrieval using WS-Metadata Exchange protocol, which is an interopable standart of SOA.

我建议您使用 svcutil,因为它可以让您同时使用 .net 2.0 Web 服务和 wcf 服务.

I advice you to use svcutil because it would allow you to consume both .net 2.0 web services and wcf services.

这篇关于WCF 代理生成:svcutil.exe 与 wsdl.exe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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