[mapserver-users] msWMSLoadGetMapParams(): WMS server error.

James Perrins james.perrins at gmail.com
Thu Nov 5 04:19:42 EST 2009


Not quite sure of your setup - but can you use something like firebug
in firefox - of maybe fiddler (though you would have to send your call
via its proxy) - to see the actual call being sent to mapserver

I think thats what I'd try as the only thing I can think of is
OWSRequest is mangling the call in some way.  Seeing what its actually
sending might give you a clue ...

On Thu, Nov 5, 2009 at 1:08 AM, Jason M. Amador <jamador at sonomatech.com> wrote:
> Hi,
>
>
>
> I am trying to make a WMS GetMap request in C# using the OWSRequest object
> but I am getting the following error.
>
>
>
> <?xml version='1.0' encoding="ISO-8859-1" standalone="no" ?>
>
> <!DOCTYPE ServiceExceptionReport SYSTEM
> "http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd">
>
> <ServiceExceptionReport version="1.1.1">
>
> <ServiceException code="LayerNotDefined">
>
> msWMSLoadGetMapParams(): WMS server error. Invalid layer(s) given in the
> LAYERS parameter.
>
> </ServiceException>
>
> </ServiceExceptionReport>
>
>
>
> I can successfully make WMS GetCapabilities and GetMap requests through the
> browser directly.  I also have no problem making a WMS GetCapabilities
> request in C# by using the OWSRequest object.  It’s just when I do a GetMap
> request that I get the above error.
>
>
>
> My map file is below.
>
>
>
> MAP
>
>   NAME            CensusTract
>
>   IMAGETYPE      JPEG
>
>   EXTENT         -125.00 20.00 -65.00 50.00
>
>   SIZE           400 300
>
>   SHAPEPATH
> "C:/Inetpub/wwwroot/cgi-bin/ms4w/apps/fhwa/data/CensusTract2005"
>
>   IMAGECOLOR     255 255 255
>
>   CONFIG          "PROJ_LIB" "C:/ms4w/proj/nad/"
>
>   PROJECTION
>
>     "init=epsg:4326"
>
>   END
>
>
>
>   WEB
>
>     IMAGEPATH "C:/Temp/"
>
>     IMAGEURL "/Temp/"
>
>     METADATA
>
>       "wms_title"       "FHWA Census Tract"
>
>       "wms_onlineresource"
> "http://localhost/cgi-bin/mapserv?map=census_tract.map&"
>
>       "wms_srs"               "EPSG:4269 EPSG:4326"
>
>     END
>
>   END
>
>
>
>   LAYER
>
>     NAME         "censusTracts"
>
>     DATA         CensusTracts
>
>     STATUS       ON
>
>     TYPE         POLYGON
>
>
>
>     CLASS
>
>       NAME       "Census Tract"
>
>
>
>       STYLE
>
>         COLOR        232 232 232
>
>         OUTLINECOLOR 32 32 32
>
>       END
>
>     END
>
>     METADATA
>
>       "wms_onlineresource"
> "http://localhost/cgi-bin/mapserv?map=census_tract.map&"
>
>         "wms_srs"             "EPSG:4269 EPSG:4326"
>
>         "wms_name"            "censusTracts"
>
>         "wms_server_version"  "1.1.1"
>
>       "wms_title"       "census tract"
>
>       "wms_format"            "image/gif"
>
>     END
>
>     PROJECTION
>
>       "init=epsg:4326"
>
>     END
>
>   END
>
> END
>
>
>
>
>
> My C# code is:
>
> -------------------------------------------------
>
> OWSRequest req = new OWSRequest();
>
>
>
> req.setParameter("SERVICE", "WMS");
>
> req.setParameter("VERSION", "1.1.1");
>
> req.setParameter("REQUEST", "GetMap");
>
> req.setParameter("LAYERS", "censusTracts");
>
> req.setParameter("BBOX", "-125.0,20.0,-65.0,50.0");
>
> req.setParameter("SRS", "EPSG:4326");
>
> req.setParameter("WIDTH", "400");
>
> req.setParameter("HEIGHT", "300");
>
> req.setParameter("FORMAT", "image/gif");
>
> req.setParameter("STYLES", "");
>
>
>
> mapscript.msIO_installStdoutToBuffer();
>
>
>
> int owsResult = map.OWSDispatch(req);
>
> -------------------------------------------------
>
>
>
> Does anybody know what my issue could be or at least point me in the right
> direction?  I have spent a lot of time researching this already and would
> really appreciate any help.
>
>
>
> Thanks,
>
> Jason
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>



-- 
Dr James Perrins
exeGesIS SDM Ltd
Great House Barn
New Street, Talgarth
Powys LD3 0AH.
Direct Line: 01646 686650
Tel: 01874 711145
Fax: 01874 711156
Email: JamesP at esdm.co.uk

This E-mail and any files transmitted with it are private and intended
solely for the use of the individual or entity to whom they are
addressed. If you are not the intended recipient, the E-mail and any
files have been transmitted to you in error and any copying,
distribution or other use of the information contained in them is
strictly prohibited.

Nothing in this E-mail message amounts to a contractual or other legal
commitment on the part of exeGesIS SDM Ltd unless confirmed by a
signed communication.

exeGesIS SDM Ltd will make every effort to keep its network free of
viruses. However, the recipient of this message will need to scan this
message, and any attachments, for viruses, as exeGesIS SDM Ltd can
take no responsibility for any computer virus that might be
transferred by this e-mail.


More information about the mapserver-users mailing list