如何从代码中使用WSDL服务? [英] How to consume WSDL service from code?
问题描述
使用C#,如何在不使用Visual Studio中的"添加Web参考"选项的情况下,仅使用pior代码中的以下Web服务,以便将URL作为代码中的参数。
Using C#, How can I consume below web service in pior code only without using the Add Web Resference option in Visual Studio so the url will be passed as parameter in the code.
https:// www .makani.ae / MakaniPublicDataService / MakaniPublic.svc?wsdl
谢谢,
Jassim
推荐答案
导航到 http://www.makani.ae/MakaniPublicDataService /MakaniPublic.svc 你会发现一些指示。 "svcutil"工具通常位于"C:\Program Files(x86)\ Microsoft *
SDKs \ Windows \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ "。将生成的类添加到项目中,并将生成的配置插入app.config或web.config。
Navigate to http://www.makani.ae/MakaniPublicDataService/MakaniPublic.svc and you will find some instructions. The "svcutil" tool is usually in a folder like "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.7.1 Tools\x64". Add the generated classes to your project and insert the generated configuration to your app.config or web.config.
这篇关于如何从代码中使用WSDL服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!