[Mapserver-users] ArcExplorer 4.0.1 and Mapserver WMS - Wiki page

Thomas Bartlett tbartlett at dddd.com.au
Tue Mar 25 19:13:45 EST 2003


Here goes !!

> >1.  Mapserver will display "WARNINGS" in the XML if it is incorrectly
> >formatted (I deliberately introduced an error to test this). The
> >Capatibilities XML file that I am trying to use contains no warning!!
>
> Do you mean ArcExplorer will produce errors?  Or are you saying that
> Mapserver is producing debug statements in the XML output saying that you
> need more METADATA entries in your .map file?

Based on the instruction on wiki, Under the section "Test Your WMS Server" -
"Validate the Capabilities Metadata"

I have used a web browser to produce the GetCapabilities XML document, using
a statement something like :
http://my.host.com/cgi-bin/mapserv?map=mywms.map&REQUEST=GetCapabilities

If there are errors in the map file (mymws.map) then MapServer puts
<WARNING> tags in this XML document.  I tested my system by deliberately
miss-spelling the WMS_TITLE (as WMS_TITLA) in the map file.  This resulted
in WARNINGS in the GetCapabilities XML document.  When I dont deliberately
introduce errors I get a GetCapabilities XML document which does not contain
WARNINGS so I assume that the map file I am using is correct.

However  GetCapabilities does not check whether the map file is WMS
compliant does it !  It simply checks that the map file is correct as far as
MapServer is concerned !!  I remove all reference to WMS from the same map
file and the GetCapabilities XML document returned contain NO warning.  This
map file is obviously not WMS compliant (as it contains none of the WMS
tags) hence my conclusion.  Am I wrong in this conclusion ??

> >3.  The header for the XML document seems to work fine.  I tried adding
echo
> >"<h1>hello world</h1>"; then viewing the document in a web browser.  The
> >result is Hello World, then the expected error message similar to:
> >
> >Warning: Cannot add header information - headers already sent by (output
> >started at http://localhost/fawkner_mapserv/wms.php:2) in
> >http://localhost/fawkner_mapserv/wms.php on line 3
>
> This is a problem.  Are you certain that your php header() call is the
> first thing that is in your .php file?   If you have an empty line, then
> that will constitute output and you can't resend headers...

I only used the echo in front of the header() call to ensure that PHP was
working.  My wms.php document doesn't usually contain this echo statement.
It was just a test.  When I use a web browser to view this file, I am prompt
so open or save the document.  If I open it in a text browser it doesn't
contain anything before the <WMT_MS_Capabilities version="1.1.1"
updatesequence="0"> tag.  Which I think is correct the header() doesn't
return anything ??  Or should it ??

> >I have tried logging all message in ArcExplorer.  I get a heap of errors
/
> >warnings but I nothing that I can understand ??
>
> Perhaps someone on the list can or I can.  Please gzip/zip and attach :)
> I believe your problem is #3 though...

I can't get access to it until tonight but I will post both the map file and
the GetCapabilities XML document tomorrow, to see if there is anything
obvious.  Unless I manage to figure it out tonight.

Thank you all of your input !!

Regard Tom


----- Original Message -----
From: "Daryl Herzmann" <akrherz at iastate.edu>
To: "Thomas Bartlett" <tbartlett at dddd.com.au>
Cc: <Antti.Roppola at brs.gov.au>; <mapserver-users at lists.gis.umn.edu>
Sent: Wednesday, March 26, 2003 10:31 AM
Subject: Re: [Mapserver-users] ArcExplorer 4.0.1 and Mapserver WMS - Wiki
page


> Hi Thomas,
>
> To be honest, I am really confused about what you are trying here :)
>
> On Wed, 26 Mar 2003, Thomas Bartlett wrote:
>
> >1.  Mapserver will display "WARNINGS" in the XML if it is incorrectly
> >formatted (I deliberately introduced an error to test this). The
> >Capatibilities XML file that I am trying to use contains no warning!!
>
> Do you mean ArcExplorer will produce errors?  Or are you saying that
> Mapserver is producing debug statements in the XML output saying that you
> need more METADATA entries in your .map file?
>
> >2.  GetMap works but doesn't check for WMS compliance, rather it just
checks
> >if the non-WMS tags in the map file are correct.
>
> k
>
> >3.  The header for the XML document seems to work fine.  I tried adding
echo
> >"<h1>hello world</h1>"; then viewing the document in a web browser.  The
> >result is Hello World, then the expected error message similar to:
> >
> >Warning: Cannot add header information - headers already sent by (output
> >started at http://localhost/fawkner_mapserv/wms.php:2) in
> >http://localhost/fawkner_mapserv/wms.php on line 3
>
> This is a problem.  Are you certain that your php header() call is the
> first thing that is in your .php file?   If you have an empty line, then
> that will constitute output and you can't resend headers...
>
> >I have tried logging all message in ArcExplorer.  I get a heap of errors
/
> >warnings but I nothing that I can understand ??
>
> Perhaps someone on the list can or I can.  Please gzip/zip and attach :)
> I believe your problem is #3 though...
>
> Good luck,
>   Daryl
>




More information about the mapserver-users mailing list