We are planning on upgrading from Geoserver 2.1 to 2.3 and are interested in the WFS 2.0 support. I've been trying to find docs on executing "standard joins" with Geoserver's implementation of WFS 2.0, but without luck.
Reading the WFS standard it seems there are two approaches to creating a join query using the POST and KVP methods. I've tried constructing requests using the OpenGeo geoserver site for testing:
POST data:
<?xml version="1.0"?>
<GetFeature
service="WFS"
version="2.0.0"
xmlns="http://www.opengis.net/wfs/2.0"
xmlns:myns="http://www.someserver.com/myns"
xmlns:fes="http://www.opengis.net/fes/2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wfs/2.0
http://schemas.opengis.net/wfs/2.0.0/wfs.xsd">
<wfs:Query typeNames="medford:libraries medford:schools">
<fes:Filter>
<fes:PropertyIsEqualTo>
<fes:ValueReference>medford:libraries/branchname</fes:ValueReference>
<fes:ValueReference>medford:schools/name</fes:ValueReference>
</fes:PropertyIsEqualTo>
</fes:Filter>
</wfs:Query>
</GetFeature>
wget -O- --post-file request.xml http://suite.opengeo.org/geoserver/wfs
returns:
<ows:ExceptionReport version="2.0.0"
xsi:schemaLocation="http://www.opengis.net/ows/1.1 http://suite.opengeo.org/geoserver/schemas/ows/1.1.0/owsAll.xsd"
xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ows:Exception exceptionCode="MissingParameterValue" locator="request">
<ows:ExceptionText>Could not determine geoserver request from http request org.geoserver.monitor.MonitorServletRequest@anonymised.com</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>
I'm not sure which parameter I'm missing. The HTTP post request looks correct...
Using KVP approach:
Only seems to return the medford:libraries featuretype members, rather than a tuple of the joined features..
If someone could help out I would be happy to contribute docs or testing to get this working.
Also because the WFS 2.0 client support is poor at the moment, it would be excellant if the KVP way of sending a request worked. Also using cql_filter approach would be the easiest for users.
Warm Regards,
Jeremy
This message contains information, which is confidential and may be subject to legal privilege. If you are not the intended recipient, you must not peruse, use, disseminate, distribute or copy this message. If you have received this message in error, please notify us immediately (Phone 0800 665 463 or info@anonymised.com) and destroy the original message. LINZ accepts no responsibility for changes to this email, or for any attachments, after its transmission from LINZ. Thank You.