| Consider a WMS capability document as below: ```<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE WMT_MS_Capabilities SYSTEM "http://schemas.opengis.net/wms/1.1.1/WMS_MS_Capabilities.dtd"> <WMT_MS_Capabilities version="1.1.1" updateSequence="473"> <Service> <Name>WMS</Name> <Title>WMS</Title> <Abstract>caps document for a WMS 1.1.1 server without formats and a styleless layer</Abstract> <KeywordList> <Keyword>GEOSERVER</Keyword> </KeywordList> <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href=""/> </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=""/> </Get> <Post> <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href=""/> </Post> </HTTP> </DCPType> </GetCapabilities> <GetMap> <DCPType> <HTTP> <Get> <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href=""/> </Get> </HTTP> </DCPType> </GetMap> <GetFeatureInfo> <Format>text/plain</Format> <Format>application/vnd.ogc.gml</Format> <Format>application/vnd.ogc.gml/3.1.1</Format> <Format>text/html</Format> <Format>application/json</Format> <DCPType> <HTTP> <Get> <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href=""/> </Get> <Post> <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href=""/> </Post> </HTTP> </DCPType> </GetFeatureInfo> </Request> <Exception> <Format>application/vnd.ogc.se_xml</Format> <Format>application/vnd.ogc.se_inimage</Format> </Exception> <UserDefinedSymbolization SupportSLD="1" UserLayer="1" UserStyle="1" RemoteWFS="1"/> <Layer> <Title>Root</Title> <SRS>EPSG:4326</SRS> <LatLonBoundingBox minx="-180.0" miny="-90.0" maxx="180" maxy="90"/> <Layer queryable="1" opaque="0"> <Name>topp:states_styless</Name> <Title>states_styless</Title> <Abstract>I am a styless layer in format less capability document</Abstract> <KeywordList> <Keyword>states</Keyword> </KeywordList> <SRS>EPSG:4326</SRS> <LatLonBoundingBox minx="36.0460729490001" miny="32.614108317" maxx="36.153265193" maxy="32.686323626"/> <BoundingBox SRS="EPSG:4326" minx="36.0460729490001" miny="32.614108317" maxx="36.153265193" maxy="32.686323626"/> </Layer> </Layer> </Capability> </WMT_MS_Capabilities> For such cases the WMS Cascaded settings under Publishing tab on Layer Page should show default format selected as image/png. Currently it defaults to no selection because the list is empty. In case of empty format list the default should be added to keep GUI consistent with bean state. |