WSDL 是如何在 WCF 中编写的? [英] How the WSDL is written in WCF?

查看:34
本文介绍了WSDL 是如何在 WCF 中编写的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道wsdl在wcf中是怎么写的.我知道代理类序列化数据并形成一个soap消息以通过网络发送,以同样的方式,我想知道谁编写了wsdl文件并处理调用的序列化结果.

I want to know how the wsdl is written in wcf. As i know the proxy class serialize the data and form a soap message to send over network, in the same way , i want to know who writes the wsdl file and takes care of serializing results of a call.

推荐答案

抽象的 ServiceHostBase 类有一个名为 CreateDescription 的方法,它也将接受您的服务和操作合同作为您的错误和数据合同并将其转换为 ServiceDescription.然后由 WsdlExporter 进一步处理并转换为 WSDL 和 XSD 文件.输出到 WSDL(和 XSD)的内容在服务类上可用作服务描述"(属性描述")——它包含有关端点、绑定、其他配置设置等的信息.

The abstract ServiceHostBase class has a method called CreateDescription that will take your service and operation contracts as well as your fault and data contracts and turns those into a ServiceDescription. This is then further handled by a WsdlExporter and turned into a WSDL and XSD file. What gets output to the WSDL (and XSD) is available on the service class as the "service description" (property "Description") - it contains information about the endpoints, bindings, other config settings etc.

查看 WsdlExporter 的 MSDN 文档 类.如果您愿意,您甚至可以自定义此过程 - 查看这些博客文章了解更多信息:

Have a look at the MSDN Docs for the WsdlExporter class. You can even customize this process, if you want to - see these blog posts for more info on that:

并查看以下 MSDN 文档:

And have a look at the MSDN docs on:

马克

这篇关于WSDL 是如何在 WCF 中编写的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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