Yes, its quite easy actually, I do it everywhere is my app. Attached is a simple dialog from my app that demonstrates the technique. I preload the xml config file into a static object called FX.AppCfg.current.config using a simple HTTPService with a relative path to the app url then I can pull the services.baseUrl from there in the initDialog() method of the sample.
I've been converting my app to use the ServiceLocator/TokenResponder pattern from the Adobe restaurant finder sample. It produces much cleaner code and only requires one WSDL call per service url. But if you app is fairly small or you prefer MXML to AS then the above technique should work well. - Kelly -----Original Message----- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of ben.clinkinbeard Sent: Friday, July 07, 2006 12:05 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Does Flex 2 support dynamic WSDL locations? Hello, I am trying to port our AS2 app to Flex 2 and am having a problem with dynamic WSDL locations. I found a couple of threads stating that this is not possible in 1.5. My app loads a config.xml file at startup which contains the WSDL paths for use in the rest of the app. The config file is dynamically generated to accomodate whichever environment the app has been deployed to. If this is not possible it could be a complete deal breaker for moving the app to Flex. Is this possible in Flex 2? If so, how do you do it? Here is my code: // my WebService tag <mx:WebService id="industryAndSizeIdsService" makeObjectsBindable="false" wsdl="{TestModel.getInstance()[EMAIL PROTECTED] + '?WSDL'}" useProxy="false" showBusyCursor="true"> <mx:operation name="GetDataByGrouping" resultFormat="e4x"> <mx:request xmlns="http://site.com/BackOffice/ClientMeasures"> <groupingRequests> <GroupName>RPRToolStaticData</GroupName> </groupingRequests> </mx:request> </mx:operation> </mx:WebService> I know the variable that wsdl is bound to exists because I can display it in a text field without a problem. Any help is greatly appreciated. Ben ------------------------ Yahoo! Groups Sponsor --------------------~--> Something is new at Yahoo! Groups. Check out the enhanced email design. http://us.click.yahoo.com/SISQkA/gOaOAA/yQLSAA/nhFolB/TM --------------------------------------------------------------------~-> -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links ------------------------ Yahoo! Groups Sponsor --------------------~--> See what's inside the new Yahoo! Groups email. http://us.click.yahoo.com/2pRQfA/bOaOAA/yQLSAA/nhFolB/TM --------------------------------------------------------------------~-> -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
ExitDialog.mxml
Description: Binary data