FYI I have been able to reproduce this with the current development version and have filed a bug:

http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1996

Note that you are using the "old" way of specifying WMS CONNECTIONS. You will not get this error if you use the "new" way which uses metadata entries to specify all connection settings, e.g.

  LAYER
    NAME "test-test"
    MAXSCALE 5000
    MINSCALE 500
    METADATA
      "wms_name"              "TEST.TEST"
      "wms_server_version"    "1.1.1"
      "wms_format"            "image/png"
      "wms_srs"               "EPSG:32633"
      "wms_onlineresource"    "http://wms.server.org/wms_test?";

      "wms_title" "Test"
      "wms_connectiontimeout" "200"
      "wms_opaque" "1"
    END
    TYPE RASTER
    CONNECTIONTYPE WMS
    PROJECTION
      "init=epsg:32633"
    END
  END #layer


Daniel

Havard Tveite wrote:
While editing the connection string for my email, I must have
removed too much.  Sorry!  The problem persists though.
The "LAYERS=" was there originally:

CONNECTION "http://wms.server.org/wms_test?VERSION=1.1.1&SERVICE=WMS&REQUEST=GetMap&LAYERS=TEST.TEST&STYLES=&FORMAT=image/png";

Produces the following in the mapserver log file (slightly edited...):
Thu Jan 4 15:46:17 2007,23090,127.0.0.1,test-wms,0,261498.765626 6621607.187500 262014.390626 6622122.812500,261756.578126 6621865.000000,test ,msBuildWMSLayerURL(): WMS connection error. MapServer supports only WMS 1.0.0 to 1.1.1 (please verify the VERSION parameter in the connection string). <br> msOWSParseVersionString(): WMS server error. Invalid version (1.1.1&SERVICE=WMS&REQUEST=GetMap&LAYERS=TEST.TEST&STYLES=&FORMAT=image/png). OWS version must be in the format 'x.y' or 'x.y.z' <br>


while
CONNECTION "wms.server.org/wms_test?VERSION=1.1.1&SERVICE=WMS&REQUEST=GetMap&LAYERS=TEST_TEST&STYLES=&FORMAT=image/png"

Gives me an inimage exception ("LAYER with ID TEST_TEST does not exist")
from the WMS server, as expected.


To reproduce the error one should only need to create a map file
with a WMS layer and a connection string that includes a layer name
with a "." in it.

Regards,

Håvard

Rahkonen Jukka wrote:
Hi,

Maybe this is not the reason for your trouble, but shouldn't it in any case be
&LAYERS=TEST.TEST? Now LAYERS seem to be missing from your URL

http://wms.server.org/wms_test?VERSION=1.1.1&SERVICE=WMS&REQUEST=GetMap&TEST.TEST&STYLES=&FORMAT=image/png


Regards,

-Jukka-



-----Original Message-----
From: UMN MapServer Users List on behalf of Havard Tveite
Sent: Wed 3.1.2007 17:08
To: [email protected]
Subject: Re: [UMN_MAPSERVER-USERS] Mapfile WMS connection string parsing problem for layer names with dots/periods (".") Daniel Morissette wrote:
Just looking at the error message it's not obvious what is really happening. Could you share your full layer definition from the mapfile? Also, which version of MapServer are you using?

Sorry,  I am using:
MapServer version 4.10.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=PDF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER INPUT=EPPL7 INPUT=SDE INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE DEBUG=MSDEBUG
OpSys is Solaris 2.7.

Layer definition (real WMS server name and layer names removed):
   LAYER
     NAME "test-test"
     MAXSCALE 5000
     MINSCALE 500
     METADATA
       "wms_title" "Test"
       "wms_srs" "EPSG:32633"
       "wms_connectiontimeout" "200"
       "wms_opaque" "1"
     END
     TYPE RASTER
     CONNECTIONTYPE WMS
CONNECTION "http://wms.server.org/wms_test?VERSION=1.1.1&SERVICE=WMS&REQUEST=GetMap&TEST.TEST&STYLES=&FORMAT=image/png";
     PROJECTION
       "init=epsg:32633"
     END
   END #layer


Håvard

Daniel


Havard Tveite wrote:
I am experiencing problems with a WMS connections where
layer names contain dots/periods (".").
Whenever a layer name with a "." appears in the "LAYERS"
parameter of the WMS connection string, mapserver has
trouble parsing the connection string.

From the Mapserver log (connect string is: "http://wms.server.org/wms_test?VERSION=1.1.1&SERVICE=WMS&REQUEST=GetMap&TEST.TEST&STYLES=&FORMAT=image/png";): msOWSParseVersionString(): WMS server error. Invalid version (1.1.1&SERVICE=WMS&REQUEST=GetMap&TEST.TEST&STYLES=&FORMAT=image/png). OWS version must be in the format 'x.y' or 'x.y.z' <br>

If I remove the "." no parsing errors occur.

Are periods/dots (".") allowed in WMS Layer Name?
If so, is this a bug?






--
Daniel Morissette
http://www.mapgears.com/

Reply via email to