Hi,
I was able to successfully build a BlazeDS application where the Flex client
runs in the
browser. Now, I'm trying to build an application that uses AIR and accesses a
BlazeDS
service remotely (invokes a remote object).
I would like to configure the BlazeDS application so that the endpoints are
assigned
dynamically, i.e., they are not hard-coded into the application at compile
time. I was not
able to completely figure out how to do this, so any pointers would be very
much
appreciated:
1. Do I still need to reference the services XML file when compiling the
application? I
really would prefer to configure everything in code on the client, i.e., have
no static
dependencies at compile time.
2. Following Christophe Coenraets' examples in the Tomcat + BlazeDS release he
had
posted, I tried to define a remote destination in the AIR client as follows:
var channel:AMFChannel =
new AMFChannel("my-amf","http://localhost:8080/messagebroker/amf");
var channelSet:ChannelSet = new ChannelSet();
channelSet.addChannel(channel);
acctSvc = new RemoteObject();
acctSvc.destination = "AccountSvc";
acctSvc.channelSet = channelSet;
One the server, I set up a remote object with the ID "AccountSvc," and there is
a "my-amf"
channel configured as well.
However, when I invoke a method on this remote object from the client, nothing
happens
- the server does not register an invocation. Am I missing something obvious
here? What
other configuration parameters do I need to specify for the remote object to
invoke the
backend Java class?
Again, I'm not specified the server's services XML file to the compiler. Could
that be the
problem?
Thanks,
-- Frank