Before I travel down this rabbit hole, thought I'd bounce this idea off the Flex gurus...
The ArcGIS Server Java Web Service API lets you write Java code to access resources on the map server. One of the resources is the legend information for a particular map service. So, I was thinking the following:
1) Write a Java class to get the legend information through agsjws and put the info (map layer name and legend patch URL) in an array
2) Using Cairngorm and a remote object in the Flex client, send the map service name to the Java back end
3) The java class returns the array to the Flex client
4) The map layer and legend swatch is rendered in a panel or title window
Am I crazy, or does somebody think this will work?
Thanks...