i'm trying to query a WFS for featuretype descriptions (using Geotools
18.1), but the request is failing because the server does not advertise any
outputFormat so I'm seeing the message "Client does not support any of the
server supported output formats for DESCRIBE_FEATURETYPE" appear in my
log,  (capabilities snippet and stack trace below)

I have 2 questions:

1. is this a compliant WFS? A complaint server must support "text/xml;
subtype=gml/3.1.1" output to describe features AFAIK, but I'm not entirely
sure it must be advertised, looking at the xsd it seems to be optional...

2. if advertising is not required and below snippet is valid should we get
WFS-NG to try "text/xml; subtype=gml/3.1.1" if the list of outputFormat for
DescribeFeatureType is empty? eg. by returning that as a supported format
from AbstractWFSStrategy#getDefaultOutputFormat(WFSOperationType operation)
or by overloading in StrictWFS_1_x_Strategy#getDefaultOutputFormat(...) or
a specific strategy subclass for this product?


*capabilities snippet: *(NB service access is restricted)

<wfs:WFS_Capabilities version="1.1.0" xmlns:ogc="http://www.opengis.net/ogc";
xmlns:wfs="http://www.opengis.net/wfs"; xmlns:ows="http://www.opengis.net/ows";
xmlns:xlink="http://www.w3.org/1999/xlink"; xmlns:gml="
http://www.opengis.net/gml"; xmlns:ns6="http://www.w3.org/2001/SMIL20/";
xmlns:ns7="http://www.w3.org/2001/SMIL20/Language";>
<ows:ServiceIdentification>
.....
</ows:ServiceIdentification>
<ows:ServiceProvider>
....
</ows:ServiceProvider>
<ows:OperationsMetadata>
<ows:Operation name="GetCapabilities">
<ows:DCP>
<ows:HTTP>
<ows:Get xlink:href="https://...../GWCGateWay/dispatch"/>
</ows:HTTP>
</ows:DCP>
</ows:Operation>
<ows:Operation name="DescribeFeatureType">
<ows:DCP>
<ows:HTTP>
<ows:Get xlink:href="https://...../GWCGateWay/dispatch"/>
</ows:HTTP>
</ows:DCP>
</ows:Operation>
<ows:Operation name="GetFeature">
<ows:DCP>
<ows:HTTP>
<ows:Get xlink:href="https://...../GWCGateWay/dispatch"/>
</ows:HTTP>
</ows:DCP>
</ows:Operation>
</ows:OperationsMetadata>
<wfs:FeatureTypeList>
<wfs:FeatureType>
<wfs:Name xmlns="">
x3ZDVSIBC3HT1FYPFIWB5949S95K8JB_XXXXXXXXXXXXXXXXX
</wfs:Name>
<wfs:Title>
XXXXXXXXXXXXXXXXXXX
</wfs:Title>
<wfs:Abstract>*XXXXXXXXXXX*</wfs:Abstract>
<ows:Keywords>
<ows:Keyword>
XXXXX
</ows:Keyword>
<ows:Keyword>
XXXXXXXXXXXX
</ows:Keyword>
</ows:Keywords>
<wfs:DefaultSRS>
EPSG:28992
</wfs:DefaultSRS>
<wfs:OutputFormats>
<wfs:Format>
gml3
</wfs:Format>
<wfs:Format>
application/vnd.google-earth.kml+xml
</wfs:Format>
<wfs:Format>
application/vnd.google-earth.kml xml
</wfs:Format>
<wfs:Format>
application/gml+xml; version=3.2
</wfs:Format>
<wfs:Format>
text/xml; subtype=gml/3.2
</wfs:Format>
<wfs:Format>
KML
</wfs:Format>
<wfs:Format>
GML2
</wfs:Format>
<wfs:Format>
text/xml; subtype=gml/3.1.1
</wfs:Format>
<wfs:Format>
json
</wfs:Format>
<wfs:Format>
text/xml; subtype=gml/2.1.2
</wfs:Format>
<wfs:Format>
gml32
</wfs:Format>
<wfs:Format>
csv
</wfs:Format>
<wfs:Format>
application/json
</wfs:Format>
</wfs:OutputFormats>
<ows:WGS84BoundingBox>
<ows:LowerCorner>
-180.0 -90.0
</ows:LowerCorner>
<ows:UpperCorner>
180.0 90.0
</ows:UpperCorner>
</ows:WGS84BoundingBox>
</wfs:FeatureType>
... MANY MORE ....

*stacktrace:*

2018-01-08 13:34:32 ERROR
nl.b3p.viewer.admin.stripes.AttributeSourceActionBean.save(AttributeSourceActionBean.java:156)
- Error loading new feauture source
java.lang.IllegalArgumentException: Client does not support any of the
server supported output formats for DESCRIBE_FEATURETYPE
at
org.geotools.data.wfs.internal.AbstractWFSStrategy.getDefaultOutputFormat(AbstractWFSStrategy.java:386)
at org.geotools.data.wfs.internal.WFSRequest.<init>(WFSRequest.java:75)
at
org.geotools.data.wfs.internal.DescribeFeatureTypeRequest.<init>(DescribeFeatureTypeRequest.java:28)
at
org.geotools.data.wfs.internal.WFSClient.createDescribeFeatureTypeRequest(WFSClient.java:343)
at
org.geotools.data.wfs.WFSDataStore.getRemoteFeatureType(WFSDataStore.java:207)
at
org.geotools.data.wfs.WFSDataStore.getRemoteSimpleFeatureType(WFSDataStore.java:264)
at
org.geotools.data.wfs.WFSFeatureSource.buildFeatureType(WFSFeatureSource.java:348)
at
org.geotools.data.store.ContentFeatureSource.getAbsoluteSchema(ContentFeatureSource.java:356)
at
org.geotools.data.store.ContentFeatureSource.getSchema(ContentFeatureSource.java:325)
at
org.geotools.data.store.ContentFeatureSource.getSchema(ContentFeatureSource.java:114)
at
nl.b3p.viewer.config.services.WFSFeatureSource.createFeatureTypes(WFSFeatureSource.java:113)
at
nl.b3p.viewer.config.services.WFSFeatureSource.loadFeatureTypes(WFSFeatureSource.java:64)
at
nl.b3p.viewer.admin.stripes.AttributeSourceActionBean.addService(AttributeSourceActionBean.java:195)
at
nl.b3p.viewer.admin.stripes.AttributeSourceActionBean.save(AttributeSourceActionBean.java:154)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)




-- 
Disclaimer;
This message is just a reflection of what I thought at the time of sending.
The message may contain information that is not intended for you or that
you don't understand.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to