esri.arcgis.gmaps.DynamicMapServiceLayer is part of the esri extensions for google maps, I believe (but not completely sure) it can't run on google earth
Why don't you enable the kml capabilities on the mapservice you are using to publish your spatial data? In this way you could be able to display your data with a request to the kml url