The origin of ArcGisCache is not left-bottom but left-top. See the drawing and text some where in the middle of this page: http://webhelp.esri.com/arcgisserver/9.3/java/index.htm#choosing_cache_properties.htm
When the Map resolution != the ArcGisLayer (and the service) resolution: The getUrl 'calculation' is incorrect.
For getting the correct originTileX and originTileY don't use the map resolution but the serverResolution of the layer.
Don't use the zoomlevel of the map, but the zoomlevel of the service to fill in the 'z' in the url.