Hi, Here is a link to the specification I looked at:
https://schemas.liquid-technologies.com/opengis/csw/2.0.2/?page=operationsmetadata.html <https://schemas.liquid-technologies.com/opengis/csw/2.0.2/?page=operationsmetadata.html> I see that this is a CSW reference, but since this is based on the OWS-schema, I assume it will be valid for WFS as well. I've submitted an issue <https://osgeo-org.atlassian.net/jira/software/c/projects/GEOT/issues/GEOT-6906> and PR <https://github.com/geotools/geotools/pull/3540>. The PR is much about the JUnit test I've added, because it wouldn't play nice with this service. Mostly because it handles a large dataset. I'm not sure what server implementation Kartverket is using, but it's the Norwegian Mapping Authority. Roar Brænden > 7. jun. 2021 kl. 19:50 skrev Jody Garnett <jody.garn...@gmail.com>: > > I was not aware you could make a global declaration of output formats like > that, what server implementation is producing that WFS GetCapabilities? > > If that is valid according to the specification you are welcome to update the > GeoTools code to support this, your stack trace has already provided the > correct place in the code to start working! > -- > Jody Garnett > > > On Tue, 1 Jun 2021 at 06:26, Roar Brænden <roar.brenden...@gmail.com > <mailto:roar.brenden...@gmail.com>> wrote: > 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? > <https://wfs.geonorge.no/skwms1/wfs.administrative_enheter?>"/> > <ows:Post > xlink:href="https://wfs.geonorge.no/skwms1/wfs.administrative_enheter? > <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 > > <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 > <mailto:GeoTools-GT2-Users@lists.sourceforge.net> > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users > <https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users>
_______________________________________________ GeoTools-GT2-Users mailing list GeoTools-GT2-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users