[Geoserver-users] Geoserver 2.3.X and WFS propertyName not working

Hi,

I need to filter output properties on my GetFeature request. Back in geoserver 2.2.X this used to work:

http://127.0.0.1:8080/geoserver/wfs?request=GetFeature&version=1.1.0&typeName=topp:states&outputFormat=GML2&FEATUREID=states.3&propertyName=MALE

However, in 2.3.X (tried 2.3.1 also) it's not working:

http://127.0.0.1:8080/geoserver/wfs?request=GetFeature&version=1.1.0&typeName=topp:states&outputFormat=GML2&FEATUREID=states.3&propertyName=MALE

<ows:ExceptionReport version="1.0.0" xsi:schemaLocation="http://www.opengis.net/ows http://127.0.0.1:8080/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd&quot;&gt;&lt;ows:Exception exceptionCode="NoApplicableCode"><ows:ExceptionText>java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Collection
java.lang.String cannot be cast to java.util.Collection</ows:ExceptionText></ows:Exception></ows:ExceptionReport>

The requests are the demo ones with the propertyName parameter.

Is this a known bug, or am I missing something?

Thanks,

Paolo

--
Paolo Crosato
Software engineer/Custom Solutions

On Tue, Apr 23, 2013 at 12:20 PM, Paolo Crosato <
paolo.crosato@anonymised.com> wrote:

http://127.0.0.1:8080/geoserver/wfs?request=GetFeature&version=1.1.0&typeName=topp:states&outputFormat=GML2&FEATUREID=states.3&propertyName=MALE

This request is invalid, it may be that it was working by accident.
Try adding &service=WFS in the request

Cheers
Andrea

--

GeoServer training in Milan, 6th & 7th June 2013! Visit
http://geoserver.geo-solutions.it 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

-------------------------------------------------------

Thank you very much, now it works perfectly. Didn’t pay enough attention to the docs, service is mandatory indeed. Guess in the previous version there was some mapping between the entry point and the service name. Best regards Paolo

···

Il 23/04/2013 12:46, Andrea Aime ha scritto:

On Tue, Apr 23, 2013 at 12:20 PM, Paolo Crosato <paolo.crosato@anonymised.com> wrote:

http://127.0.0.1:8080/geoserver/wfs?request=GetFeature&version=1.1.0&typeName=topp:states&outputFormat=GML2&FEATUREID=states.3&propertyName=MALE

This request is invalid, it may be that it was working by accident.
Try adding &service=WFS in the request

Cheers
Andrea

-- 
Paolo Crosato
Software engineer/Custom Solutions

On Tue, Apr 23, 2013 at 3:30 PM, Paolo Crosato <
paolo.crosato@anonymised.com> wrote:

Il 23/04/2013 12:46, Andrea Aime ha scritto:

On Tue, Apr 23, 2013 at 12:20 PM, Paolo Crosato <
paolo.crosato@anonymised.com> wrote:

http://127.0.0.1:8080/geoserver/wfs?request=GetFeature&version=1.1.0&typeName=topp:states&outputFormat=GML2&FEATUREID=states.3&propertyName=MALE

This request is invalid, it may be that it was working by accident.
Try adding &service=WFS in the request

Cheers
Andrea

Thank you very much, now it works perfectly. Didn't pay enough attention
to the docs, service is mandatory indeed. Guess in the previous version
there was some mapping between the entry point and the service name.

That mapping is still there, but KVP parsing happens before we do that, and
a KVP parser for another service can find
its way in.
I tried to prepare a patch for that once, but it's very invasive and
hitting the central core of GeoServer service handling,
so far it has not been applied: http://jira.codehaus.org/browse/GEOS-4221

Cheers
Andrea

--

GeoServer training in Milan, 6th & 7th June 2013! Visit
http://geoserver.geo-solutions.it 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

-------------------------------------------------------