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

TestName : Test wfs:wfs-1.1.0-Basic-GetFeature-tc5 #54

Closed
Vinni0803 opened this issue Apr 20, 2016 · 20 comments
Closed

TestName : Test wfs:wfs-1.1.0-Basic-GetFeature-tc5 #54

Vinni0803 opened this issue Apr 20, 2016 · 20 comments
Assignees
Labels

Comments

@Vinni0803
Copy link

Vinni0803 commented Apr 20, 2016

I.m using tinyows server for WFS. Here is the configuration file for tinyows server :

 <tinyows check_schema="0" log="/home/vineet/Project/data/logs/wfs.log" log_level="15" online_resource="http://192.168.0.35:19090/WFS" schema_dir="/home/vineet/Project/deps/services-0.1/data/schema">

<pg dbname="abc" host="localhost" password="asdf123" port="19095" user="asdf"/>

<metadata name="My Server" title="My Server - WFS-T Service"/>

<contact email="contact@aaaa.com" name="My Server" site="http://www.aaaa.com/"/>

<layer name="worldboundaries" ns_prefix="tows" ns_uri="http://www.aaaa.com/" retrievable="1" title="worldboundaries" writable="1"/>
</tinyows>

Here is the map file:

 LAYER
CONNECTION "host=localhost port=19095 user=asdf password=asdf123 dbname=abc"
CONNECTIONTYPE POSTGIS
DATA 'geom from "worldboundaries" using unique gid using srid=4326'
EXTENT -180 -90 180.000001907349 83.5702686309814
METADATA
  "wms_srs" "EPSG:4326 CRS:84"
  "wfs_srs" "EPSG:4326"
  "tinyows_retrievable" "1"
  "ows_enable_request"  "*"
  "tinyows_table"   "worldboundaries"
  "wfs_namespace_prefix"    ""
  "tinyows_writable"    "1"
  "wfs_title"   "worldboundaries"
  "wfs_namespace_uri"   "http://www.aaaa.com/"
  "wms_title"   "worldboundaries"
END # METADATA
NAME "worldboundaries"
PROJECTION
  "proj=longlat"
  "datum=WGS84"
  "no_defs"
END # PROJECTION
STATUS OFF
TEMPLATE "tempalte.html"
TILEITEM "location"
TYPE POLYGON
UNITS METERS
END # LAYER

Test case info : http://cite.opengeospatial.org/teamengine/about/wfs/1.1.0/site/ats-wfs11-basic-cc/GetFeature/GET/BasicGetFeature-GET-tc5.html

Log of test case :

Message d149e8734_1:

 FAILURE: WFS does not provide data to use in this test 
 (a feature type with a simple property (string, integer, double, decimal) and data for this property)
 Result: Failed

And I'm sending this request it returns correct result :

http://localhost:19090/WFS?service=WFS&version=1.1.0&request=getfeature&typename=tows:worldboundaries&filter=<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml"><ogc:PropertyIsEqualTo><ogc:PropertyName>tows:area</ogc:PropertyName><ogc:Literal>44</ogc:Literal></ogc:PropertyIsEqualTo></ogc:Filter>

So I don't no why this test case is getting failed. Any help would be greatly appreciated.

@dstenger
Copy link
Contributor

dstenger commented May 2, 2016

Following function returns an empty result "gfExt:findFeatureTypeAndPropertyName".

Can you please provide a test server or an example capabilities document so that we can analyse the problem more in detail?

@dstenger
Copy link
Contributor

Is the issue still urgent? Can you please provide the capabilities document leading to the described failure?

@Vinni0803
Copy link
Author

Sorry for the delay.
Here is getCapabilities document.
getcapabilities.TXT

@lgoltz
Copy link
Contributor

lgoltz commented May 31, 2016

Ok, as we can see in the Capabilities only one feature type tows:worldboundaries is provided by the WFS. Can you provide the DescribeFeatureType response, so we can get further information about the structure of the data? If possible it would be also helpful to take a look at the full GetRecords Response.

@Vinni0803
Copy link
Author

DescribeFeatureType response :

DescribeFeatureType.txt

GetFeature response :
featureType.txt

@lgoltz
Copy link
Contributor

lgoltz commented Jun 9, 2016

Well, your FeatureType is named tows:worldboundaries in the Capabilities, but tows:world_boundaries in the DescribeFeatureType-Response and GetFeature-Response.

The names must match exactly, as the test looks for data based on the notation in the Capabilities. Does the GetFeature request with typename=tows:worldboundarie really return features from world_boundaries?

@Vinni0803
Copy link
Author

Earlier I have this tows:worldboundaries in my setup but now the setup has changed to tows:world_boundaries but both layers are same. I can share shape file, If you want. You can consider tows:world_boundaries same as tows:worldboundaries.

@lgoltz
Copy link
Contributor

lgoltz commented Jun 9, 2016

OK, so the capabilities in on of the previous command are outdated and contains the feature type tows:world_boundaries instead of tows:worldboundaries?

@Vinni0803
Copy link
Author

Yes.

@lgoltz
Copy link
Contributor

lgoltz commented Jun 9, 2016

I cannot reproduce the error with the responses you provided (after changing the feature type name in the capabilities). Lets take a look what the test and the precondition step of the test respectively does:

  1. The capabilities document is parsed for the provided feature types
    => tows:world_boundaries with binding xmlns:tows="http://www.aaaa.com/"
  2. The feature model is parsed from DescribeFeatureType response
    => Request like http://localhost:19090/WFS?service=WFS&version=1.1.0&request=DescribeFeatureType
  3. All Features from the feature type tows:world_boundarie are requested and parsed
    => Request likes http://localhost:19090/WFS?service=WFS&version=1.1.0&request=GetFeature&typename=app:world_boundaries&namespace=xmlns(app=http://www.aaaa.com/)

The failure "WFS does not provide data to use in this test" says, that there are not features (or no features with the expected properties) are available, maybe because the GetFeature-Response is empty.

I've tested locally with a mock service and reduced the number of features returned from GetFeature-Response to 6. It could be that some features cannot be parsed and therefore an exception is thrown. Do you see any exception in the log? You could also provide the log files downloaded from the testsuite session. Furthermore the GetFeature response is not valid xml. The URL of the DescribeFeatureType-Request in the schemaLocation should be escaped (& instead of &), correct would be: http://www.aaaa.com/ http://localhost:19090/WFS?service=WFS&amp;version=1.1.0&amp;request=DescribeFeatureType&amp;Typename=tows:world_boundaries

@Vinni0803
Copy link
Author

Here is the log :

log

test

@lgoltz
Copy link
Contributor

lgoltz commented Jun 20, 2016

Please download the log files from the session and attach them here.

@bermud
Copy link
Contributor

bermud commented Nov 4, 2016

@Vinni0803, can you please provide the log files or an example test server for us to further inspect this issue. Thank you!

@dstenger
Copy link
Contributor

@Vinni0803, is this issue still occurring? If it is the case, can you please provide more information? Otherwise, the issue can be closed.

@bermud bermud removed the waiting label Jun 6, 2017
@jeanmichelfischer
Copy link

May I ask what the solution for the problem was? Because I ran into the same situation with this test failing.

@dstenger
Copy link
Contributor

dstenger commented Aug 3, 2017

We did not do any fix as we could not reproduce the error.
@Vinni0803 , Can you please provide more details, how you solved the issue?

Otherwise, @jeanmichelfischer , can you please provide a test service we can use to reproduce the error? Also, the log output and error message could be helpful for us.

@jeanmichelfischer
Copy link

@dstenger here is a service you can use: https://services.interactive-instruments.de/ogc-reference/simple/wfs?request=getcapabilities&service=wfs (for 2 or 3 weeks it will be the same content, after that I would like to enable WFS 2.0.0 on it again.)

(It is called simple, because there is no chance to pass the tests with more complex application schemas)

The Log is:
Test wfs:wfs-1.1.0-Basic-GetFeature-tc5 type Mandatory default result Passed (s0059/d155e38807_1/d155e636_1/d155e28849_1/d155e8002_1)

Assertion: XPath 1.0 shall be used to address parts of an XML representation using ogc:PropertyName. Support for
the AbbreviatedRelativeLocationPath construct is required. A valid filter expression must conform to the content
model declared for the ogc:Filter element.

Message d155e8905_1:
FAILURE: WFS does not provide data to use in this test
(a feature type with a simple property (string, integer, double, decimal) and data for this property)

Result: Failed

@dstenger
Copy link
Contributor

dstenger commented Aug 4, 2017

Thank you for providing further information.

The log of TEAM Engine itself does not provide any additional information which are not already mentioned in this issue.

However, the logging of the Java code provides following information:

[Warning] :3:123: schema_reference.4: Failed to read schema document 'http://xs-ogc-ref/cite/schema/ogc/gml/3.1.1/base/gml.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
[Error] :6:112: src-resolve: Cannot resolve the name 'gmlx:_Feature' to a(n) 'element declaration' component.
[Error] :10:11: cos-ct-extends.1.4.3.2.2.1.a: The content type of a derived type and that of its base must both be mixed or both be element-only. Type 'CityType' is element only, but its base type is not.
[Error] :4:80: e-props-correct.4: The {type definition} of element 'City' is not validly derived from the {type definition} of the substitutionHead 'ci:NamedGeoObject', or the {substitution group exclusions} property of 'ci:NamedGeoObject' does not allow this derivation.
[Error] :26:11: cos-ct-extends.1.4.3.2.2.1.a: The content type of a derived type and that of its base must both be mixed or both be element-only. Type 'RiverType' is element only, but its base type is not.
[Error] :5:82: e-props-correct.4: The {type definition} of element 'River' is not validly derived from the {type definition} of the substitutionHead 'ci:NamedGeoObject', or the {substitution group exclusions} property of 'ci:NamedGeoObject' does not allow this derivation.

The problems occur from the DescribeFeatureType and GetFeature output which cannot be parsed correctly.

When trying to validate the GetFeature output of "River" against WFS 1.1.0 and DescribeFeatureType schema, following error occurs:

element River: Schemas validity error : Element '{http://www.interactive-instruments.de/namespaces/demo/cities/4.1/cities}River': This element is not expected. Expected is one of ( {http://www.opengis.net/gml}_Feature, {http://www.opengis.net/gml}FeatureCollection, {http://www.opengis.net/gml}MultiPointCoverage, {http://www.opengis.net/gml}MultiCurveCoverage, {http://www.opengis.net/gml}MultiSurfaceCoverage, {http://www.opengis.net/gml}MultiSolidCoverage, {http://www.opengis.net/gml}GridCoverage, {http://www.opengis.net/gml}RectifiedGridCoverage, {http://www.opengis.net/gml}Observation, {http://www.opengis.net/gml}DirectedObservation ).

Also, several schema locations are not reachable.

@jeanmichelfischer
Copy link

Thank you for your answer. The Java-Log says it all, but is unfortunately not visible for the testers.

I'll investigate this after my holidays (end of August).

@jeanmichelfischer
Copy link

@dstenger Thanks again for your investigation. After correcting the unaccessible schema file the error was gone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants