0

My geoserver WMS GetCapabilities request returns an XML file download popup. But I want to see xml result on my browser. And I want to request via ajax request. But could not.

WMS Get capabilities like this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE WMT_MS_Capabilities SYSTEM "http://schemas.opengis.net/wms/1.1.1/capabilities_1_1_1.dtd" >

<WMT_MS_Capabilities version="1.1.1">
  <Service>
    <Name>OGC:WMS</Name>
    <Title>Web Map Service</Title>
    <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://.."/>
  </Service>
  <Capability>
    <Request>
      <GetCapabilities>
        <Format>application/vnd.ogc.wms_xml</Format>
        <DCPType>
          <HTTP>
            <Get>
              <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://..."/>
            </Get>
          </HTTP>
        </DCPType>
      </GetCapabilities>
1

WMS till version 1.1.1 is using mime type application/vnd.ogc.wms_xml. Set your system to open such documents with a browser or use WMS 1.3.0 that is using mime type that is understood by browsers automatically.

Compare

http://demo.geo-solutions.it/geoserver/wms?service=WMS&version=1.3.0&request=GetCapabilities

vs.

http://demo.geo-solutions.it/geoserver/wms?service=WMS&version=1.1.1&request=GetCapabilities

  • Version 1.3.0 does not work that requested source. So is this a geoserver problem? – barteloma Aug 16 '17 at 13:02
  • Oh sorry, my requested link is Gowebcache capability service. I noticed now. – barteloma Aug 16 '17 at 13:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.