Configuring Cascaded Layers via the REST API (wmsLayers) doesn't parse basic metadata from remote service
---------------------------------------------------------------------------------------------------------
Key: GEOS-4775
URL: https://jira.codehaus.org/browse/GEOS-4775
Project: GeoServer
Issue Type: Bug
Components: REST
Reporter: Jeffrey Johnson
Assignee: Andrea Aime
Priority: Minor
When configuring a Cascaded WMS Layer via the REST api (using the rest/workspaces/<workspace>/wmsstores/<store>/wmslayers endpoint), several pieces of metadata from the remote service's GetCapabilities are not stored to the newly created resource/layer. If the same layer is configured via the wicket UI, this metadata is parsed from the GetCapabilities and stored.
When configured via the wicket UI, the xml representation of the layer looks like this
<wmsLayer>
<name>Brasil</name>
<nativeName>geonode:Brasil</nativeName>
<namespace>
<name>geonode</name>
<atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/rest/namespaces/geonode.xml" type="application/xml"/>
</namespace>
<title>Brasil</title>
<description>No abstract provided</description>
<abstract>No abstract provided</abstract>
<keywords>
<string/>
</keywords>
<metadataLinks>
<metadataLink>
<type>text/xml</type>
<metadataType>TC211</metadataType>
<content>
http://localhost:8080/geonetwork/srv/en/csw?outputschema=http%3A%2F%2Fwww.isotc211.org%2F2005%2Fgmd&service=CSW&request=GetRecordById&version=2.0.2&elementsetname=full&id=126cd0d1-1120-4341-a7e1-e8a271a77de7
</content>
</metadataLink>
</metadataLinks>
<nativeCRS>
GEOGCS["WGS 84", DATUM["World Geodetic System 1984", SPHEROID["WGS 84", 6378137.0, 298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4326"]]
</nativeCRS>
<srs>EPSG:4326</srs>
<nativeBoundingBox>
<minx>-73.991</minx>
<maxx>-34.793</maxx>
<miny>-33.751</miny>
<maxy>5.272</maxy>
<crs>EPSG:4326</crs>
</nativeBoundingBox>
<latLonBoundingBox>
<minx>-73.991</minx>
<maxx>-34.793</maxx>
<miny>-33.751</miny>
<maxy>5.272</maxy>
<crs>EPSG:4326</crs>
</latLonBoundingBox>
<projectionPolicy>FORCE_DECLARED</projectionPolicy>
<enabled>true</enabled>
<store class="wmsStore">
<name>wms.demo.geonode.org</name>
<atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/rest/workspaces/geonode/wmsstores/wms.demo.geonode.org.xml" type="application/xml"/>
</store>
</wmsLayer>
When configured by POSTing this snippet to the wmslayers endpoint
<wmsLayer><name>geonode:Brasil</name></wmsLayer>
the resulting xml representation looks like this: NOTE that title, description, abstract, keywords and nativeCRS are not included.
<wmsLayer>
<name>geonode:Brasil</name>
<nativeName>geonode:Brasil</nativeName>
<namespace>
<name>geonode</name>
<atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/rest/namespaces/geonode.xml" type="application/xml"/>
</namespace>
<srs>EPSG:4326</srs>
<nativeBoundingBox>
<minx>-73.99094199999999</minx>
<maxx>-34.793335</maxx>
<miny>-33.750862</miny>
<maxy>5.272224</maxy>
<crs>EPSG:4326</crs>
</nativeBoundingBox>
<latLonBoundingBox>
<minx>-73.99094199999999</minx>
<maxx>-34.793335</maxx>
<miny>-33.750862</miny>
<maxy>5.272224</maxy>
<crs>EPSG:4326</crs>
</latLonBoundingBox>
<projectionPolicy>FORCE_DECLARED</projectionPolicy>
<enabled>true</enabled>
<store class="wmsStore">
<name>wms.demo.geonode.org</name>
<atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/rest/workspaces/geonode/wmsstores/wms.demo.geonode.org.xml" type="application/xml"/>
</store>
</wmsLayer>
It seems as if the REST api should be taking care of this for me since I really only know the layers name by querying wmslayers?list=available
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira