how to generate client proxy class of a wcf service that will work in the .net 2.0

你离开我真会死。 提交于 2019-12-04 17:29:32

Finally after much struggling over it, i have resolved the issue. Now i have successfully created the proxy class of the wcf service and also it is now working in .net 2.0.

I have gone through the following steps:--

Note: this will work only if the wcf sercice(.svc) will be using BasicHttpBinding which is similar to webservice (.asmx)

Step1:- run the following command on the visual studio command prompt.

svcutil.exe /target:metadata http://Your service address

It will create wsdl file with some other files in the path C:\Program Files\Microsoft Visual Studio 10.0\VC

Step2:- Now run the wsdl command

wsdl.exe tempuri.org.wsdl tempuri.org.xsd schemas.microsoft.com.2003.10.Serialization.xsd

This will generate a v2.0 client proxy class that can be used to access the service.

Note: if some error occurs in the wsdl command, Use all the files name instead of using these three separated by space..

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