This is what we need to do, to make create proxy and make it work
Ø Using WSDL.exe ( found under ..\Program Files\Microsoft SDKs\Windows\v6.0A\bin ) run the command wsdl /out:myProxyClass.cs “http://hostServer/WebserviceRoot/WebServiceName.asmx?WSDL”
Ø Create dll using the proxy cs file. This can be done using CSC.exe ( found under ..\Windows\Microsoft.NET\Framework\vx ) and running the command
csc /out:CodeBehindCompiled.dll /target:library CodeBehind_compiled.cs
Note that there is a space between “csc”, “/out…”, “/target…” and “CodeBehind….”.
Ø Now deploy the dll in the bin folder of the SharePoint web application bin directory ( found under ..\inetpub\wwwroot\wss\virtualdirectories\..\bin)
Ø Add the SafeControl entry for both the web part and the proxy dll in the web.config file.
Ø Have the code for referring the class name of the proxy class for ObjectDataSource.
Ø In the web.config file, give Full trust level
<trust level=”Full” originUrl=””/>
That’s it. Now add the web part in the SharePoint page and you should see the web service data in it !
PingBack from http://asp-net-hosting.simplynetdev.com/using-user-control-web-service-call-in-sharepoint-web-part/
PingBack from http://microsoft-sharepoint.simplynetdev.com/using-user-control-web-service-call-in-sharepoint-web-part/
PingBack from http://www.anith.com/?p=44685
Why is it that the ObjectDataSource does not work? Is there a way to get around it? Also if I don't have an option to run it with full trust level what can I do?
Thanks.