Sunday, January 9, 2011

how to consume web service in atlas


There are two ways by which we can consume a web service one is using ‘Services’ tag and the other is by using
properties defined in Ajax components like ‘ServicePath’ , ‘ServiceMethod’ and ‘ServiceURL’. 
We can define the web service URL in the ‘Services’ tag using ‘atlas:ServiceReference’ tag. ‘Path’ property defines the web
service URL. If we also want to generate javascript proxy we need to set the ‘GenerateProxy’ to true. We have also set
one more property i.e. ‘InlineProxy’ property needs to be true so that the proxy code is available to the client javascript.
<atlas:ScriptManager IP="ScriptManager1" runat="server" EnablePartialRendering="True">
<Services>
     <atlas:ServicesReference InlineProxy="true" GenerateProxy="true" Path="webservice.asmx"/>
</Services>
</atlas:ScriptManager>

No comments:

Post a Comment