if (ArcGISDynamicMapServiceLayer(liveLayers).id != "Aerial Photography")
Jason,
Open a web browser and test if the web service is doing what it is suppose to. So on the ArcGIS Server machine that you ran the setup on type "http://localhost/restLegend/restLegend.asmx" and then click on generateLegends and type in some default values like:
soapUrl: http://services.arcgisonline.com/ArcGIS/services/Demographics/ESRI_Diversity_US_2D/MapServer
dpi: 96
pWidth: 20
pHeight: 20
serviceName: Test
That should return a XML result.