[CITE-Forum] WFS 2.0.0 test failure due to wrong namespace prefix

Richard Martell rmartell at arbitechnics.com
Tue Jun 12 22:37:33 EDT 2018

Hi Dennis,

In a namespace declaration the choice of prefix is arbitrary (except for 
one or two special W3C namespaces). In a qualified name the prefix must 
be associated with the correct namespace name (URI), but otherwise it 
has no significance.

"Note that the prefix functions _only_ as a placeholder for a namespace 
name. Applications _SHOULD_ use the namespace name, not the prefix, in 
constructing names whose scope extends beyond the containing document."

   - Namespaces in XML (W3C Recommendation), available at 

Note: This is a normative reference in the WFS spec. Also, the XPath 
spec uses the expanded QName in node tests.

A WFS implementation is expected to be namespace-aware and operate on 
expanded names, consisting of a namespace URI (obtained by resolving the 
namespace prefix, if any) and a local name. Given the namespace binding 
for the prefix "ns89", the feature type name is then 
(using the conventional notation); this matches what is listed in the 
capabilities document.



On 2018-06-12 01:18, Dennis Lümkemann via CITE-Forum wrote:
> Dear all,
> I'm trying to successfully run the WFS 2.0.0 test in Team Engine
> (OGC-hosted) against our WFS service. Unfortunately, the tests stop at
> an early stage because of a namespace issue:
> Capabilities are retrieved successfully. They contain a list of
> supported features, for an example see end of this post.
> In the following GetFeature request, the test suite uses a
> self-generated namespace prefix ("ns89") for a namespace already
> defined in the Capabilities (prefix "au"):
> <wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs/2.0" count="25"
> startIndex="0" service="WFS" version="2.0.0">
>         <wfs:Query
> xmlns:ns89="https://<ourserver-url>/WFS_INSP_BW_Verwaltungeinheiten_BasisDLM/4.0"
> typeNames="ns89:AdministrativeUnit"/>
> </wfs:GetFeature>
> We are using a proxy for authorization and this proxy checks the
> requested namespace prefix. Since "ns89" is not known, the request is
> rejected and the test fails.
> My question:
> Does the server have to accept these "invented" namespace prefixes? I
> couldn't find anything in the WFS 2.0.0 spec in this respect. But I'm
> surprised this is happening. Why doesn't the test simply use the
> namespace prefix supplied in the Capabilities?
> Looking forward to some insights from the experts :)
> Thanks
> Dennis
> Capabilities excerpt:
> ...
> <FeatureType>
>             <Name
> xmlns:au="https://<ourserver-url>/WFS_INSP_BW_Verwaltungeinheiten_BasisDLM/4.0">au:AdministrativeUnit</Name>
>             <Title>Verwaltungseinheit</Title>
>             <Abstract>...</Abstract>
>             <ows:Keywords>
>                 <ows:Keyword>Verwaltungseinheit</ows:Keyword>
>                 <ows:Keyword>Administrative Unit</ows:Keyword>
>             </ows:Keywords>
>             <DefaultCRS>urn:ogc:def:crs:EPSG::25832</DefaultCRS>
>             <OtherCRS>urn:ogc:def:crs:EPSG::25833</OtherCRS>
>             <OtherCRS>urn:ogc:def:crs:EPSG::4258</OtherCRS>
>             <OutputFormats>
>                 <Format>application/gml+xml; version=3.2</Format>
>                 <Format>text/xml; subtype=gml/3.2.1</Format>
>             </OutputFormats>
>             <ows:WGS84BoundingBox>
>                 <ows:LowerCorner>7.448903 47.530245</ows:LowerCorner>
>                 <ows:UpperCorner>10.529065 49.792735</ows:UpperCorner>
>             </ows:WGS84BoundingBox>
>             <MetadataURL
> xlink:href="http://<metadataserver-url>?Service=CSW&Request=GetRecordById&Version=2.0.2&id=b3e5b904-206b-0245-7472-c7e2c33c3d2b&outputSchema=http://www.isotc211.org/2005/gmd&elementSetName=full"/>
> </FeatureType>
> ...
> _______________________________________________
> CITE-Forum mailing list
> CITE-Forum at lists.opengeospatial.org
> https://lists.opengeospatial.org/mailman/listinfo/cite-forum

More information about the CITE-Forum mailing list