How can I consume a WCF service using a local WSDL file?

谁说我不能喝 提交于 2019-12-18 21:52:13

问题


I need to consume a WCF service based on a (preferably single) wsdl file.

The environment is VS-2008 (sp1), and I will be using a customized "Add Service Reference" macro to generate an error handling proxy. I want to be able to do this, by supplying a WSDL file that I get from the service provider (I do not want to supply a host URL).

How can this be done?


回答1:


Sure - you can copy the path+filename for the WSDL and paste that into the "Add Service Reference" dialog box in Visual Studio (or just type int the full path + WSDL file name).

Alternatively, you can use the svcutil.exe command line utility to convert the WSDL file to your client proxy class.



来源:https://stackoverflow.com/questions/1483178/how-can-i-consume-a-wcf-service-using-a-local-wsdl-file

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!