View Full Version : Getting a list of remoting destination IDs?
brian428
Jun 24th, 2009, 07:48 AM
Is there a method somewhere in the Flex-Spring API which I can invoke to obtain a list of the remoting destination IDs which have been generated by Spring? Or, possibly, a way to hook into Blaze somewhere to get such a list? I've gone through the Blaze and Spring-Flex JavaDocs but couldn't find anything that looked like it would do this, but I assume it is probably exposed somewhere and I just don't know where to look.
Thanks,
Brian
jeremyg484
Jun 24th, 2009, 03:42 PM
You can to it pretty easily once you have a reference to the MessageBroker, and fortunately since the MessageBroker is just a Spring bean, that's fairly easy to do...you could either autowire it by type, inject it by referencing the default id (see org.springframework.flex.config.BeanIds), or inject it by assigning it a custom id with the <flex:message-broker> tag and referencing that.
Once you've got a reference to it, you can get to the remoting destinations like this:
RemotingService rs = (RemotingService) messageBroker.getServiceByType(RemotingService.cla ss.getName());
Map remotingDestinations = rs.getDestinations();
The key set in that map will be the ids of all of the remoting destinations.
chunqiu
Jun 24th, 2009, 10:15 PM
In looking for eliminating all coupling between the flex client side configuration and the server side, I'd like to ask why there's not more information about the blazeDS proxy-config.xml configuration file in your Spring BlazeDS Integration Reference Guide ?
My second question is I suppose that the WEB-INF/flex/proxy-config.xml is still loaded by the flex message-broker, how can I get the list of destinations for my web services and http services.
Thanks Jeremy.
Powered by vBulletin® Version 4.2.1 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.