Saddling Blaze (Adventures with BlazeDS - Part 1: Eclipse)

When you set up a new Flex Project in Eclipse (either FlexBuilder 3 or the plugin), the new project wizard asks you if you want to use a remote object access service, such as LiveCycle Data Services (LCDS). You can use the same option to access BlazeDS services running in a J2EE server. It requires that you have your BlazeDS server running, because the next step asks you to enter the root folder and root URL of your server.

If you want to be able to compile your Flex project without the server running, you can get around this.

If you look at the documentation for the mxmlc compiler, you'll see that the context root and the location of the services definition file, services-config.xml (which are the two things the wizard is really after), can be specified as command line arguments.

SilentWalker talks about using this with the Flex Ant tasks in his blog.

I extended this to my Eclipse/FB3 project. I created the project as a normal Flex project without remote data services access. Then I manually edited the .actionScriptProperties file in the project directory. In the file there's a element which for my project looked like this:

I edited the line to include the extra compiler arguments required to build with LCDS (or in my case, BlazeDS) access, so it now looks like this:

Note that you shouldn't put a space between & and quot; -- I just couldn't get it to format properly in this blog tool :-(

That's it. You can now build your project without needing to have your J2EE server running.

This site uses cookies. Continue to use the site as normal if you are happy with this, or read more about cookies and how to manage them.