I asked this question in the Flash Builder 4 and Flex 4 Labs Archive Forum some weeks ago. But the forum was closed in the meantime so that it is not possible to post further comments there. Therefore I post my solution here, may it is interesting for other people too:
1. Compiler Argument
I added a compiler argument for the project: -define+=CONFIG::environment,'dev'
2. Global Variables
I defined a global variable in the main application:
public var BASEURL:String;
I added in the main application inside the applicationComplete event following logic:
3. Generated Sub-Class of Service
I set the baseURL inside the constructor based on the global variable.
public class NewsStatusService extends _Super_NewsStatusService
public function NewsStatusService():void
_serviceControl.baseURL = FlexGlobals.topLevelApplication['BASEURL'];
If I want to switch the environments then I just must change the compiler argument and recompile the project.