0 Replies Latest reply on Jun 23, 2011 2:54 AM by EBSFlexDeveloper4

    loadWSDL

    EBSFlexDeveloper4

      Hi

      I am trying to develop a flex mxml frontend that uses a webservice directly.

      At present for development the location of the wsdl file is stored in a properties file which is read before the loadwsdl method is  called eg

      http://localhost:9080/Flex/service?wsdl


      However, for Testing and Production, this will require seperate builds to be done, to include different versions of the properties file e.g.

      http://production:9080/Flex/service?wsdl


      In a previous application we used RemoteObject to communicate with the backend services.

      To do this we configured amf "channels" in the services-config.xml e.g

      <channel-definition id="my-amf" ...>
          <endpoint uri="http://{server.name}:{server.port}/context/....>
      </channel-definition>

       

      It is my understanding that when the flashplayer downloads the swf file it substitutes the placeholders {server.name} for the actual location from which the swf file was download. In this way we only need one build which can then be deployed to carious servers without server specific properties files.


      At present I am using a webservice definition as below in the mxml

      <mx:WebService id="brokerDepositRequest" wsdl="{wsdlURL}">

      I have been investigating perhaps trying to use the "destination" proxy-config.xml tag to get around this problem by using something like:


      <mx:WebService id="brokerDepositRequest" destination="wsdlDestination" useProxy=true>


      with the following entry in the flex-config

      <destination id="wsdlDestination">
        <properties>
         <wsdl>http://{server.name}:{server.port}/context/services/LocatorSOAP?wsdl</wsdl>
         <soap>*</soap>
        </properties>
        <adapter ref="soap-proxy"/>
      </destination>


      However I cannot seem to get this to work.

      Is this possible?

      thanks