services-config file is used by us for connection to the server side code.One important thing which should be noticed here is that this file is used at compile time (as we also includes {-services “services-config.xml”} under compiler settings). If you are using this file then there will be a block like below.
<channels>
<channel-definition id=”my-amfphp” class=”mx.messaging.channels.AMFChannel”>
<endpoint uri=”http://IP of ur backend server/Project Name/amfphp/gateway.php”
class=”flex.messaging.endpoints.AMFEndpoint”/>
</channel-definition>
</channels>
The important thing here is ‘endpoint’ tag,Which have a uri field.This uri field is used to give
the path of backend server.But I will suggest not to put the this uri field here.As you know why?
Because if u will give this ip related information here then you can never change it because it will
be included in the build.So what we require to do when using this file,we should simply remove ‘uri’
from here and write it with your each and every remote object.And there you can get it from some
external xml,or by any other medium.
So the above block in services-config.xml should look like this only.
<channels>
<channel-definition id=”my-amfphp” class=”mx.messaging.channels.AMFChannel”>
<endpoint class=”flex.messaging.endpoints.AMFEndpoint”/>
</channel-definition>
</channels>
Hope you will enjoy it…………………..











