tags:

views:

354

answers:

1

We have some Modules which have their own remote objects configured in remoting-config.xml. Each is packaged and deployed as separate web archives (WAR). For ex. Module1.war, Module2.war.

We are trying to integrate them in a flex application which is deployed in a separate web app. For ex. MainApp.war.

The remote objects work fine when invoked from within Module1.war and Module2.war. But the java remote objects are not getting invoked when called from the main flex application MainApp.war.

I have looked at Flex Developers guide and flexcoders Yahoo group.

A: 

How are you configuring your remote objects? Are you passing the path to services-config.xml in the "-services" compiler flag? If you are, I would avoid doing this, since it doesn't give you much flexibility in the location of your services endpoints.

Christophe Coenraets has a great article on best practices for configuring RemoteObject and other data access classes in Flex. The general idea is to externalize the URLs into an XML configuration file, load that with an HTTPService when the application starts up, then use the URLs to configure your Channel/ChannelSet which are binded into the RemoteObject. Full article is here:

http://coenraets.org/blog/2009/03/externalizing-service-configuration-using-blazeds-and-lcds/

cliff.meyers