I set up WMS server using MapServer, and the following requests work:
I also tried to use the WMS that I serve in a map file, added the WMS in the following way:
LAYER
NAME hydro
# PROCESSING "LOAD_WHOLE_IMAGE=TRUE"
TYPE RASTER
STATUS ON
CONNECTIONTYPE WMS
CONNECTION "http://localhost:8081/cgi-bin/mapserv.exe?"
METADATA
"wms_srs" "EPSG:4326"
"wms_name" "hydro"
"wms_server_version" "1.1.1"
"wms_format" "image/jpeg"
END
END
Then requested it with the following URL: http://localhost:8081/cgi-bin/mapserv.exe?map=/ms4w/apps/tutorial/htdocs/example1-7.map&layer=hydro&mode=map
However, I only see a blank image.
Looks like this is the way, see http://mapserver.org/ogc/wms_client.html#wms-client & http://demo.mapserver.org/cgi-bin/mapserv?map=/osgeo/mapserver/tutorial/htdocs/example1-7.map&layers=states+states_label+modis_jpl&mode=map. Here modis_jpl is not visible too, but in the map file its status is off, this can be the reason.
Any idea on what I am doing wrong here?