Opened 20 years ago

Closed 15 years ago

#885 closed defect (fixed)

[MapServer-WMS]Server title element value in a context file is lost

Reported by: nsavard@… Owned by: tomkralidis
Priority: high Milestone: 5.4 release
Component: WMS Server Version: 4.3
Severity: normal Keywords:
Cc: assefa

Description

Background information:
I modified the "context.cml" file found at
"http://schemas.opengis.net/context/1.0.0/context.cml" URL to include all
possible context elements specified within the "context.xsd" (could be found at
the same URL).  I opened this file in MapServer and saved this new map file as a
context file.  

Problem:
In the following input "context.cml" file snippet the server title element value
is "ESA CubeSERV" and the layer title element value is "WORLD_MODIS_1KM".  After
saving this context file the server "title" element value is the same as the
layer title value (see Output context file snippet).

------------------
Input context file snippet:

  <LayerList>
    <Layer queryable="1" hidden="0">
      <Server service="OGC:WMS" version="1.1.0" title="ESA CubeSERV">
        <OnlineResource xlink:type="simple"
xlink:href="http://mapserv2.esrin.esa.it/cubestor/cubeserv/cubeserv.cgi"/>
      </Server>
      <Name>WORLD_MODIS_1KM:MapAdmin</Name>
      <Title>WORLD_MODIS_1KM</Title>

-------------------------
Output context file:

  <LayerList>
    <Layer queryable="1" hidden="0">
      <Server service="WMS" version="1.1.0" title="WORLD_MODIS_1KM">
        <OnlineResource xlink:type="simple"
xlink:href="http://mapserv2.esrin.esa.it/cubestor/cubeserv/cubeserv.cgi"/>
      </Server>
      <Name>WORLD_MODIS_1KM:MapAdmin</Name>
      <Title>WORLD_MODIS_1KM</Title>
      <Abstract>Global maps derived from various Earth Observation sensors / WOR

Change History (8)

comment:1 by assefa, 19 years ago

Milestone: FUTURE
The problem is that the context parser looks for title element first in the 
layer and if not found, tries to get the title in the <Server> element. It 
save the reulst as wms_title metadata and uses this value when outputing a 
context. We may need to save 2 metadatas if the values of server and layer 
title are diffrent.

Set it to FUTURE. 

comment:2 by tomkralidis, 16 years ago

Cc: assefa added
Milestone: FUTURE5.4 release
Owner: changed from mapserverbugs to tomkralidis

Norm: I can work on this one. Can you post a test case?

comment:3 by nsavard, 16 years ago

Tom: I'll look into this. It was a long time ago. A lot more grey hairs since then ...

comment:4 by tomkralidis, 15 years ago

Norm: can you post a testcase? Maybe a PHP mapscript?

comment:5 by tomkralidis, 15 years ago

Norm: I was able to reproduce the problem. Fixed in r8461. MAP.LAYER.METADATA.wms_server_title is now picked up by the parser and written out by the writer.

Here's an example to test the functionality:

#!/usr/bin/python

import mapscript
map = mapscript.mapObj('./config.map')
map.loadMapContext('./wmc100.xml')
map.saveMapContext('./wmc100.xml-out')

Can you test and confirm? Thx

comment:6 by nsavard, 15 years ago

Tom: Yes I'm checking this today. I'll let you know.

comment:7 by nsavard, 15 years ago

Tom, this is fixed.

comment:8 by tomkralidis, 15 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.