http://localhost:8080/geoserver/ows?service=WCS&request=GetCapabilities§ions=OperationsMetadata,Contents&ACCEPT_VERSIONS=1.1.1
Results in:
Caused by: java.lang.ClassCastException: net.opengis.ows11.impl.SectionsTypeImpl cannot be cast to net.opengis.ows20.SectionsType
at net.opengis.ows20.impl.GetCapabilitiesTypeImpl.eSet(GetCapabilitiesTypeImpl.java:409)
at net.opengis.wcs20.impl.GetCapabilitiesTypeImpl.eSet(GetCapabilitiesTypeImpl.java:148)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:1081)
To be noted, the code already had a work around for the acceptversions parsing, but not the sections one:
public class WcsGetCapabilitiesRequestReader extends EMFKvpRequestReader {
public WcsGetCapabilitiesRequestReader() {
super(GetCapabilitiesType.class, Wcs111Factory.eINSTANCE);
}
public Object read(Object request, Map kvp, Map rawKvp) throws Exception {
// make sure we get the right accepts versions param -> workaround for GEOS-1719
if(rawKvp.containsKey("acceptVersions")) {
AcceptVersionsKvpParser avp = new AcceptVersionsKvpParser();
AcceptVersionsType avt = (AcceptVersionsType) avp.parse((String) rawKvp.get("acceptVersions"));
kvp.put("acceptVersions", avt);
}
request = super.read(request, kvp, rawKvp);
return request;
}
}
|