Andrea,

thanks for your answer.

You're right, I meant WFSWorkspaceQualifier/qualifyRequest.

I'm working with Hexagon SDI and, only with WFS, as soon as I specify a
workspace or a workspace/layer as a virtual service, Geoserver returns :

<ows:Exception exceptionCode="InvalidParameterValue" locator="namespace">
<ows:ExceptionText>Unknown namespace []</ows:ExceptionText>
</ows:Exception>

Here's an example that's failing :

/geoserver/workspace/layer/wfs?REQUEST=GetFeature&SERVICE=WFS&VERSION=1.1.0&MAXFEATURES=5000&RESULTTYPE=results&SRSNAME=urn:x-ogc:def:crs:EPSG:3857&TYPENAME=p1:layer&FILTER=<Filter+xmlns=&quot;http://www.opengis.net/ogc&quot;><BBOX><PropertyName+xmlns:ogc=&quot;http://www.opengis.net/ogc&quot;+xmlns=&quot;http://www.opengis.net/ogc&quot;>SHAPE</PropertyName><Envelope+srsName=&quot;urn:x-ogc:def:crs:EPSG:3857&quot;+xmlns=&quot;http://www.opengis.net/gml&quot;><lowerCorner>-7974975.62645113+5951804.48757899</lowerCorner><upperCorner>-7971215.88012235+5953713.02462899</upperCorner></Envelope></BBOX></Filter>&NAMESPACE=xmlns(p1=http://server:8080/geoserver/workspace)

An other option would be to modify
BaseFeatureKvpRequestReEader/checkTypeName but at this point, the prefix is
already lost because WFSWorkspaceQualifier/qualifyRequest removed it from
the QName.

I could replace in checkTypeName:

String prefix = qName.getPrefix();

With :

String prefix = qName.getPrefix();
if (prefix == "")
    prefix = "p1";

This also makes the query work but I think it's less elegant cause the
prefix is hard coded (got it from the previous query).

Since the prefix is known at the beginning of
WFSWorkspaceQualifier/qualifyRequest, I would perform the former
modification. If the prefix == "" then the current behavior will be kept.

Do you consider it a bug ? Should I make the modification as a quick fix to
be released or I should use and maintain my own version of gs-wfs.jar ?

Thanks



--
Sent from: http://osgeo-org.1560.x6.nabble.com/GeoServer-User-f3786390.html


_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to