AIR based Tool to generate Flex code for consuming/exposing Java classes as BlazeDS/LCDS Remoting services
This application helps developers to generate Flex code to consume BlazeDS/LCDS Remoting services and also generate configuration file to expose Java classes as Remoting services. Developers can view response from a Remoting service, generate Flex code to invoke a Remoting service and also generate AS3 VO code for the Java classes.
Content in this page was earlier hosted at https://sujitreddyg.wordpress.com/2009/05/07/blazemonster/ You can find more comments there.
Update: BlazeMonster V2 is published. Please find details on version 2 features at this URL https://sujitreddyg.wordpress.com/2009/08/26/blazemonster-v2-with-support-for-spring-blazeds/
What can this application do?
Existing Remoting services
1) View existing Remoting destinations
2) Invoke them and view the response in the application.
3) Generate Flex code to invoke a operation on a destination. Complete code including required AS3 VO classes will be generated.
Create new Remoting service
1) View public methods of Java classes
2) Generate configuration files to expose a Java class as Remoting service
3) Generate Flex code to invoke methods on the Java class exposed as Remoting destination. Complete code including required AS3 VO classes and configuration files will be generated.
AS3 VO Generation
1) Generate Action Script 3 VO classes for a Java class
2) All public properties of a Java class will be used to create the AS3 class
1) Useful when you cannot deploy the server code bundled with this application on the server
2) Invoke Remoting services exposed by third party BlazeDS server
3) Generate Flex code to invoke the exposed Remoting service
Screen shots of the application
How do I use this application?
- Set up BlazeDS for your web application as explained at this URL https://sujitreddyg.wordpress.com/2009/04/07/setting-up-blazeds/
- You need to have Adobe AIR installed. Most of the computers have it, if you forgot to install, please download form this URL http://get.adobe.com/air/
- Download BlazeMonster AIR application (.air file: 670 KB) from this URL http://www.sujitreddyg.com/applicationinstallers/blazemonster/BlazeMonster.air (Incase of IE, if the file is saved as BlazeMonster.zip, please rename to BlazeMonster.air and install)
- Download required Java files (zip file: 6 KB) from this URL http://www.sujitreddyg.com/applicationinstallers/blazemonster/BlazeMonsterServerSetup.zip
- Extract the downloaded zip file on your system
- Assuming “mywebapplication” is the name of your J2EE application
- Copy the invokeremotingservicebrowser.jsp from the extracted folder in to the root folder of your web application (mywebapplication/invokeremotingservicebrowser.jsp)
- Copy the folder named com from the extracted folder in to the WEB-INF/classes folder of your web application (mywebapplication/WEB-INF/classes/com/*)
- Install the BlazeMonster application by invoking the BlazeMonster.air file
Set up for BlazeMonster to work with Spring BlazeDS
Spring BlazeDS instantiates MessageBroker with “_messageBroker” as ID and so you need to modify invokeremotingservicebrowser.jsp to get destinations from MessageBroker used by Spring BlazeDS. This can be applied to any case where the MessageBroker has a different ID than the default.
Follow the following steps to get BlazeMonster work with Spring BlazeDS:
- Download one of the nightly builds of 1.0.1 version of Spring BlazeDS from this URL http://static.springsource.org/downloads/nightly/snapshot-download.php?project=FLEX
- In invokeremotingservicebrowser.jsp change code in line number 13 to out.println(browser.getDestinations(“_messageBroker“));
- Restart your server and you can see Spring BlazeDS destinations in BlazeMonster
- In case you run into issues with Spring BlazeDS or want to discuss with other developers you can do in the forum at this URL http://forum.springframework.org/forumdisplay.php?f=61
If you have problems with BlazeMonster try the following:
- Check if the application root URL in the application is correct
- Send a request to this URL http://<server-root>:<server-port>/<app-context>/invokeremotingservicebrowser.jsp?operationName=getDestinations from your browser
- Check if there are any errors in your server log files
- Make sure your server is configured to use at least JRE 1.5 and above. I am working on class file for older versions of JRE🙂
Any suggestions/bug reports/enhancement feed backs are most welcome🙂