I pass the url to the data service in via flashvars as Scott suggests.
I find this very useful for debugging, since I can debug my app under
FlexBuilder, running against the QA deployment of my dot.net data
services, but, if I need to debug the data service, I just change the
variable value in the htm wrapper to point to my dot.net development
environment.

 

Tracy

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Scott Melby
Sent: Wednesday, April 23, 2008 5:48 AM
To: [email protected]
Subject: Re: [flexcoders] How do I call the correct web services server
in Flex

 

If your swf is embedded on a page that is loaded from the web server, 
then relative URLs will get you want you want. If you must use absolute 
URLs, then you will probably need to pass the hostname/port information 
over to the application via flashvars or in the result of an initial 
request back to the originating server (with relative URL of course) 
that returns the desired configuration data.

hth
Scott

Scott Melby
Founder, Fast Lane Software LLC
http://www.fastlanesw.com <http://www.fastlanesw.com> 
http://blog.fastlanesw.com <http://blog.fastlanesw.com> 

scarfire2004 wrote:
> I have 3 different platforms/web farms at work. 
>
> Development
> System Test
> Production
>
> I will eventually have to host Flex SWFs on one machine and web
> services on another (don't ask why - just doing what I am told). 
>
> What are other people doing to be certain that their Flex SWF file
> calls the correct domain for web services? In ASP.Net this would
> probably be in a web.config file. Does anyone have sample code I can
> use? It must be a common problem that everyone has to deal with.
>
> Thanks
> Todd
>
>
>
> 

 

Reply via email to