I have to use a wcf service in the ssis script component which is developing in BIDS 2005. For this i have generated the proxy class of that service using svcutil.exe
. After attaching the proxy class in the script component it has error of some class such as System.Runtime.Serialization.DataContractAttribute
is not defined. Any suggestion how can i resolve this issue.. Or can wsdl is used to genrate proxy class of wcf service. so that it can be used in the .net 2.0.
Thanks
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.
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..