Announcement Announcement Module
No announcement yet.
Getting a list of remoting destination IDs? Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Getting a list of remoting destination IDs?

    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.



  • #2
    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 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.class.getName());
    Map remotingDestinations = rs.getDestinations();
    The key set in that map will be the ids of all of the remoting destinations.


    • #3
      To get the proxy-config list of destinations

      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.