[OpenLayers-Users] WFS-T Problem

Sunny Teo spatialsunny at gmail.com
Mon Apr 4 10:44:17 EDT 2011


Hi All,


I am trying to build geospatial application using OpenLayers and
Geoserver 2.1-RC3. Implementing WFS part I've faced with the following
problem:

OpenLayers builds such request:

<wfs:GetFeature
 service="WFS"
 version="1.1.0"
 xsi:schemaLocation="http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.1.0/wfs.xsd">
 <wfs:Query typeName="foo:Bar" srsName="EPSG:96995">
   <ogc:Filter>
     <ogc:BBOX>
       <ogc:PropertyName>GEOM</ogc:PropertyName>
       <gml:Envelope srsName="EPSG:96995">
         <gml:lowerCorner>-49003.957598278
-32778.430510464</gml:lowerCorner>
         <gml:upperCorner>49003.957598278 25546.430510464</gml:upperCorner>
       </gml:Envelope>
     </ogc:BBOX>
   </ogc:Filter>
 </wfs:Query>
</wfs:GetFeature>

In response on this request my Geoserver response with such exception:

<ows:ExceptionReport version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/ows
http://services.local:80/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd<http://services.local/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd>
">
 <ows:Exception exceptionCode="NoApplicableCode">
   <ows:ExceptionText>
     org.xmlpull.v1.XmlPullParserException: could not determine
namespace bound to element prefix wfs (position: START_DOCUMENT seen
...www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.1.0/wfs.xsd&quot;&gt;... @1:139)
     could not determine namespace bound to element prefix wfs
(position: START_DOCUMENT seen ...www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.1.0/wfs.xsd&quot;&gt;... @1:139)
   </ows:ExceptionText>
 </ows:Exception>
</ows:ExceptionReport>

I have reproduced this request manually. If I add the following
attributes to the wfs:GetFeature element

 xmlns:wfs="http://www.opengis.net/wfs"
 xmlns:ogc="http://www.opengis.net/ogc"
 xmlns:gml="http://www.opengis.net/gml"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

Server produces correct answer (spatial data). I get these attributes
from Geoserver demo request.

Looks like server performs some kind of XML validation and decides
that request is not well formed.

I've tried to disable "Strict CITE compliance". Tried to test with
both options for "Encode canonical WFS schema location" but no
positive result.

I've compared this OpenLayers request with requests prepared by
OpenLayer on the few public websites - the same situation. There is no
bindings for
wfs, ogc, gml, xsi prefixes.

So, I assume there should be approach to disable this validation or to
get Geoserver parser to know about such common prefixes.

Maybe I have missed something. Help me please.


Thanks,

Sunny
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20110404/d27340ad/attachment-0001.html


More information about the Users mailing list