Hi,
I try to read data from a WFS server, but get the exception:
java.lang.IllegalArgumentException: Client does not support any of the server
supported output formats for GET_FEATURE
at
org.geotools.data.wfs.internal.AbstractWFSStrategy.getDefaultOutputFormat(AbstractWFSStrategy.java:403)
at org.geotools.data.wfs.internal.WFSRequest.<init>(WFSRequest.java:72)
at
org.geotools.data.wfs.internal.GetFeatureRequest.<init>(GetFeatureRequest.java:60)
at
org.geotools.data.wfs.internal.WFSClient.createGetFeatureRequest(WFSClient.java:316)
at
org.geotools.data.wfs.WFSFeatureSource.createGetFeature(WFSFeatureSource.java:231)
at
org.geotools.data.wfs.WFSFeatureSource.getReaderInternal(WFSFeatureSource.java:273)
at
org.geotools.data.store.ContentFeatureSource.getReader(ContentFeatureSource.java:635)
at
org.geotools.data.store.ContentFeatureSource.getReader(ContentFeatureSource.java:579)
at ReadWFSKommuner.main(ReadWFSKommuner.java:22)
When I look at the capabilities document(1
<https://wfs.geonorge.no/skwms1/wfs.administrative_enheter?&service=WFS&acceptversions=2.0.0&request=GetCapabilities>),
I see that there isn't specified any outputFormat for operation GET_FEATURE,
but there seems to be a global declaration for all operations:
<ows:Operation name="GetFeature">
<ows:DCP>
<ows:HTTP>
<ows:Get
xlink:href="https://wfs.geonorge.no/skwms1/wfs.administrative_enheter?"/>
<ows:Post
xlink:href="https://wfs.geonorge.no/skwms1/wfs.administrative_enheter?"/>
</ows:HTTP>
</ows:DCP>
</ows:Operation>
....
<ows:Parameter name="outputFormat">
<ows:AllowedValues>
<ows:Value>text/xml; subtype=gml/3.2.1</ows:Value>
<ows:Value>application/gml+xml; version=3.2</ows:Value>
</ows:AllowedValues>
</ows:Parameter>
Has anyone experienced something similar, or can someone tell me if Geotools
should have taken this parameter into account?
Best regards,
Roar Brænden
1)
https://wfs.geonorge.no/skwms1/wfs.administrative_enheter?&service=WFS&acceptversions=2.0.0&request=GetCapabilities
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users