Copy link to clipboard
Copied
Sorry to crosspost this as I already posted this question in Flex forum (http://forums.adobe.com/message/2974245#2974245) but I didn't get any answer there so I'm hoping I'll have more luck here as it is more of a Flash Builder issue.
I'm having some trouble with Flash Builder's Data Connectivity wizard. I'm trying to generate service stubs for a Grails application. It's Groovy code so it ends up being compiled into pure Java byte code. I've got flex.rds.server.servlet.FrontEndServlet running fine and when I click "Connect to Data/Service...", choose BlazeDS and hit next, I can see my service in the list. But then when I hit "Finish", I get an error message saying "com.epseelon.grails.blazeds.EchoService contains overloaded method and is not supported for introspection".
Yet when I decompile the class, here is my service class:
package org.epseelon.grails.blazeds.test;
import groovy.lang.GroovyObject;
import groovy.lang.MetaClass;
import org.codehaus.groovy.runtime.ScriptBytecodeAdapter;
import org.codehaus.groovy.runtime.callsite.CallSite;
public class EchoService
implements GroovyObject
{
private static Object transactional;
private static Object expose;
public EchoService()
{
EchoService this;
CallSite[] arrayOfCallSite = $getCallSiteArray();
MetaClass tmp12_9 = $getStaticMetaClass(); this.metaClass = ((MetaClass)ScriptBytecodeAdapter.castToType(tmp12_9, $get$$class$groovy$lang$MetaClass())); tmp12_9;
}public String echo(String message)
Note that I cannot really change a lot in this class as it's compiled from Groovy based on the following source:
package org.epseelon.grails.blazeds.test
class EchoService {
static transactional = true
static expose = ["blazeds"]
String echo(String message) {
return message.reverse()
}
}
Why is Flash Builder's introspector so restrictive? Why can't it just ignore the parts it doesn't know how to deal with? Is there any workaround for this?
Note that I'm using Flash Builder 4.0.1.
Copy link to clipboard
Copied
I have filed http://bugs.adobe.com/jira/browse/FB-27191 for you to track. I think the static block is causing issues. I guess as a workaround at this point you might have to handcode your service or decompile and modify and regenerate your service which is not very elegant though.
Hope this helps
-Sunil
Copy link to clipboard
Copied
Hi,
I feel the static block is not the issue.
Flash Builder just ignores it in my set up.
Can you abstract out the code and email me to balajs AT adobe DOT com ?
Thanks,
Balaji