request.setFormat(format);
request.setSRS("EPSG:4326");
request.setDimensions("100","100");
try {
GetMapResponse response = wms.issueRequest(request);
out.println("received a response.");
out.print("Checking returned format...");
if (response.getContentType().indexOf(format) == -1) {
out.println("server returned bad format. Expected "+format+", got "+response.getContentType()+".");
passed = false;
} else {
out.println("passed.");
}
out.print("Checking dimensions...");
BufferedImage image = ImageIO.read(response.getInputStream());
if (image == null) {
out.println("returned a bad image. ContentType is "+response.getContentType());
passed = false;
} else if (image.getWidth() != 100 || image.getHeight() != 100) {
out.println("server returned bad dimensions. Expect 100, 100. Returned "+image.getWidth()+","+image.getHeight());
passed = false;
} else {