Open sptillma opened 5 years ago
Thank you for reporting.
@keshav-nangare Can you please do further investigation?
I have tried to reproduce this issue using the above service but all three tests GetFeatureById
are failed with a validation error.
Request 2ebc719/d123e1051_1:
Method: GET
URL: http://ogc.intergraph.com:80/erdas-apollo/vector/WFSTCITE?&service=WFS&version=1.1.0&request=GetFeature&featureid=cite.gmlsf0-f01
Response from parser p:XMLValidatingParser.GMLSF1:
Messages from parser p:XMLValidatingParser.GMLSF1:
Validation error:
cvc-id.2: There are multiple occurrences of ID value 'cite.gmlsf0-f01'.
Validation error:
cvc-attribute.3: The value 'cite.gmlsf0-f01' of attribute 'gml:id' on element 'sf:PrimitiveGeoFeature' is not valid with respect to its type, 'ID'.
2 validation errors detected.
Message d123e1082_1:
FAILURE: Expected valid wfs:FeatureCollection in response.
Result: Failed
@sptillma The same GML ID exists multiple times in a GML document. Thus, the response of the service is not valid GML.
I had already run the Insert transaction to place the three new feature in the service, but it appears someone ran the insert again and that is why it contains duplicate features. I have reset the service to the point that none of the three feature are in the GML file. That way the test can be run from the beginning. Again, I will note that the insert works and the first two GetFeature requests work. I am trying to understand why the third one does not. So run the insert again to place the three features in and then you can test any of the GetFeature requests.
Thank you!
@keshav-nangare Can you please repeat the test?
@sptillma
I have retested the test suite with service and able to reproduce the reported behavior. Following is the result of third test GetFeaturebyId
:
Request 2ebc719/d123e1051_1:
Method: GET
URL: http://ogc.intergraph.com:80/erdas-apollo/vector/WFSTCITE?&service=WFS&version=1.1.0&request=GetFeature&featureid=cite.gmlsf0-f03
Response from parser p:XMLValidatingParser.GMLSF1:
Messages from parser p:XMLValidatingParser.GMLSF1:
Validation error:
cvc-complex-type.2.4.a: Invalid content was found starting with element 'sf:str4Property'. One of '{"http://www.opengis.net/gml":name, "http://www.opengis.net/gml":boundedBy, "http://cite.opengeospatial.org/gmlsf":attribut.Géométrie}' is expected.
1 validation error detected.
Message d123e1082_1:
FAILURE: Expected valid wfs:FeatureCollection in response.
Result: Failed
If you see the validation error message, the schema is expecting the element with sf:strProperty
instead of sf:str4Property
, maybe i.e. the reason of test failure.
Can you please check for the same?
@keshav-nangare The schema expects sf:str4Property
. So, this element is correct.
@sptillma I also executed the insert statement manually to make reproduction easier. However, I executed the delete statement afterwards.
The service returns the following:
<?xml version='1.0' encoding='utf-8' ?>
<ogcwfs:FeatureCollection xmlns="http://cite.opengeospatial.org/gmlsf" xmlns:sf="http://cite.opengeospatial.org/gmlsf" xmlns:gml="http://www.opengis.net/gml" xmlns:ogcwfs="http://www.opengis.net/wfs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.opengis.net/wfs http://ogc.intergraph.com:80/erdas-apollo/vector/WFSTCITE?REQUEST=DescribeFeatureType&REQUEST=DescribeAllFeatureType&SERVICE=WFS">
<gml:featureMember>
<sf:EntitéGénérique gml:id="cite.gmlsf0-f03">
<gml:description>
Suspendisse in odio sit amet lorem dictum semper. Integer ultrices purus
vel orci. Donec felis massa, suscipit a, lacinia nec, rhoncus vulputate,
tellus.
</gml:description>
<gml:name codeSpace="http://cite.opengeospatial.org/gmlsf">cite.gmlsf0-f03</gml:name>
<sf:str4Property>ghij</sf:str4Property>
</sf:EntitéGénérique>
</gml:featureMember>
</ogcwfs:FeatureCollection>
The schema expects the following (path: ets-wfs11/src/main/resources/xsd/ogc/cite/cite-gmlsf0.xsd
):
<xsd:element name="EntitéGénérique" type="sf:EntitéGénériqueType"
substitutionGroup="gml:_Feature">
<xsd:annotation>
<xsd:documentation xml:lang="en">
Simple feature with a generic geometry property that includes characters
outside of the range U+0000..U+007F (Basic Latin). Acceptable geometry
representations include any of the following: gml:Point, gml:LineString,
gml:Curve, gml:Polygon, gml:Surface, gml:MultiPoint, gml:MultiCurve, and
gml:MultiSurface.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:complexType name="EntitéGénériqueType">
<xsd:complexContent>
<xsd:extension base="gml:AbstractFeatureType">
<xsd:sequence>
<xsd:element name="attribut.Géométrie" type="gml:GeometryPropertyType" />
<xsd:element name="boolProperty" type="xsd:boolean" />
<xsd:element name="str4Property">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="4"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="featureRef" type="xsd:string" minOccurs="0" />
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
I realized that several properties added by the insert request are not provided by the GetFeature request. However, this should not cause an erroneous schema validation.
When comparing the result of your service and the schema, I do not see any incompatibilities.
So, we have to do further investigation why error documented in https://github.com/opengeospatial/ets-wfs11/issues/89#issuecomment-544851710 occurs.
@keshav-nangare Can you please check if the error also occurs on a local build (master branch)?
@dstenger
I have tested the on the local environment with the master branch of test suite and teamengine, still getting the same error.
For now, we can consider this as a bug. However, we should further do a deeper analysis.
I realized that several properties added by the insert request are not provided by the GetFeature request. However, this should not cause an erroneous schema validation.
When comparing the result of your service and the schema, I do not see any incompatibilities.
attribut.Géométrie and boolProperty are mandatory, they are missing in the response.
@lgoltz I agree to https://github.com/opengeospatial/ets-wfs11/issues/89#issuecomment-571446024. @sptillma Can you please recheck your service?
I'm sorry it has taken me this long to see this, but we are trying to submit our product again after a recent release. Unfortunately, I am still seeing the same problem.
@sptillma Did you consider following response? https://github.com/opengeospatial/ets-wfs11/issues/89#issuecomment-571446024
I need some information determining if this is a test problem or a software problem. The test does an insert of three features (that is successful). It then validates the response schema (successful). Then the test does three GetFeature request - one for each id that was inserted. The first two are successful, but the third fails with a validation parsing error. However, if I put the same request in the browser, it appears to return a valid response. The request that is failing is: http://ogc.intergraph.com:80/erdas-apollo/vector/WFSTCITE?&service=WFS&version=1.1.0&request=GetFeature&featureid=cite.gmlsf0-f03
Feel free to test with this as the service now contains the three features added by the insert.