[Geoserver-devel] [jira] Created: (GEOS-1558) Update fails with strange error message if typename namespace is not declared

Update fails with strange error message if typename namespace is not declared
-----------------------------------------------------------------------------

                 Key: GEOS-1558
                 URL: http://jira.codehaus.org/browse/GEOS-1558
             Project: GeoServer
          Issue Type: Bug
          Components: WFS
    Affects Versions: 1.6.0-RC1
            Reporter: Andrea Aime
            Assignee: Justin Deoliveira
             Fix For: 1.6.0-RC2

The following request fails:

{code:xml}
<wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs&quot; version="1.0.0" service="WFSV" handle="restricted tweak">
    <wfs:Update typeName="opengeo:restricted">
        <wfs:Property>
            <wfs:Name>the_geom</wfs:Name>
            <wfs:Value>
                <gml:MultiPolygon xmlns:gml="http://www.opengis.net/gml&quot; srsName="EPSG:900913">
                    <gml:polygonMember>
                        <gml:Polygon>
                            <gml:outerBoundaryIs>
                                <gml:LinearRing>
                                    <gml:coordinates decimal="." cs="," ts=" ">-11551261.8718648,5528245.05253577 -11550279.549573444,5528619.500663255 -11549297.22728209,5528229.57850803 -11549303.35588104,5526689.80472917 -11551263.67953109,5526688.08277123 -11551261.8718648,5528245.05253577</gml:coordinates>
                                </gml:LinearRing>
                            </gml:outerBoundaryIs>
                        </gml:Polygon>
                    </gml:polygonMember>
                </gml:MultiPolygon>
            </wfs:Value>
        </wfs:Property>
        <wfs:Property>
            <wfs:Name>cat</wfs:Name>
            <wfs:Value>4</wfs:Value>
        </wfs:Property>
        <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc&quot;&gt;
            <ogc:FeatureId fid="restricted.3"/>
        </ogc:Filter>
    </wfs:Update>
</wfs:Transaction>
{code}

will fail stating that 'restricted' is not available. Yet the follow works:

{code:xml}
<wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs&quot; xmlns:opengeo="http://open-geo.com" version="1.0.0" service="WFSV" handle="restricted tweak">
    <wfs:Update typeName="opengeo:restricted">
        <wfs:Property>
            <wfs:Name>the_geom</wfs:Name>
            <wfs:Value>
                <gml:MultiPolygon xmlns:gml="http://www.opengis.net/gml&quot; srsName="EPSG:900913">
                    <gml:polygonMember>
                        <gml:Polygon>
                            <gml:outerBoundaryIs>
                                <gml:LinearRing>
                                    <gml:coordinates decimal="." cs="," ts=" ">-11551261.8718648,5528245.05253577 -11550279.549573444,5528619.500663255 -11549297.22728209,5528229.57850803 -11549303.35588104,5526689.80472917 -11551263.67953109,5526688.08277123 -11551261.8718648,5528245.05253577</gml:coordinates>
                                </gml:LinearRing>
                            </gml:outerBoundaryIs>
                        </gml:Polygon>
                    </gml:polygonMember>
                </gml:MultiPolygon>
            </wfs:Value>
        </wfs:Property>
        <wfs:Property>
            <wfs:Name>cat</wfs:Name>
            <wfs:Value>4</wfs:Value>
        </wfs:Property>
        <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc&quot;&gt;
            <ogc:FeatureId fid="restricted.3"/>
        </ogc:Filter>
    </wfs:Update>
</wfs:Transaction>
{code}

I thought we did inject the feature type namespace declarations before parsing the xml, but apparently
we did not. Sample requests are working only because they are hitting the default namespace (topp),
whilst opengeo is not the default one in the above example.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira