I almost posted this to the user list, but once I figured out the issue this felt more appropriate in the developers’ list … so here I am …
To use the REST interface to update the CoverageDimensionInfo details for a coverage resource … i.e. populate the Coverage Band Details for a coverage layer … it appears that you have to explicitly specify the CoverageDimensionInfo class to get the dimensions list to be properly unmarshalled, like so:
curl -v -u admin:xxxxxx -XPUT -H “Content-type: text/xml” -d “truenewwordwindspeedmps” http://localhost:8080/geoserver/rest/workspaces/arthur/coveragestores/wind/coverages/wind
Otherwise, you get an com.thoughtworks.xstream.mapper.CannotResolveClassException: dimension caused by .
I believe this is handled with the @uml.property name=“dimensions” in
and similarly in
Not sure, though, as it’s late and I don’t really see a setter for the CoverageDimensionInfo list in CoverageInfo, just a getter.
Should this somehow be set to implicitly handle dimension as members of the dimensions list? Am I just missing how to form the xml for this?
Also, the org.geotools.util.NumberRange is used for the range property, and that seems potentially difficult to deserialize?
While I am on this topic, does anyone know if gsconfig python can handle the coverage dimension settings? I don’t see right away where it handles it, and perhaps it is because of the needed explicit class specification??
Full debug from the request without explicitly specifying the class name:
< HTTP/1.1 500 Internal Server Error
- Server Apache-Coyote/1.1 is not blacklisted
< Server: Apache-Coyote/1.1
< Transfer-Encoding: chunked
< Date: Thu, 02 Apr 2015 04:14:41 GMT
< Connection: close
<
dimension : dimension
---- Debugging information ----
message : dimension
cause-exception : com.thoughtworks.xstream.mapper.CannotResolveClassException
cause-message : dimension
class : java.util.ArrayList
required-type : java.util.ArrayList
converter-type : org.geoserver.config.util.LaxCollectionConverter
line number : 1
class[1] : org.geoserver.catalog.impl.CoverageInfoImpl
converter-type[1] : org.geoserver.config.util.XStreamPersister$CoverageInfoConverter
version : 1.4.7 - Closing connection 0
Thanks as always,
Mike Grogan