This code it works. Have fun !
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!--The viewport meta tag is used to improve the presentation and behavior of the samples
on iOS devices-->
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
<title>WMS</title>
<link rel="stylesheet" href="http://js.arcgis.com/3.10/js/dojo/dijit/themes/claro/claro.css">
<link rel="stylesheet" href="http://js.arcgis.com/3.10/js/esri/css/esri.css">
<script src="http://js.arcgis.com/3.10/"></script>
<script>
dojo.require("esri.map");
var map;
dojo.ready(function() {
dojo.declare("my.CityStatesRiversUSAWMSLayer", esri.layers.DynamicMapServiceLayer, {
constructor: function() {
this.initialExtent = this.fullExtent = new esri.geometry.Extent({"xmin":-16476154.32,"ymin":2504688.54,"xmax":-6457400.14,"ymax":7514065.62,"spatialReference":{"wkid":102100}});
this.spatialReference = new esri.SpatialReference({wkid:102100});
this.loaded = true;
this.onLoad(this);
},
getImageUrl: function(extent, width, height, callback) {
var params = {
service:"WMS",
request:"GetMap",
transparent:true,
format:"image/png",
version:"1.3.0",
layers:"Map1:planet_osm_line_Romania",
styles:"",
//changing values
bbox:extent.xmin + "," + extent.ymin + "," + extent.xmax + "," + extent.ymax,
srs: "EPSG:900913",
width: width,
height: height
};
callback("http://localhost:8080/geoserver/Map1/wms?" + dojo.objectToQuery(params));
}
});
});
function init() {
map = new esri.Map("map", {
basemap: "satellite",
center: [27, 45],
zoom: 6
});
map.addLayer(new my.CityStatesRiversUSAWMSLayer());
}
dojo.ready(init);
</script>
</head>
<body class="claro">
<div id="map" style="position:relative; width:1024px; height:512px; border:2px solid #000;"></div>
</body>
</html>