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

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

Open
sptillma opened this issue Oct 17, 2019 · 14 comments
Assignees
Labels

Comments

@sptillma
Copy link

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
Copy link
Contributor

Thank you for reporting.

@keshav-nangare Can you please do further investigation?

@keshavnangare
Copy link

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
Copy link
Contributor

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

@sptillma
Copy link
Author

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
Copy link
Contributor

Thank you!

@keshav-nangare Can you please repeat the test?

@keshavnangare
Copy link

keshavnangare commented Oct 22, 2019

@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
Copy link
Contributor

dstenger commented Oct 22, 2019

@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&amp;REQUEST=DescribeAllFeatureType&amp;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 #89 (comment) occurs.

@dstenger
Copy link
Contributor

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

@dstenger dstenger removed the question label Oct 23, 2019
@keshavnangare
Copy link

@dstenger

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

@dstenger
Copy link
Contributor

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

@dstenger dstenger added the bug label Oct 25, 2019
@dstenger dstenger assigned dstenger and lgoltz and unassigned keshavnangare and dstenger Nov 6, 2019
@lgoltz
Copy link
Contributor

lgoltz commented Jan 7, 2020

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
Copy link
Contributor

dstenger commented Jan 7, 2020

@lgoltz I agree to #89 (comment).
@sptillma Can you please recheck your service?

@sptillma
Copy link
Author

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
Copy link
Contributor

@sptillma Did you consider following response? #89 (comment)

@dstenger dstenger added this to CITE Aug 1, 2024
@dstenger dstenger moved this to Waiting in CITE Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Waiting
Development

No branches or pull requests

4 participants