Right, you could use HTTPService to first load this configuration file
and then programmatically set the WSDL to load for each WebService.
 
However, you might need to use the pure ActionScript API as the MXML tag
tries to call loadWSDL for you on component initialization...
 
 
import mx.rpc.soap.WebService;
 
var ws:WebService = new WebService();
ws.loadWSDL(myURL);
...

 
________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of bhaq1972
Sent: Wednesday, April 18, 2007 4:21 AM
To: [email protected]
Subject: [flexcoders] Re: How to configure wsdl for WebService at
runtime using a configuration file?



can't you use the loadWSDL() function eg
<mx:WebService id="ws1"/>

ws1.loadWSDL("url for the wsdl")

--- In [email protected] <mailto:flexcoders%40yahoogroups.com>
, "lanlin998" <[EMAIL PROTECTED]> wrote:
>
> Hi, here is my problem:
> We have multiple servers running on different network. I'd like 
> not to hard code the wsdl in the <mx:WebService 
> wsdl="somehost".myservice?myservicec.wsdl"...</mx:WebService> tag.
> Instead, there will be a config.txt file in the application folder 
> that define the variable hostname that the FLEX app will read and 
then 
> construct the wsdl before loading.
> 
> My server is Tomcat, we do not use Flex Data Service or Cold Fusion.
> 
> How can I do this? And, is there any security setting I need to set 
> in order for the FLEX to read the config.txt file?
> 
> Thanks in advance.
>



 

Reply via email to