[OpenLayers-Dev] WFS-T demo failing?

Andrea Aime aaime at openplans.org
Tue May 29 11:40:40 EDT 2007


Christopher Schmidt ha scritto:
> The OpenLayers Development Team is proud to announce the final release of
> OpenLayers 2.4!

I've just tried again the OL version we ship in Geoserver to 2.4,
and noticed it does not work.

A sample insert request coming from that demo is:
<wfs:Transaction 
xmlns:wfs="http://www.opengis.net/wfs"><wfs:Insert><feature:tasmania_roads 
xmlns:feature="http://www.openplans.org/topp"><feature:the_geom><gml:MultiLineString 
xmlns:gml="http://www.opengis.net/gml"><gml:lineStringMember><gml:LineString><gml:coordinates 
decimal="." cs="," ts=" ">145.420508203125,-41.5523681640625 
146.123633203125,-41.4754638671875 146.431250390625,-41.7061767578125 
</gml:coordinates></gml:LineString></gml:lineStringMember></gml:MultiLineString></feature:the_geom></feature:tasmania_roads></wfs:Insert></wfs:Transaction>

This request is non compliant, since
it does not include nor service="WFS" attribute in <Transaction>, nor
the version one.
I know, it may seem obvious, but the WFS Transaction schema is clear,
the service attribute is mandatory:

<xsd:complexType name="TransactionType">
       <xsd:sequence>
          <xsd:element ref="wfs:LockId" minOccurs="0">
          </xsd:element>
          <xsd:choice minOccurs="0" maxOccurs="unbounded">
             <xsd:element ref="wfs:Insert"/>
             <xsd:element ref="wfs:Update"/>
             <xsd:element ref="wfs:Delete"/>
             <xsd:element ref="wfs:Native"/>
          </xsd:choice>
       </xsd:sequence>
       <xsd:attribute name="version"
                      type="xsd:string" use="required" fixed="1.0.0"/>
       <xsd:attribute name="service"
                      type="xsd:string" use="required" fixed="WFS"/>
       <xsd:attribute name="handle"
                      type="xsd:string" use="optional"/>
       <xsd:attribute name="releaseAction"
                      type="wfs:AllSomeType" use="optional">
       </xsd:attribute>
    </xsd:complexType>

Is there any way I can modify the sample to make it generate
a correct WFS-T request? I tried adding service and version attributes
to the WFS layer definiton, but to little effect (and since GetFeature
works, I must assume GetFeature does in fact have the attributes right).
Now, this issue was there in the 2.4-rc3 I tried originally, but 
unfortunately due to a series of unfortunate events I did not report it 
right away, and then forgot to do so.
So, sorry for reporting this late...

Cheers
Andrea



More information about the Dev mailing list