Hi, Have you tried to do it like it is suggested in the documentation http://mapserver.org/ogc/wms_client.html?
LAYER NAME "country_bounds" TYPE RASTER STATUS ON CONNECTION "http://demo.mapserver.org/cgi-bin/wms?" CONNECTIONTYPE WMS METADATA "wms_srs" "EPSG:4326" "wms_name" "country_bounds" "wms_server_version" "1.1.1" "wms_format" "image/gif" END END Thus no PROJECTION for the layer and only EPSG:4326 in wms_srs. EPSG:900913 must be included in the MAP level "wms_srs" but that should be enough. Including name of the remote mapfile into CONNECTION string is OK. Perhaps addind DEBUG 5 into your WMS layer definition writes the request into log file but I do not know. Try and see if it helps. At least you can run some local proxy like Fiddled and let it log the web traffic. In that case you will need to add wms_proxy_host and wms_proxy_port into layer metadata. -Jukka Rahkonen- ________________________________________ Lähettäjä: [email protected] [[email protected]] käyttäjän Puneet Kishor [[email protected]] puolesta Lähetetty: 16. lokakuuta 2011 2:57 Vastaanottaja: [email protected] Aihe: [mapserver-users] problem with MapServer as WMS client I am going from OpenLayers to MapServer acting as a WMS client to a remote server. OL is requesting SRS 900913, and the remote server is sending data in 4326, and I want to send it back to OL in 900913. My layer definition is like so LAYER NAME "foo" TYPE POLYGON STATUS ON CONNECTION "http://server/cgi-bin/mapserv?map=mapfile.map" CONNECTIONTYPE WMS PROJECTION "init=epsg:4326" END METADATA wms_srs "EPSG:900913 EPSG:4326" wms_name "foo" wms_server_version "1.1.1" wms_format "image/png" wms_enable_request "*" wms_extent "-180 -90 180 90" END END I am getting the following error msWMSLoadGetMapParams(): WMS server error. Invalid SRS given: SRS must be valid for all requested layers. I have three questions: 1. The docs at http://mapserver.org/ogc/wms_client.html state that the connection should not have any query params, but I don't see any options to pass the map file name. Is it ok the way I am doing it above? 2. How do I get around the above error? 3. Is there a way I can see the actual request that MapServer is making to the remote server, perhaps in the error.log? -- Puneet Kishor_______________________________________________ mapserver-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapserver-users _______________________________________________ mapserver-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapserver-users
