开发者

How to read a wsdl file in c#

What is the appropriate way to interact/read a .wsdl file in C#? As in, what objects sh开发者_Python百科ould I be using, etc.


Based on your comment you don't need programatic access therefore the answer to the actual question is not what you need. You need the tools to generate code to call a Web Service. It is done by right clicking on references in the Visual Studio project and selecting Add Service Reference. There you give the URL of the WSDL or the WSDL file. The tool will generate proxy classes for web service calls. The Visual Studio UI I believe is just a GUI for a console tool called svcutil.exe (may be wrong on this).

On how to work with the actual client code just search for "calling SOAP web service with .NET" or something similar.


The ServiceDescription class provides support for reading, modifying and writing WSDL files.


You can read it like an XML file so with DOM or SAX. But if you intend to connect to a specific webservices you should generate the proxy class (with the Visual studio wizard or with wsdl.exe).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜