Return to Issues Table 

InsertResults/UpdateResults/ReplaceResults

Issue ID#:
944
Category:
WFS 2.0
Type:
Issue
Status:
Fixed - Requires Review
Priority:
Normal
Entered By:
Fischer, Jean-Michel
Created On:
2014-03-31 08:17:42
Updated By:
Martell, Richard
Last Update:
2014-04-14 16:26:09
Assigned To:
Martell, Richard

Original Issue Details:

The InsertResults/UpdateResults/ReplaceResults elements are optional in the spec:


15.3.2 TransactionResponse element
The root element of the response to a transaction request is called wfs:TransactionResponse.
The following XML Schema fragment declares the wfs:TransactionResponse element:
<xsd:element name="TransactionResponse"
type="wfs:TransactionResponseType"/>
<xsd:complexType name="TransactionResponseType">
<xsd:sequence>
<xsd:element name="TransactionSummary"
type="wfs:TransactionSummaryType"/>
<xsd:element name="InsertResults"
type="wfs:ActionResultsType" minOccurs="0"/>
<xsd:element name="UpdateResults"
type="wfs:ActionResultsType" minOccurs="0"/>
<xsd:element name="ReplaceResults"
type="wfs:ActionResultsType" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="version" type="xsd:string" use="required" fixed="2.0.0"/>
</xsd:complexType>


15.3.4 InsertResults element


"If a transaction request contains insert, update and/or replace actions then the wfs:InsertResults,
wfs:UpdateResults and/or wfs:ReplaceResults elements shall be specified in the transaction response."


 


The tests fail if these elements are not present:


java.lang.AssertionError: Unexpected result evaluating XPath expression with context node #document: //wfs:TransactionResponse/wfs:UpdateResults expected [true] but found [false]


java.lang.AssertionError: Unexpected result evaluating XPath expression with context node #document: //wfs:TransactionResponse/wfs:ReplaceResults expected [true] but found [false]  


Tests with this asertion (maybe more?):


updateGMLName


replaceFeature


Status: new
Assigned To:

As well in the test updateSimplePropertyValue the optinal wfs:UpdateResults element is expected:


java.lang.AssertionError: Unexpected fes:ResourceId/@rid value in wfs:UpdateResults expected [City.7] but found []  


 


 

Hours Worked: 0.00
Entered By: Fischer, Jean-Michel - 2014-10-23 11:54:13
Status: new
Assigned To:

Update:


UpdateResults and ReplaceResults are only mandatory if the server supports versioning.


15.3.6 ReplaceResults element
If a transaction request contains replace actions and the server supports versioning, then the
wfs:ReplaceResults element shall be specified in the transaction response to report which features have been
replaced and what their new identifiers are.


15.3.5 UpdateResults element
If a transaction request contains update actions and the server supports versioning, then the
wfs:UpdateResults element shall be specified in the transaction response to report which features have been
changes and what their new identifiers are.


so, as we don't support versioning these elements are optional.

Hours Worked: 0.00
Entered By: Fischer, Jean-Michel - 2014-10-23 11:54:13
Status: new
Assigned To: Martell, Richard

Hours Worked: 0.00
Entered By: Bermudez, Luis - 2014-10-23 11:54:13
18
Status: new
Assigned To: Martell, Richard

These elements are optional in wfs:TransactionResponseType because their occurrence depends on the content of the wfs:TransactionSummary element. For example, recall this constraint shown in Fig. 31:


transactionSummary.totalInserted>0 implies insertResults->notEmpty()}

Furthermore, the constraint appearing in 15.3.4 is unambiguous and applies whether the WFS implements versioning or not:


"If a transaction request contains insert, update and/or replace actions then the wfs:InsertResults, wfs:UpdateResults and/or wfs:ReplaceResults elements shall be specified in the transaction response."

Perhaps the SWG can clarify this statement. Is it an error? Clauses 15.3.5, 15.3.6 do mention versioning.

Hours Worked: 0.00
Entered By: Martell, Richard - 2014-10-23 11:54:13
18
Status: new
Assigned To: Martell, Richard

The preliminary report from the SWG (P. Vretanos) is that this is indeed an error.


This is an error for sure since, as you point out, clause 15.3.4 talks about the insert action and the expected response while subsequent sections (15.3.5 & 15.3.6) talk about update and replace. So, this sentence from 15.3.4: "If a transaction request contains insert, update and/or replace actions then the wfs:InsertResults, wfs:UpdateResults and/or wfs:ReplaceResults elements shall be specified in the transaction response." should be changed to: "If a transaction request contains insert actions then the wfs:InsertResults, element shall be specified in the transaction response."
Hours Worked: 0.00
Entered By: Martell, Richard - 2014-10-23 11:54:13
Status: Fixed - Requires Review
Assigned To: Martell, Richard

Fixed for r15. The UpdateResults and ReplaceResults elements are expected in the response entity only if feature versioning is supported. So these will be ignored since versioning is not currently tested.

Hours Worked: 0.00
Entered By: Martell, Richard - 2014-04-14 16:26:09