生成从WSDL web服务 [英] Generate webservice from wsdl

查看:137
本文介绍了生成从WSDL web服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这也许是一个非常简单的问题,但我无法找到一个答案:

This is maybe a really simple question, but I couldn't locate an answer:

有关客户,我需要HOST一个web服务。客户端派我一个WSDL文件的WebService应落实。我怎么去的?我已经产生的任何数目的客户rpoxies的但这是其他方式。我可以同时使用ASP.NET 2.0 Web服务或Windows Communication Foundation的。

For a client I need to HOST a webservice. The client has sent me a wsdl file that the webservice should 'implement'. How do I go about that? I've generated any number of client-rpoxies but this is the other way around. I can use both ASP.NET 2.0 webservices or Windows Communication Foundation.

推荐答案

Wsdl.exe用/服务器

生成一个抽象类为XML
  基于所述合同Web服务。
  默认为生成客户
  代理类。当使用
  /参数选项,这个值是
   包含元素
  服务器。

Generates an abstract class for an XML Web service based on the contracts. The default is to generate client proxy classes. When using the /parameters option, this value is a element that contains "server".

您可以做svcutil.exe的一个类似的事情WCF-是这样的:

You can do a similar thing with svcutil.exe for WCF- something like:

svcutil.exe的thewsdl.wsdl /语言:C#/out:ITheInterface.cs(我没有测试这个)

svcutil.exe thewsdl.wsdl /language:c# /out:ITheInterface.cs (I've not tested this).

编辑 - 约翰·桑德斯也是一个不错的点,他的回答approach-利于WCF,我建议这一点。

Edit- John Saunders makes a good point in his answer to favour the WCF approach- I recommend this too.

这篇关于生成从WSDL web服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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