Setting up a config-services.xml file

A typical config-services file will look something similar to what is shown below. You would need to change the URI's to reflect your development or production machine, and I have had to remove a forward slash from my uri otherwise the formatting gets rather messed up.

config-services.xml

<?xml version='1.0' encoding='UTF-8'?>
<services-config>
  <services>
    <service id='amfphp-flashremoting-service' 
             class='flex.messaging.services.RemotingService' 
             messageTypes='flex.messaging.messages.RemotingMessage'>
      <destination id='amfphp'>
        <channels>
          <channel ref='amfphpchannel'/>
          <channel ref='amfphpchannel2'/>
        </channels>
        <properties>
          <source>*</source>
        </properties>
      </destination>
    </service>
  </services>
<channels>    	   
    <channel-definition id='amfphpchannel' 
                        class='mx.messaging.channels.AMFChannel'>
      <endpoint uri='http:/localhost/amfphp-2.1/Amfphp/' 
                class='flex.messaging.endpoints.AMFEndpoint'/>
    </channel-definition>
 
    <channel-definition id='amfphpchannel2' 
                        class='mx.messaging.channels.AMFChannel'>
      <endpoint uri='http:/localhost/remote/Amfphp/' 
                class='flex.messaging.endpoints.AMFEndpoint'/>
    </channel-definition>
  </channels>
</services-config>

The file can be placed in the src folder of your project, and needs to be compiled into your project by adding the -services compiler option to your project and specifying this file. Project | Properties | Flex Compiler

Tags: 

Comments

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.