[mapserver-dev] GetCapabilities and schema validation issues

Tom Kralidis tomkralidis at hotmail.com
Mon Apr 8 18:01:55 PDT 2013


Steve: thanks.  Implemented.  PR's against master branch:

https://github.com/mapserver/mapserver/pull/4625

https://github.com/mapserver/msautotest/pull/20






> Date: Mon, 8 Apr 2013 18:14:07 -0400
> From: woodbri at swoodbridge.com
> To: tomkralidis at hotmail.com
> CC: mapserver-dev at lists.osgeo.org
> Subject: Re: [mapserver-dev] GetCapabilities and schema validation issues
> 
> Tom,
> 
> https://github.com/mapserver/mapserver/issues/4624
> 
> Thanks for looking at this.
> 
> -Steve W
> 
> On 4/8/2013 4:15 PM, Tom Kralidis wrote:
> > Steve: ah, ok. Looking deeper mapwms.c needs fixing. Can you open a ticket and assign to me? Will fix.
> >
> > Sent from my iPhone
> >
> > On 2013-04-08, at 16:03, "Stephen Woodbridge" <woodbri at swoodbridge.com> wrote:
> >
> >> Hi Tom,
> >>
> >> Thanks, that got us part of the way there, but there still seems to be a problem(s).
> >>
> >> Adding ows_schemas_location seems to have solved the the wms schema requests, but we are still getting requests going to:
> >>
> >> http://schemas.opengis.net/sld/1.10/sld_capabilities.xsd
> >>
> >> rather than to the host specified in ows_schemas_location. So this might be a bug or oversight related to the sld code.
> >>
> >> Next we tried adding:
> >>    "ows_sld_enabled"  "false"
> >>
> >> Based on this link:
> >> http://mapserver.org/ogc/wms_server.html#web-object-metadata
> >>
> >> But this seems to be ignored also as sld was still advertised in the getcapabilities document.
> >>
> >> I looked at the source code and can not find
> >>
> >> $ grep -li ows_sld_enabled *
> >> $ grep -li sld_enabled *
> >> mapwms.c
> >>
> >> So we tried sld_enabled instead of ows_sld_enabled, but no joy with this one either.
> >>
> >> This looks like it might be another bug, or my error in understanding the docs and source code.
> >>
> >> Below is the getcapabilities document:
> >>
> >> -Steve W
> >>
> >>
> >> I added the following into my .map file
> >>
> >> "ows_schemas_location"    "http://10.50.0.35"
> >> "ows_sld_enabled"    "false"
> >>
> >> You can see in the capabilities xml file, it did accept my schema location, however, it is still giving the default location for " http://schemas.opengis.net/sld/1.1.0/sld_capabilities.xsd "
> >>
> >> We really need a location that is not on the internet.
> >>
> >> <?xml version='1.0' encoding="ISO-8859-1" standalone="no" ?>
> >> <WMS_Capabilities version="1.3.0"  xmlns="http://www.opengis.net/wms" xmlns:sld="http://www.opengis.net/sld" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ms="http://mapserver.gis.umn.edu/mapserver" xsi:schemaLocation="http://www.opengis.net/wms http://10.50.0.35/wms/1.3.0/capabilities_1_3_0.xsd http://www.opengis.net/sld http://schemas.opengis.net/sld/1.1.0/sld_capabilities.xsd http://mapserver.gis.umn.edu/mapserver http://10.50.0.35/cgi-bin/mapserv?service=WMS&version=1.3.0&request=GetSchemaExtension">
> >>
> >> 
> >>       <Title>streets</Title>
> >>       <Abstract>streets</Abstract>
> >>         <Style>
> >>           <Name>default</Name>
> >>           <Title>default</Title>
> >>           <LegendURL width="35" height="5">
> >>              <Format>image/png; mode=24bit</Format>
> >>              <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://10.50.0.35/cgi-bin/mapserv?version=1.3.0&service=WMS&request=GetLegendGraphic&sld_version=1.1.0&layer=streets&format=image/png; mode=24bit&STYLE=default"/>
> >>           </LegendURL>
> >>         </Style>
> >>       <Layer queryable="0" opaque="0" cascaded="0">
> >>         <Name>primary_roads</Name>
> >>         <Title>Primary Road features</Title>
> >>         <Abstract>Primary Road features from the U.S. Census PRIMARYROADS data layer.</Abstract>
> >>         <CRS>EPSG:4269</CRS>
> >>         <CRS>EPSG:4326</CRS>
> >>     <EX_GeographicBoundingBox>
> >>         <westBoundLongitude>-158.104</westBoundLongitude>
> >>         <eastBoundLongitude>145.815</eastBoundLongitude>
> >>         <southBoundLatitude>15.1184</southBoundLatitude>
> >>         <northBoundLatitude>62.8805</northBoundLatitude>
> >>     </EX_GeographicBoundingBox>
> >>         <BoundingBox CRS="EPSG:4269"
> >>                     minx="15.1184" miny="-158.104" maxx="62.8805" maxy="145.815" />
> >>       </Layer>
> >>       <Layer queryable="0" opaque="0" cascaded="0">
> >>         <Name>pri_sec_roads</Name>
> >>         <Title>Primary and Secondary Roadway features</Title>
> >>         <Abstract>Primary and Secondary Roadway features from the U.S. Census PRISECROADS data layer.</Abstract>
> >>         <CRS>EPSG:4269</CRS>
> >>         <CRS>EPSG:4326</CRS>
> >>     <EX_GeographicBoundingBox>
> >>         <westBoundLongitude>-114.787</westBoundLongitude>
> >>         <eastBoundLongitude>-109.045</eastBoundLongitude>
> >>         <southBoundLatitude>31.3326</southBoundLatitude>
> >>         <northBoundLatitude>37.0017</northBoundLatitude>
> >>     </EX_GeographicBoundingBox>
> >>         <BoundingBox CRS="EPSG:4269"
> >>                     minx="31.3326" miny="-114.787" maxx="37.0017" maxy="-109.045" />
> >>         <MinScaleDenominator>500000</MinScaleDenominator>
> >>         <MaxScaleDenominator>5e+006</MaxScaleDenominator>
> >>       </Layer>
> >>       <Layer queryable="0" opaque="0" cascaded="0">
> >>         <Name>roads</Name>
> >>         <Title>Roadway features</Title>
> >>         <Abstract>Road way features from the U.S. Census ROADS data layer.</Abstract>
> >>         <CRS>EPSG:4269</CRS>
> >>         <CRS>EPSG:4326</CRS>
> >>     <EX_GeographicBoundingBox>
> >>         <westBoundLongitude>-114.715</westBoundLongitude>
> >>         <eastBoundLongitude>-109.048</eastBoundLongitude>
> >>         <southBoundLatitude>31.3326</southBoundLatitude>
> >>         <northBoundLatitude>34.3087</northBoundLatitude>
> >>     </EX_GeographicBoundingBox>
> >>         <BoundingBox CRS="EPSG:4269"
> >>                     minx="31.3326" miny="-114.715" maxx="34.3087" maxy="-109.048" />
> >>         <MaxScaleDenominator>500000</MaxScaleDenominator>
> >>       </Layer>
> >>       <Layer queryable="0" opaque="0" cascaded="0">
> >>         <Name>hwyshieldsfar</Name>
> >>         <Title>Hwy Shields Far</Title>
> >>         <Abstract>Hwy Shields for the U.S. Census ROADS data layer.</Abstract>
> >>         <CRS>EPSG:4269</CRS>
> >>         <CRS>EPSG:4326</CRS>
> >>     <EX_GeographicBoundingBox>
> >>         <westBoundLongitude>-114.787</westBoundLongitude>
> >>         <eastBoundLongitude>-109.045</eastBoundLongitude>
> >>         <southBoundLatitude>31.3326</southBoundLatitude>
> >>
> >> a20
> >>       <northBoundLatitude>37.0017</northBoundLatitude>
> >>     </EX_GeographicBoundingBox>
> >>         <BoundingBox CRS="EPSG:4269"
> >>                     minx="31.3326" miny="-114.787" maxx="37.0017" maxy="-109.045" />
> >>         <MinScaleDenominator>300000</MinScaleDenominator>
> >>         <MaxScaleDenominator>5e+006</MaxScaleDenominator>
> >>       </Layer>
> >>       <Layer queryable="0" opaque="0" cascaded="0">
> >>         <Name>hwyshieldsnear</Name>
> >>         <Title>Hwy Shields Near</Title>
> >>         <Abstract>Hwy Shields for the U.S. Census ROADS data layer.</Abstract>
> >>         <CRS>EPSG:4269</CRS>
> >>         <CRS>EPSG:4326</CRS>
> >>     <EX_GeographicBoundingBox>
> >>         <westBoundLongitude>-114.715</westBoundLongitude>
> >>         <eastBoundLongitude>-109.048</eastBoundLongitude>
> >>         <southBoundLatitude>31.3326</southBoundLatitude>
> >>         <northBoundLatitude>34.3087</northBoundLatitude>
> >>     </EX_GeographicBoundingBox>
> >>         <BoundingBox CRS="EPSG:4269"
> >>                     minx="31.3326" miny="-114.715" maxx="34.3087" maxy="-109.048" />
> >>         <MaxScaleDenominator>300000</MaxScaleDenominator>
> >>       </Layer>
> >>     </Layer>
> >>     <Layer queryable="0" opaque="0" cascaded="0">
> >>         <Name>rails</Name>
> >>         <Title>Railway features</Title>
> >>         <Abstract>Railway features from the U.S. Census RAILS data layer.</Abstract>
> >>         <CRS>EPSG:4269</CRS>
> >>         <CRS>EPSG:4326</CRS>
> >>     <EX_GeographicBoundingBox>
> >>         <westBoundLongitude>-165.401</westBoundLongitude>
> >>         <eastBoundLongitude>145.206</eastBoundLongitude>
> >>         <southBoundLatitude>14.1699</southBoundLatitude>
> >>         <northBoundLatitude>65.0001</northBoundLatitude>
> >>     </EX_GeographicBoundingBox>
> >>         <BoundingBox CRS="EPSG:4269"
> >>                     minx="14.1699" miny="-165.401" maxx="65.0001" maxy="145.206" />
> >>     </Layer>
> >>     <Layer queryable="0" opaque="0" cascaded="0">
> >>         <Name>point_landmarks</Name>
> >>         <Title>Landmark Points</Title>
> >>         <Abstract>Point landmarks from the U.S. Census POINTLM data layer.</Abstract>
> >>         <CRS>EPSG:4269</CRS>
> >>         <CRS>EPSG:4326</CRS>
> >>     <EX_GeographicBoundingBox>
> >>         <westBoundLongitude>-114.433</westBoundLongitude>
> >>         <eastBoundLongitude>-109.122</eastBoundLongitude>
> >>         <southBoundLatitude>31.3353</southBoundLatitude>
> >>         <northBoundLatitude>34.2847</northBoundLatitude>
> >>     </EX_GeographicBoundingBox>
> >>         <BoundingBox CRS="EPSG:4269"
> >>                     minx="31.3353" miny="-114.433" maxx="34.2847" maxy="-109.122" />
> >>         <MaxScaleDenominator>15000</MaxScaleDenominator>
> >>     </Layer>
> >>   </Layer>
> >> </Capability>
> >> </WMS_Capabilities>
> >>
> >>
> >> On 4/8/2013 12:23 PM, Tom Kralidis wrote:
> >>>> Date: Mon, 8 Apr 2013 12:17:29 -0400
> >>>> From: woodbri at swoodbridge.com
> >>>> To: mapserver-dev at lists.osgeo.org
> >>>> Subject: [mapserver-dev] GetCapabilities and schema validation issues
> >>>>
> >>>> Hi All,
> >>>>
> >>>> A user working with geoserver and mapserver is working on an intranet
> >>>> with no internet access. It looks like when geoserver is configured to
> >>>> pull maps from mapserver it issues a getCapabilities request that
> >>>> mapserver faithfully serves up, then geoserver issues a request to get
> >>>> xsd to validate it.
> >>>>
> >>>> This is where we have a problem, because we can not access
> >>>> http://schemas.opengis.net because there is not internet access.
> >>>>
> >>>> QUESTION(S):
> >>>>
> >>>> 1. I need to ask if there is a way to turn of schema validation in
> >>>> geoserver, but probably better asked on geoserver list
> >>>>
> >>>> 2. Is there an easy way to change the host where the xsd is located to
> >>>> one on the local intranet?
> >>>
> >>> Try setting MAP.WEB.METADATA.ows_schemas_location (http://mapserver.org/ogc/wms_server.html#web-object-metadata)?
> >>>
> >>>> Any other ideas on how to work around this at the application level and
> >>>> not by hacking the network or DNS configs?
> >>>>
> >>>> -Steve W
> >>> ts.osgeo.org/mailman/listinfo/mapserver-dev
> >>
> 		 	   		  


More information about the mapserver-dev mailing list