Where/When/How does the QuickStart.Samples.SimpleService.EchoString method and namespace get registered into ATLAS. I know this is the namespace from my asmx file with the service and method name, but how does the web page get this information? The Atlas
libraries are static so they aren't changing, and there's nothing in my aspx page, so where does this call go to and how is it hooked up into my page?
I did do some digging and found this in the web.config:
so I can see that when we call an .asmx file something is going on, but again, how/where does the Quickstart.Samples.SimpleService.EchoString get linked to the .asmx file?
The atlas client library calls this script reference to obtain a proxy. The 'atlas' server framework will generate a JavaScript proxy from the .asmx class definition on the server. This script proxy is downloaded as regular javascript and this gives you
Quickstart.Samples.SimpleService.EchoString
crelus
Member
15 Points
3 Posts
Calling web services - under the hood
Jan 02, 2006 08:48 PM|LINK
Hi,
Is there any place I can get more information on how ATLAS is working under the hood. For example, the quick start has this:
requestSimpleService = Quickstart.Samples.SimpleService.EchoString(
"SomeText", //params
OnComplete, //Complete event
OnTimeout //Timeout event
);
Where/When/How does the QuickStart.Samples.SimpleService.EchoString method and namespace get registered into ATLAS. I know this is the namespace from my asmx file with the service and method name, but how does the web page get this information? The Atlas libraries are static so they aren't changing, and there's nothing in my aspx page, so where does this call go to and how is it hooked up into my page?
I did do some digging and found this in the web.config:
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" type="Microsoft.Web.Services.ScriptHandlerFactory" validate="false"/>
</httpHandlers>
<httpModules>
<add name="ScriptModule" type="Microsoft.Web.Services.ScriptModule"/>
</httpModules>
so I can see that when we call an .asmx file something is going on, but again, how/where does the Quickstart.Samples.SimpleService.EchoString get linked to the .asmx file?
When I call
requestSimpleService = Quickstart.Samples.SimpleService.EchoString(
"SomeText", //params
OnComplete, //Complete event
OnTimeout //Timeout event
);
somehow this data gets sent out to the .asmx file through some kind of proxy, but how does this all come about? Any information would be appreciated.
Thanks
jhawk
Member
281 Points
58 Posts
Microsoft
Re: Calling web services - under the hood
Jan 03, 2006 06:17 PM|LINK
Tip: Perform a View -> Source in the browser to see what is happening under the covers. Beware this may change in the future releases.
The .aspx page has a reference to the .asmx in the atlas:ServiceReference element of the atlas:ScriptManager.
<atlas:ScriptManager ID="scriptManager" runat="server" EnableScriptComponents="false" >
<Services>
<atlas:ServiceReference Path="SimpleService.asmx" />
</Services>
</atlas:ScriptManager>
When the .aspx page is rendered on the server a dynamic script reference is made in the rendered page to the .asmx i.e.
<script type="text/xml-script">
<page xmlns:script="http://schemas.microsoft.com/xml-script/2005">
<references>
<add src="SimpleService.asmx/js" />
</references>
The atlas client library calls this script reference to obtain a proxy. The 'atlas' server framework will generate a JavaScript proxy from the .asmx class definition on the server. This script proxy is downloaded as regular javascript and this gives you Quickstart.Samples.SimpleService.EchoString
http://atlas.asp.net/quickstart/util/srcview.aspx?path=~/atlas/samples/services/Simple.src
thanks
-jhawk
crelus
Member
15 Points
3 Posts
Re: Calling web services - under the hood
Jan 03, 2006 08:32 PM|LINK