On Tue, Dec 15, 2015 at 7:39 PM, Passmore, James H. <[email protected]> wrote:
> Just looking to see how GeoServer responds to a WCS 2.0 request with the > optional acceptlanguages parameter. > > Background: the AcceptLanguages parameter is defined by OWS common (OGC > 06-121r9) version 2, and it is the GetCapabilities operation (Clause 7) of > this version of OWS common that WCS 2.0 should conform to. > > My request is of the form: > > http:// > [myserver]/geoserver/OneGDev/wcs?service=WCS&request=GetCapabilities&AcceptLanguages=*& > > I think GeoServer doesn't yet have language support for any OGC service so > I was expecting the AcceptLanguages=*& (parameter=value&) to be ignored and > a default GetCapabilities response to be returned (actually it's not a good > test, because the * also allows the server to return a response in a > language of its choice), but in any case I got an error: > > <ows:ExceptionReport xmlns:xs="http://www.w3.org/2001/XMLSchema" > xmlns:ows="http://www.opengis.net/ows/2.0" xmlns:xsi=" > http://www.w3.org/2001/XMLSchema-instance" version="2.0.0" > xsi:schemaLocation="http://www.opengis.net/ows/2.0 > http://schemas.opengis.net/ows/2.0/owsExceptionReport.xsd"> > <ows:Exception exceptionCode="InvalidParameterValue" > locator="ACCEPTLANGUAGES"> > <ows:ExceptionText> > Failed to set property ACCEPTLANGUAGES in request object using value * of > type class java.lang.String java.lang.String cannot be cast to > net.opengis.ows20.AcceptLanguagesType [] > </ows:ExceptionText> > </ows:Exception> > </ows:ExceptionReport> > > This response then looks like GeoServer is trying to parse the parameter > somehow and fails, is this a bug? Does it mean that there is some work > going on to somehow include the AcceptLanguages parameter?? > I'm not aware of any work going on regarding to AcceptLanguages, it's just that the basic reflection parsing logic finds a field of type AcceptLanguagesType in the request object, has a string from the request, and does not have a strategy to convert one from the other. The reason why the field is there in the first place is, that those beans (EMF objects actually) got generated from the XML schema. Is it a bug... hum.. probably? A parameter that's not recognized should be ignored, so I guess one could write a kvp parser that takes whatever value in AcceptLanguages, and return null, just to quiet things down. Cheers Andrea -- == GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information. == *Geosolutions' Winter Holidays from 24/12 to 6/1* 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. -------------------------------------------------------
------------------------------------------------------------------------------
_______________________________________________ Geoserver-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-users
