[mapserver-users] Mapserver as wms client
Jeff McKenna
jmckenna at gatewaygeomatics.com
Wed Jul 25 07:30:41 PDT 2012
On 12-07-24 7:13 PM, Sowmya Tiramdasu wrote:
> Hi,
>
>
>
> I configures map server to act as a WMS Client. But it doesn't work as
> expected. When i make a getMap request to my WMS server I get the right
> image back but when I try to make it a layer through my map server it is
> not working.
>
>
>
> I am using fiddler to see all the calls made to the server. I see the
> request I am sending to the map server but do not see a request to my
> WMS Server( I thought when Map server tries to consume the WMS server,
> it sends a request to the WMS Server- which should be shown in fiddler)
A very easy way to see all of the WMS requests, is to use the included
"shp2img" commandline utility with the "-all_debug 5" option
(http://www.mapserver.org/utilities/shp2img.html), MS4W users can call
this utility after executing 'setenv.bat' in the same command window.
For example, the command could be:
shp2img -m demo_wms.map -o ttt.png -all_debug 5
and the results would be:
msLoadMap(): 0.003s
msDrawMap(): rendering using outputformat named jpeg (AGG/JPEG).
HTTP: Starting to prepare HTTP requests.
Using CURL_CA_BUNDLE=\ms4w\Apache\conf\ca-bundle\cacert.pem
HTTP request: id=0, http://demo.mapserver.org/cgi-bin
/wms?LAYERS=country_bounds&REQUEST=Ge
tMap&SERVICE=WMS&FORMAT=image/gif&STYLES=&HEIGHT=300&VERSION=1.1.1&SRS=EPSG:4326&WIDTH=400
&BBOX=-180.451127819549,-135.338345864662,180.451127819549,135.338345864662&TRANSPARENT=TRUE&EXCEPTIONS=application/vnd.ogc.se_inimage
HTTP: Before download loop
msHTTPWriteFct(id=0, 1306 bytes)
msHTTPWriteFct(id=0, 2748 bytes)
HTTP: After download loop
msHTTPExecuteRequests() timing summary per layer (connect_time +
time_to_first_packet + download_time = total_time in seconds)
Layer 0: 0.109 + 0.624 + 0.203 = 0.936s
msDrawMap(): WMS/WFS set-up and query, 0.857s
msDrawRasterLayerLow(country_bounds): entering.
msDrawRasterLayerGDAL(): red,green,blue,alpha bands = 1,0,0,0
msDrawMap(): Layer 0 (country_bounds), 0.007s
msDrawMap(): Drawing Label Cache, 0.000s
msDrawMap() total time: 0.869s
msSaveImage(ttt.png) total time: 0.009s
msFreeMap(): freeing map at 026ED540.
freeLayer(): freeing layer at 036C3850.
shp2img total time: 0.886s
I hope that helps.
-jeff
--
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/
More information about the MapServer-users
mailing list