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 http://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 http://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
Remote BlazeDS
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 http://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
Troubleshooting
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
Adobe Rocks





August 26, 2009 at 12:39 pm
[...] BlazeMonster [...]
August 26, 2009 at 1:43 pm
[...] BlazeMonster [...]
August 26, 2009 at 2:47 pm
Hi,
The tool is nice, but how to login(authenticate) in case of using the java-security for spring-blazeds?
August 26, 2009 at 3:00 pm
Hi Sujit,
The tool rocks, i got the place where to provide authentication information. I am using Spring-Blaze DS with
http://www.ibm.com/developerworks/java/library/j-genericdao.html
In my case, my methods and arguments were not exposed to the destinations.
Do you have any idea, how to get them exposed to your tool..?
Regards,
Devaraj
August 26, 2009 at 4:52 pm
Hi Sujit,
In my case using,
http://www.ibm.com/developerworks/java/library/j-genericdao.html
was not an issue..
For Spring-BlazeDS,
The id of Bean required to be in this way to get the list of methods available..
Can you check that..
Thanks,
Devaraj
August 28, 2009 at 1:10 am
Hi Sujit,
Excellent tool.
I was introspecting one of my services which returned a VO. When I tried to invoke that service, the tool told me to generate VOs and I am able to do that from the other link inside the tool. Is there a way I can make that newly created VO available for the tool so that it can now invoke my method.
Also can it be added to the list of operationarguments in the RemoteBlazeDS >> Add Argument Screen?
August 28, 2009 at 1:15 am
Hi Sujit,
I read the message carefully and it appears that you did add the capability to add dynamically created VOs, not that I know that it is possible to with Flex.
Additionally another nice to have feature is to use dynamic objects for Custom VOs in the absence of specific ones.
August 28, 2009 at 6:47 pm
I tried this tool and i am trying to generate vo and i found following error
org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 6 in the generated java file
Only a type can be imported. com.adobe.services.RemotingServiceBrowser resolves to a package
An error occurred at line: 9 in the jsp file: /invokeremotingservicebrowser.jsp
RemotingServiceBrowser cannot be resolved to a type
6:
7: if(operationName != null)
8: {
9: RemotingServiceBrowser browser = new RemotingServiceBrowser();
10:
11: if(operationName.equalsIgnoreCase(“getdestinations”))
12: {
An error occurred at line: 9 in the jsp file: /invokeremotingservicebrowser.jsp
RemotingServiceBrowser cannot be resolved to a type
6:
7: if(operationName != null)
8: {
9: RemotingServiceBrowser browser = new RemotingServiceBrowser();
10:
11: if(operationName.equalsIgnoreCase(“getdestinations”))
12: {
Stacktrace:
at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:439)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:334)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:312)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:299)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
at java.lang.Thread.run(Thread.java:595)
can you help me to generate vo
September 3, 2009 at 7:05 pm
Is there a license associated with this project?
October 10, 2009 at 7:47 pm
Awesome tool, thanks Sujit.
BlazeMonster Rocks!!!
Greetings from Peru
November 16, 2009 at 3:26 am
Hi Sujit,
BlazeMonster will be a great tool, it looks like theres a couple of small bugs. When generating multiple VOs, the generator seems to be aggregating the properties. Each VO gets its properties and all of the properties from the VOs before it. An ArrayCollection import isn’t being added when ArrayCollection is used and there doesn’t seem to be a way to close generated VO tabs when you’re dome with them.
Thanks for you great work,
Tyler
November 25, 2009 at 6:59 pm
Hi Tyler,
Thanks, will work on this soon