My Cairngorm program does some preliminary authentication against a RemoteObject before allowing Cairngorm's ServiceLocator to start using the same RemoteObject to get business data. Everything works fine with Flex Builder, but I need an Ant build. The Ant mxmlc task compiles everything ok, but at runtime the resulting code fails at the getService() method on Cairngorm's RemoteObjects class, because it can't find the service.
Might this perhaps be due to the Cairngorm code being differently linked in the Ant-driven compilation? In the file resulting from -dump-config (and this file is fine, used with mxmlc on the command line) the only reference to the Cairngorm swc is in this element:
<library-path> <path-element>\path\to\directory\containing\Cairngorm.swc</path-element> </library-path>
The corresponding element in my build.xml is
<compiler.library-path dir="${basedir}" append="true"> <include name="libs"/> </compiler.library-path>
I can't see anything that would affect how Cairngorm is linked, apart from an explicit setting of static-link-runtime-shared-libraries to true in both the FB output and in my build.xml. Perhaps my linking theory is all wrong? But what else could be making Cairngorm's remote access fail when access from elsewhere in the same SWF to the same RemoteObject has been ok?