title: Initialize webservice WSDL at runtime using Flex and Mate framework
body: <p>I am developing a Flex application on top of Mate framework. 
  In this application, I am using a webservice to retrieve data.<br>
  As this webservice as not a fix location URL (depending on where customers installed it), I define this URL in a config file.
  When the Flex application starts, it first reads this config file, then I would like to use the value I found to initialize the webservice.<br>
  But currently, I have no idea how to this.</p>
  
  <p>Here is my <strong>EventMap.mxml</strong></p>
  
  <pre><code>&lt;EventMap&gt;
  &lt;services:Services id="services" /&gt;
  
  &lt;EventHandlers type="{FlexEvent.PREINITIALIZE}"&gt;        
      &lt;HTTPServiceInvoker instance="{services.configService}"&gt;
          &lt;resultHandlers&gt;
              &lt;MethodInvoker generator="{ConfigManager}" method="loadFromXml" arguments="{resultObject}" /&gt;
          &lt;/resultHandlers&gt;
          &lt;faultHandlers&gt;
              &lt;InlineInvoker method="Alert.show" arguments="ERROR: Unable to load config.xml !" /&gt;
          &lt;/faultHandlers&gt;            
      &lt;/HTTPServiceInvoker&gt;
  </code></pre>
  
  <p>In this part, the ConfigManager parse the config file and intitialize a bindable property called webServiceWsdl</p>
  
  <p>Here is my <strong>Services.mxml</strong></p>
  
  <pre><code>&lt;mx:Object&gt;
  &lt;mx:Script&gt;
  &lt;![CDATA[
      [Bindable] public var webservice:String;
  ]]&gt;
  &lt;/mx:Script&gt;
  
  &lt;mx:HTTPService id="configService" url="config.xml" useProxy="false" /&gt;
  &lt;mx:WebService id="dataService" wsdl="{webservice}" useProxy="false"/&gt;
  &lt;/mx:Object&gt;
  </code></pre>
  
  <p>How can I initialize this webservice property ?</p>