Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extended Capabilities in GeoServer 2.20.0 include an extra SupportedLanguade tag #9

Open
kalxas opened this issue Oct 27, 2021 · 15 comments
Labels
bug Something isn't working upstream Issue reported upstream

Comments

@kalxas
Copy link
Member

kalxas commented Oct 27, 2021

image

@kalxas
Copy link
Member Author

kalxas commented Oct 27, 2021

Fixed by adding eng as supported language in the inspire configuration:
image

@kalxas
Copy link
Member Author

kalxas commented Oct 27, 2021

Linked to #7

@kalxas kalxas added the bug Something isn't working label Oct 27, 2021
@kalxas
Copy link
Member Author

kalxas commented Oct 27, 2021

@kalxas kalxas self-assigned this Oct 27, 2021
@kalxas
Copy link
Member Author

kalxas commented Oct 28, 2021

Also fixed for virtual WMS, same configuration on the amaqd-wms workspace

@grigoriouelena
Copy link
Collaborator

What happens when the default language is not english?

@grigoriouelena
Copy link
Collaborator

What happens when the default language is not english?

The problem is solved when the i18n configuration is used to provide capabilities information in some default and some other supported language. In our case the default language is greek and the supported language is english.

@kalxas kalxas closed this as completed Oct 29, 2021
@grigoriouelena
Copy link
Collaborator

Correct INSPIRE extended caps schema (TechnicalGuidance_ViewServices_v3.0)

<inspire_vs:ExtendedCapabilities>
<inspire_common:MetadataUrl xsi:type="inspire_common:resourceLocatorType"> <inspire_common:URL>http://discoveryService....</inspire_common:URL>
< inspire_common:MediaType>application/vnd.ogc.csw….</inspire_common:MediaType>
</inspire_common:MetadataUrl>
<inspire_common:SupportedLanguages xsi:type="inspire_common:supportedLanguagesType">
<inspire_common:DefaultLanguage>
<inspire_common:Language>dut</inspire_common:Language>
</inspire_common:DefaultLanguage>
<inspire_common:SupportedLanguage>
<inspire_common:Language>eng</inspire_common:Language>
</inspire_common:SupportedLanguage>
</inspire_common:SupportedLanguages>
<inspire_common:ResponseLanguage>
<inspire_common:Language>dut</inspire_common:Language>
</inspire_common:ResponseLanguage>
</inspire_vs:ExtendedCapabilities>

  1. same default and supported language

When the default and other supported language is the same, the capabilities document omits the element /../inspire_vs:ExtendedCapabilities/inspire_common:SupportedLanguages/inspire_common:SupportedLanguage.
Since the element is not mandatory, the validation is successful (at least as regards the schema validation).

image
image

Relevant validation report: 1. wmsCaps_SameDefaultSupportedLang.html.zip

  1. no other supported language
    When no other supported language is selected, the element
    /../inspire_vs:ExtendedCapabilities/inspire_common:SupportedLanguages/inspire_common:SupportedLanguage is present in the capabilities document but it is not correctly encoded.

image

image

The child element /../inspire_vs:ExtendedCapabilities/inspire_common:SupportedLanguages/inspire_common:SupportedLanguage/inspire_common:Language is missing so the schema validation fails.

The validator returns the following message:

Schema not valid: [org.xml.sax.SAXException: Fatal error: org.xml.sax.SAXParseException; lineNumber: 110; columnNumber: 48; cvc-complex-type.2.4.b: The content of element 'inspire_common:SupportedLanguage' is not complete. One of '{"http://inspire.ec.europa.eu/schemas/common/1.0":Language}' is expected. Response did not validate against schema 'http://inspire.ec.europa.eu/schemas/inspire_vs/1.0/inspire_vs.xsd'.]

Relevant validation report: 2. wmsCaps_noOtherSupportedLang.html.zip

  1. different default and other supported language
    The desired configuration in our case is to provide different default and supported languages, using the i18n configuration for the internationalization of the capabilities response.

image
When this configuration is present, the capabilities response is again not correctly encoded.

image

The relevant test fails for the schema validation. The error is
Schema not valid: [org.xml.sax.SAXException: Fatal error: org.xml.sax.SAXParseException; lineNumber: 110; columnNumber: 85; cvc-complex-type.2.3: Element 'inspire_common:SupportedLanguage' cannot have character [children], because the type's content type is element-only. Response did not validate against schema 'http://inspire.ec.europa.eu/schemas/inspire_vs/1.0/inspire_vs.xsd'.]

Relevant validation report: 3. wmsCaps_difDefaultSupportedLang.html.zip

Note #1: The i18n configuration does not affect geoserver’s behavior regarding the inspire extended caps.
Note #2: The above testing was made for the following virtual wms
http://beta.geoportal.ypen.gr/geoserver/aqd-wms/ows?service=wms&version=1.3.0&request=GetCapabilities

1. wmsCaps_SameDefaultSupportedLang.html.zip
2. wmsCaps_noOtherSupportedLang.html.zip
3. wmsCaps_difDefaultSupportedLang.html.zip

@kalxas kalxas reopened this Nov 3, 2021
@kalxas
Copy link
Member Author

kalxas commented Nov 3, 2021

This might be the source of this issue:
geoserver/geoserver#5123

@kalxas
Copy link
Member Author

kalxas commented Nov 3, 2021

My suggestion is to raise this issue upstream

@kalxas
Copy link
Member Author

kalxas commented Nov 4, 2021

@kalxas
Copy link
Member Author

kalxas commented Nov 9, 2021

Update 08-11-2021: We agreed to not add extra languages in version 2.20 since this triggers the validator bug. Waiting for bug to be resolved upstream.

@kalxas
Copy link
Member Author

kalxas commented Feb 22, 2023

@kalxas
Copy link
Member Author

kalxas commented Feb 22, 2023

@kalxas
Copy link
Member Author

kalxas commented Feb 22, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream Issue reported upstream
Projects
None yet
Development

No branches or pull requests

2 participants