I know BlazeDS allows flex to communicate with server technology, but what if I want to communicate from a java class. How do I send my channel (which I've already set up and defined in the messaging-config file) a message and also hear back from the same channel?
I can create messages like this: String clientID = UUIDUtils.createUUID(); AsyncMessage message = new AsyncMessage(); message.setDestination("airBridge"); message.setClientId(clientID); message.setMessageId(UUIDUtils.createUUID()); message.setTimestamp(System.currentTimeMillis()); // this header info is not currently being used TreeMap <String, String>hMap = new TreeMap<String, String>(); hMap.put("secureID", "general"); hMap.put("reportID", repID); message.setHeaders(hMap); // but I can't create this because I am not a ServiceAdaptor- I don't have the // getDestination() method. MessageService service = (MessageService)getDestination().getService(); // And even if I could get the service, how do I send it to a specific channel? // And if I send a message how do I hear back from the channel? The message needs to get sent from a servlet to the ServiceAdapter (messaging channel) which will in turn propagate that out to other apps, get a result and send confirmation that the process completed successfully back to the servlet. How can this be done?