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

Use correct schema URL for xsi:schemaLocation for WFS 1.1.0 GetCapabilities response #45235

Merged
merged 1 commit into from Oct 12, 2021

Conversation

pathmapper
Copy link
Contributor

Description

Before:
before

This PR:
after

@github-actions github-actions bot added this to the 3.22.0 milestone Sep 24, 2021
@pathmapper
Copy link
Contributor Author

Test failure seems unrelated:

99% tests passed, 1 tests failed out of 759

Total Test time (real) = 1454.42 sec

The following tests FAILED:
	 13 - ProcessingQgisAlgorithmsTestPt4 (Failed)
File "/tmp/tmpqum_7uzs/highlight_lines.png" not found.
255
File "/tmp/tmpgfjmf7r3/highlight_polygons.png" not found.
	Add file: /root/QGIS/.ci/config_test.ctest
	Add file: /root/QGIS/build/CMakeCache.txt

@pathmapper pathmapper closed this Sep 24, 2021
@pathmapper pathmapper reopened this Sep 24, 2021
@pblottiere
Copy link
Member

Hello @pathmapper,

Thanks for your recent work on WFS 1.X 👍. I'm just going to run OGC TeamEngine on this PR to check if we're going in the right direction.

@github-actions
Copy link

github-actions bot commented Oct 9, 2021

The QGIS project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 14 days and is being automatically marked as "stale". If you think this pull request should be merged, please check

  • that all unit tests are passing

  • that all comments by reviewers have been addressed

  • that there is enough information for reviewers, in particular

    • link to any issues which this pull request fixes

    • add a description of workflows which this pull request fixes

    • add screenshots if applicable

  • that you have written unit tests where possible
    In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this pull request.
    If there is no further activity on this pull request, it will be closed in a week.

@github-actions github-actions bot added the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Oct 9, 2021
@pathmapper
Copy link
Contributor Author

Just run the OGC TeamEngine on this PR (WFS-Basic):

image

There's no difference in the test results compared to the status before this PR. Looks like the schema URL for xsi:schemaLocation is not covered by TeamEngine tests.

This PR:

test_pr_45235

Before this PR:

test_before_pr_45235

@github-actions github-actions bot removed the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Oct 10, 2021
@pblottiere
Copy link
Member

Just run the OGC TeamEngine on this PR (WFS-Basic):

Oh nice, thanks for taking a look @pathmapper 👍! But something seems to be missing because the wfs:run-GetCapabilities-basic-cc-GET should not be failing: http://test.qgis.org/ogc_cite/wfs_110/2021_10_10_05_00/report.html.

I'm (finally) compiling your branch.

@pathmapper
Copy link
Contributor Author

pathmapper commented Oct 10, 2021

But something seems to be missing

@pblottiere thanks for taking a look, too. This is not related to this PR.

It's related to the QGIS test project I'm using for the TeamEngine test, there's no WMSContactOrganization specified, so the mandatory ows:ProviderName is missing in the GetCapabilities response.

//ProviderName
const QString contactOrganization = QgsServerProjectUtils::owsServiceContactOrganization( *project );
if ( !contactOrganization.isEmpty() )
{
QDomElement providerNameElem = doc.createElement( QStringLiteral( "ows:ProviderName" ) );
const QDomText providerNameText = doc.createTextNode( contactOrganization );
providerNameElem.appendChild( providerNameText );
serviceElem.appendChild( providerNameElem );
}

QString QgsServerProjectUtils::owsServiceContactOrganization( const QgsProject &project )
{
return project.readEntry( QStringLiteral( "WMSContactOrganization" ), QStringLiteral( "/" ) );
}

We should use a fallback like "Unknown" for QgsServerProjectUtils::owsServiceContactOrganization to make sure ows:ProviderName is always included in the GetCapabilities response.

Looks like this applies to WMTS GetCapabilities response as well:

const QString contactOrganization = QgsServerProjectUtils::owsServiceContactOrganization( *project );
if ( !contactOrganization.isEmpty() )
{
QDomElement contactOrganizationElem = doc.createElement( QStringLiteral( "ows:ProviderName" ) );
const QDomText contactOrganizationText = doc.createTextNode( contactOrganization );
contactOrganizationElem.appendChild( contactOrganizationText );
serviceElem.appendChild( contactOrganizationElem );
}

I'm happy to submit a PR for this. Currently not sure if ows:ProviderName must always be included in the GetCapabilities response.

@pblottiere
Copy link
Member

Hello @pathmapper,

I ran the WFS 1.1.0 testsuite and I didn't notice any changes (neither improvement nor degradation).

Can you rebase please? Then I'll merge your PR.

Thanks a lot for your patience 👍

@pathmapper
Copy link
Contributor Author

Can you rebase please?

Thanks @pblottiere, done.

@pblottiere pblottiere merged commit 2c18dea into qgis:master Oct 12, 2021
@pathmapper pathmapper deleted the wfs_110_capabilities_schema branch October 12, 2021 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants