<span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">Hi All,<br><br><br>I am trying to build geospatial application using OpenLayers and<br>Geoserver 2.1-RC3. Implementing WFS part I've faced with the following<br>
problem:<br><br>OpenLayers builds such request:<br><br><wfs:GetFeature<br> service="WFS"<br> version="1.1.0"<br> xsi:schemaLocation="<a href="http://www.opengis.net/wfs" target="_blank" style="color: rgb(0, 0, 204); ">http://www.opengis.net/wfs</a><br>
<a href="http://schemas.opengis.net/wfs/1.1.0/wfs.xsd" target="_blank" style="color: rgb(0, 0, 204); ">http://schemas.opengis.net/wfs/1.1.0/wfs.xsd</a>"><br> <wfs:Query typeName="foo:Bar" srsName="EPSG:96995"><br>
<ogc:Filter><br> <ogc:BBOX><br> <ogc:PropertyName>GEOM</ogc:PropertyName><br> <gml:Envelope srsName="EPSG:96995"><br> <gml:lowerCorner>-49003.957598278 -32778.430510464</gml:lowerCorner><br>
<gml:upperCorner>49003.957598278 25546.430510464</gml:upperCorner><br> </gml:Envelope><br> </ogc:BBOX><br> </ogc:Filter><br> </wfs:Query><br></wfs:GetFeature><br>
<br>In response on this request my Geoserver response with such exception:<br><br><ows:ExceptionReport version="1.0.0"<br>xsi:schemaLocation="<a href="http://www.opengis.net/ows" target="_blank" style="color: rgb(0, 0, 204); ">http://www.opengis.net/ows</a><br>
<a href="http://services.local/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd" target="_blank" style="color: rgb(0, 0, 204); ">http://services.local:80/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd</a>"><br>
<ows:Exception exceptionCode="NoApplicableCode"><br> <ows:ExceptionText><br> org.xmlpull.v1.XmlPullParserException: could not determine<br>namespace bound to element prefix wfs (position: START_DOCUMENT seen<br>
...<a href="http://www.opengis.net/wfs" target="_blank" style="color: rgb(0, 0, 204); ">www.opengis.net/wfs</a><br><a href="http://schemas.opengis.net/wfs/1.1.0/wfs.xsd&quot;&gt;." target="_blank" style="color: rgb(0, 0, 204); ">http://schemas.opengis.net/wfs/1.1.0/wfs.xsd&quot;&gt;.</a>.. @1:139)<br>
could not determine namespace bound to element prefix wfs<br>(position: START_DOCUMENT seen ...<a href="http://www.opengis.net/wfs" target="_blank" style="color: rgb(0, 0, 204); ">www.opengis.net/wfs</a><br><a href="http://schemas.opengis.net/wfs/1.1.0/wfs.xsd&quot;&gt;." target="_blank" style="color: rgb(0, 0, 204); ">http://schemas.opengis.net/wfs/1.1.0/wfs.xsd&quot;&gt;.</a>.. @1:139)<br>
</ows:ExceptionText><br> </ows:Exception><br></ows:ExceptionReport><br><br>I have reproduced this request manually. If I add the following<br>attributes to the wfs:GetFeature element<br><br> xmlns:wfs="<a href="http://www.opengis.net/wfs" target="_blank" style="color: rgb(0, 0, 204); ">http://www.opengis.net/wfs</a>"<br>
xmlns:ogc="<a href="http://www.opengis.net/ogc" target="_blank" style="color: rgb(0, 0, 204); ">http://www.opengis.net/ogc</a>"<br> xmlns:gml="<a href="http://www.opengis.net/gml" target="_blank" style="color: rgb(0, 0, 204); ">http://www.opengis.net/gml</a>"<br>
xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance" target="_blank" style="color: rgb(0, 0, 204); ">http://www.w3.org/2001/XMLSchema-instance</a>"<br><br>Server produces correct answer (spatial data). I get these attributes<br>
from Geoserver demo request.<br><br>Looks like server performs some kind of XML validation and decides<br>that request is not well formed.<br><br>I've tried to disable "Strict CITE compliance". Tried to test with<br>
both options for "Encode canonical WFS schema location" but no<br>positive result.<br><br>I've compared this OpenLayers request with requests prepared by<br>OpenLayer on the few public websites - the same situation. There is no<br>
bindings for<br>wfs, ogc, gml, xsi prefixes.<br><br>So, I assume there should be approach to disable this validation or to<br>get Geoserver parser to know about such common prefixes.<br><br>Maybe I have missed something. Help me please.<br>
<br><br>Thanks,<br><br>Sunny</span>