What is your <layer> tag? Is your Viewer url on the same host and domain as your ArcGIS Server? If not, you'll need to add a crossdomain.xml file to your ArcGIS Server. Also, you can use a tool like HttpFox to see what requests are being make and if any of them are failing.