I don’t like hard coding hostnames in files like services and channels config. It becomes hard to manage when we have multiple developers and multiple developer environments. Is there a way to externalize these through local files that are outside of the compiled application?
I don’t like hard coding hostnames in files like services and channels config. It
Share
To answer your question; yes there is a way.
to add some additional details; what I do in one of my apps for a client is load an XML file using HTTPService (or you can use URLLoader). The XML file contains various endpoints for other services which includes other HTTPServices and the local endpoints for our AMF Server.
On any given HTTPService, WebService, or RemoteObject tag you can set the relevant properties at runtime.