从WSDL文件在Visual Studio中的Web服务代理 [英] Create web service proxy in Visual Studio from a WSDL file

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

问题描述

我的应用程序需要跟那个还没有得到一个在线的WSDL定义的Web服务。然而,开发商给我提供了一个WSDL文件。

My application needs to talk to a web service that hasn't got an online WSDL definition. The developers however supplied me with a WSDL file.

通过一个公共的WSDL的Visual Studio可以使用服务引用向导生成这个code我。但它似乎并不没有公开WSDL工作。

With a public WSDL Visual Studio can generate this code for me using the Service Reference wizard. But it doesn't seem to work without a public WSDL.

如何生成的$ C $下使用此WSDL文件谈论这个Web服务?

How do I generate the code for talking to this web service using this WSDL file?

推荐答案

尝试使用的 WSDL.EXE 然后包括生成的文件(的.cs)到项目中。

Try using WSDL.exe and then including the generated file (.cs) into your project.

火了Visual Studio命令提示符(在Visual Studio中/在开始菜单的工具),然后键入

Fire up the Visual Studio Command prompt (under visual studio/tools in the start menu) then type

>wsdl.exe [path To Your WSDL File]

这会吐出一个文件,该文件复制/移动,包括在您的项目。该文件包含一个类这是您的服务队代理,火了这个类的一个实例,它就会有一个URL属性,你可以在飞行中集,和一堆的,你可以调用的方法。它也将生成类所有的/在服务接口传递任何复杂的对象。

That'll spit out a file, which you copy/move and include in your project. That file contains a class which is a proxy to your sevice, Fire up an instance of that class, and it'll have a URL property you can set on the fly, and a bunch of methods that you can call. It'll also generate classes for all/any complex objects passed across the service interface.

这篇关于从WSDL文件在Visual Studio中的Web服务代理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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