Whether strict parsing is enabled or not the parser will choke on anything that uses a namespace prefix on the root element that has not been declared. This is because we preparse body content to figure out what the request is in order to forward it on to the correct service. The way we do the parsing is to make it namespace aware which is why we get the exception.
I see two issues. The first is that OL is creating an invalid request plain and simple. The second is that geoserver could potentially turn off namespace aware pre parsing if the strict flag is not set which should make it lenient in this case. Feel free to open an issue report in the bug tracker for this. -Justin On Sat, Apr 2, 2011 at 8:49 AM, Serge Markin <[email protected]>wrote: > 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 > "> > <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">... @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">... @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, > > Serge > > > ------------------------------------------------------------------------------ > Create and publish websites with WebMatrix > Use the most popular FREE web apps or write code yourself; > WebMatrix provides all the features you need to develop and > publish your website. http://p.sf.net/sfu/ms-webmatrix-sf > _______________________________________________ > Geoserver-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/geoserver-users > -- Justin Deoliveira OpenGeo - http://opengeo.org Enterprise support for open source geospatial.
------------------------------------------------------------------------------ Create and publish websites with WebMatrix Use the most popular FREE web apps or write code yourself; WebMatrix provides all the features you need to develop and publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
_______________________________________________ Geoserver-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-users
