Hi Tim,
if we look at it in general terms (beyond the specifics of the WCS issue) this is not exactly an easy fix, due to the way GeoServer parses the requests.
In the Dispatcher class GeoServer first decides which service and version need to handle the request, and
the dispatches it.
Unfortunately, negotiation is not well build into the Dispatcher, and it fails to handle those parameters you’re citing… this is also
causing other issues, like picking up the wrong kvp parser, and so on.
I’ve beeing trying to solve this problem, in my spare time, since 2010:
https://osgeo-org.atlassian.net/browse/GEOS-4221
(the ticket has been migrated this year, the original version is here http://jira.codehaus.org/browse/GEOS-4221)
My latest attempt at fixing the issue is one year old:
https://github.com/geoserver/geoserver/pull/574
And well… after several attempts I’ve come to a realization… it’s not something I can manage to do in my spare time…
The problem is that changing the dispatcher has too many ramifications, and requires going over all the CITE
tests, so it ends up requiring too much time in a single uninterrupted session to be done in spare time.
Specifically for WCS, workarounds could be implemented, like making the WCS 2.0 capabilities kvp reader
understand also the wcs 1.1 and 1.0 syntax, which is a much smaller change, and then have the WCS 2.0
service learn to dispatch also back to 1.0… I mean, it’s feasible, it’s just not the clean solution imho
Cheers
Andrea
···
On Sat, May 30, 2015 at 10:10 AM, Tim Chan <TCHAN@anonymised.com> wrote:
Hi,
I am trying to use QGIS as a WCS client against a GeoServer instance. The first thing QGIS does is to attempt to get the capabilities document, i.e.:
http://hostname/geoserver/wcs?SERVICE=WCS&REQUEST=GetCapabilities&AcceptVersions=1.1.0,1.0.0
However this causes an exception on GeoServer 2.6.1 (on linux):
Caused by: javax.xml.transform.TransformerException: java.lang.IllegalArgumentException: Not a GetCapabilitiesType: net.opengis.wcs20.impl.GetCapabilitiesTypeImpl@anonymised.com (updateSequence: null, baseUrl: http://sumi:8686/geoserver/) (service: WCS)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:755)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:359)
at org.geotools.xml.transform.TransformerBase$Task.run(TransformerBase.java:300)
at org.geotools.xml.transform.TransformerBase.transform(TransformerBase.java:133)
at org.geotools.xml.transform.TransformerBase.transform(TransformerBase.java:112)
at org.geoserver.wcs2_0.response.WCS20GetCapabilitiesResponse.write(WCS20GetCapabilitiesResponse.java:69)
… 94 more
Caused by: java.lang.IllegalArgumentException: Not a GetCapabilitiesType: net.opengis.wcs20.impl.GetCapabilitiesTypeImpl@anonymised.com3… (updateSequence: null, baseUrl: http://sumi:8686/geoserver/) (service: WCS)
at org.geoserver.wcs.response.WCSCapsTransformer$WCS111CapsTranslator.encode(WCSCapsTransformer.java:116)
at org.geotools.xml.transform.TransformerBase$XMLReaderSupport.parse(TransformerBase.java:1026)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:677)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:746)
… 99 more
I guess this is because GeoServer expects the “Version” parameter (WCS 2.0) instead of the “AcceptVersions” parameter (WCS 1.0/1.1). Is there a way to force GeoServer to use the WCS 1.0/1.1 syntax instead? I have tried editing wcs.xml but it always gets overwritten.
Regards,
Tim
Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
–
==
GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.
The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.