Hello,

i asked this question: https://gis.stackexchange.com/questions/344996/wfs-and-geoserver-what-exactly-is-fes-and-what-is-the-correct-syntax/345024#345024

There I get the hint, that I should open a ticket here. This is my question:

I created a Stored Query with this script


        <script language="JavaScript">
            console.log("CreateStoredQuery");
            function CreateStoredQuery() {
                var data = '<wfs:CreateStoredQuery service="WFS" 
version="2.0.0"'
                    +' xmlns="http://www.opengis.net/wfs/2.0";'
                    + ' xmlns:wfs="http://www.opengis.net/wfs/2.0";'
                    + ' xmlns:fes="http://www.opengis.org/fes/2.0";'
                    + ' xmlns:ows="http://www.opengis.net/ows/1.1";'
                    + ' xmlns:xsd="http://www.w3.org/2001/XMLSchema";>'
                    + '<wfs:StoredQueryDefinition id="test">'
                    + '<wfs:Parameter name="gemarkungsname" type="xsd:string"/>'
                    + '<wfs:Parameter name="fln" type="xsd:string"/>'
                    + '<wfs:Parameter name="fsn_zae" type="xsd:string"/>'
                    + '<wfs:Parameter name="fsn_nen" type="xsd:string"/>'
                    + '<wfs:QueryExpressionText returnFeatureTypes="KRE_ALKIS:sg_flurstueck_f" 
language="urn:ogc:def:queryLanguage:OGC-WFS::WFS_QueryExpression" isPrivate="false">'
                    + '<wfs:Query typeNames="KRE_ALKIS:sg_flurstueck_f">'
                    + '<fes:Filter>'
                    + '<fes:And>'

                    + '<fes:PropertyIsEqualTo>'
                    + 
'<fes:PropertyName><fes:ValueReference>gemarkungsname</fes:ValueReference></fes:PropertyName>'
                    + '<fes:Literal>${gemarkungsname}</fes:Literal>'
                    + '</fes:PropertyIsEqualTo>'

                    + '<fes:PropertyIsEqualTo>'
                    + 
'<fes:PropertyName><fes:ValueReference>fln</fes:ValueReference></fes:PropertyName>'
                    + '<fes:Literal>${fln}</fes:Literal>'
                    + '</fes:PropertyIsEqualTo>'

                    + '<fes:PropertyIsEqualTo>'
                    + 
'<fes:PropertyName><fes:ValueReference>fsn_zae</fes:ValueReference></fes:PropertyName>'
                    + '<fes:Literal>${fsn_zae}</fes:Literal>'
                    + '</fes:PropertyIsEqualTo>'

                    + '<fes:PropertyIsEqualTo>'
                    + 
'<fes:PropertyName><fes:ValueReference>fsn_nen</fes:ValueReference></fes:PropertyName>'
                    + '<fes:Literal>${fsn_nen}</fes:Literal>'
                    + '</fes:PropertyIsEqualTo>'

                    + '</fes:And>'
                    + '</fes:Filter>'

                    + '</wfs:Query>'
                    + '</wfs:QueryExpressionText>'
                    + '</wfs:StoredQueryDefinition>'
                    + '</wfs:CreateStoredQuery>';
                console.log(data);
                var CreateStoredQueryRequest = $.ajax({type: 'POST',
                    url: 'http://172.16.206.128:8080/geoserver/KRE_ALKIS/wfs?',
                    data: data,
                    contentType: "text/xml",
                    dataType: "text",
                    error: function (xhr, ajaxOptions, thrownError) {
                        console.log(xhr.status + " - CreateStoredQuery");
                        console.log(thrownError + " - CreateStoredQuery");
                    }
                });
                CreateStoredQueryRequest.done(function (msg) {
                    console.log(msg);
                });

                CreateStoredQueryRequest.fail(function (jqXHR, textStatus) {
                    console.log("Request failed: " + textStatus);
                });
            }
        </script>

On GeoServer Stored Query is saved like this:


|<?xml version="1.0"encoding="UTF-8"?><wfs:StoredQueryDescriptionxmlns:xs="http://www.w3.org/2001/XMLSchema"xmlns:fes="http://www.opengis.net/fes/2.0"xmlns:wfs="http://www.opengis.net/wfs/2.0"xmlns:gml="http://www.opengis.net/gml/3.2"xmlns:ows="http://www.opengis.net/ows/1.1"xmlns:xlink="http://www.w3.org/1999/xlink"id="test";><wfs:Parametername="gemarkungsname"type="xs:string"/><wfs:QueryExpressionTextisPrivate="false"language="urn:ogc:def:queryLanguage:OGC-WFS::WFS_QueryExpression"returnFeatureTypes="KRE_ALKIS:sg_flurstueck_f"><wfs:Querywfs:typeNames="KRE_ALKIS:sg_flurstueck_f"><null:Filterxmlns:null="http://www.opengis.org/fes/2.0";><null:PropertyIsEqualTo>${gemarkungsname}<null:ValueReference>gemarkungsname</fes:ValueReference></fes:PropertyIsEqualTo></fes:Filter></wfs:Query></wfs:QueryExpressionText></wfs:StoredQueryDescription> |I wonder, why the|null| is saved instead of|fes| in my|Stored Query| in the data directory? I can edit the XML file. I can change here|null| to|fes| and everything works fine.
||

_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to