Hi all,
I would like to create an ASP.Net Atlas application that will call a remote web service. I have checked a few samples and I have only seen examples where the web service sits on the same project as the Atlas application. Is there a way of calling a single remote web service with ATLAS or do I have to use a bridge?
Thanks
Regards
Stephanie
Never tryed, is this going to work?
<atlas:ScriptManager ID="ScriptManager1" runat="server">
<Services>
<atlas:ServiceReference Path="http://somedoamin/someApp/WebService.asmx" />
</Services>
</atlas:ScriptManager>
I believe that should work if that cross domain webservice is an atlas webservice and:
1) The iframehandler is registered in your web.config.
<add verb="*" path="iframecall.axd" type="Microsoft.Web.Services.IFrameHandler" validate="false"/>
2) You have a WebOperation attribute on your web service that allows crossdomain posts (third parameter to the attribute constructor) i.e.
[WebOperation(true, ResponseFormatMode.Json, true)]
Hope that helps,
-Hao
Oh, and if your remote web service is not an atlas webservice, then I believe you would have to use a bridge.
I have tried that without any success
I have tried that without any success.
Xiyuan Shen:
Never tryed, is this going to work?
<atlas:ScriptManager ID="ScriptManager1" runat="server">
<Services>
<atlas:ServiceReference Path="http://somedoamin/someApp/WebService.asmx" />
</Services>
</atlas:ScriptManager>
Hi,
The server where ATLAS app will be and the server where the web service will be are on the same domain, same site.
Is there another solution for that case?
Thanks
Stephanie
HaoK:
I believe that should work if that cross domain webservice is an atlas webservice and:
1) The iframehandler is registered in your web.config.
<add verb="*" path="iframecall.axd" type="Microsoft.Web.Services.IFrameHandler" validate="false"/>
2) You have a WebOperation attribute on your web service that allows crossdomain posts (third parameter to the attribute constructor) i.e.[WebOperation(true, ResponseFormatMode.Json, true)]
Hope that helps,
-Hao
If I read Haok's comments right. I think the web service you refer to should run under asp.net 2.0, also the web.config file for the web service should be modified to use
Microsoft.Web.Services.ScriptHandlerFactory for handling web service request.
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" type="Microsoft.Web.Services.ScriptHandlerFactory" validate="false"/>
</httpHandlers>
So even if the webservice is on the same site and same domain, it stillneeds to be running atlas if you wish to access it using the atlasclient script proxies, so what Xiyuan mentions above is what you needon the web service site to enable generation of the client scriptproxies.
Hope that helps,
-Hao