opengeospatial / ets-wfs11

Executable Test Suite for WFS 1.1
Other
1 stars 5 forks source link

wfs-1.1.0-Transaction-tc1.1- failure occurs on third GetFeaturebyId request in test, but not in browser #89

Open sptillma opened 5 years ago

sptillma commented 5 years ago

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.

dstenger commented 5 years ago

Thank you for reporting.

@keshav-nangare Can you please do further investigation?

keshavnangare commented 5 years ago

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

image

dstenger commented 5 years ago

@sptillma The same GML ID exists multiple times in a GML document. Thus, the response of the service is not valid GML.

sptillma commented 5 years ago

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.

dstenger commented 5 years ago

Thank you!

@keshav-nangare Can you please repeat the test?

keshavnangare commented 5 years ago

@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?

dstenger commented 5 years ago

@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:

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.

dstenger commented 5 years ago

@keshav-nangare Can you please check if the error also occurs on a local build (master branch)?

keshavnangare commented 5 years ago

@dstenger

I have tested the on the local environment with the master branch of test suite and teamengine, still getting the same error.

dstenger commented 5 years ago

For now, we can consider this as a bug. However, we should further do a deeper analysis.

lgoltz commented 4 years ago

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.

dstenger commented 4 years ago

@lgoltz I agree to https://github.com/opengeospatial/ets-wfs11/issues/89#issuecomment-571446024. @sptillma Can you please recheck your service?

sptillma commented 2 years ago

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.

dstenger commented 2 years ago

@sptillma Did you consider following response? https://github.com/opengeospatial/ets-wfs11/issues/89#issuecomment-571446024