[Geoserver-users] SAXParsing error in OpenLayers and/or Geoserver

Dear List,

When I send the following request from OpenLayers to Geoserver, I receive an
error message regarding SAXParsing ("document structures must start and end
within the same entity"). I have tried to sent this request using both POST
and GET, but I receive the same error. The strange part is that when I try
the same request from Geoserver's DeomRequest page, everything is fine. If i
type in the request URL into the web browsers address field, I also receives
a correct GML! When checking then request parameters in Firefox, it seems
like the Filer parameter is cut off just at the first "="-sign.

Is the Filter parameter not encoded correctly? Or is there i bug somewhere?
If so, in OpenLayers och Geosever?

Request:
http://10.0.1.2:8080/geoserver/wfs?request=GetFeature&version=1.0.0&typeName=topp:states&outputFormat=GML2&FILTER=<Filter
xmlns=\"http://www.opengis.net/ogc\\"
xmlns:gml=\"http://www.opengis.net/gml\\"><Intersects><PropertyName>the\_geom</PropertyName><gml:Point
srsName=\"EPSG:4326\"><gml:coordinates>-74.817265,40.5296504</gml:coordinates></gml:Point></Intersects></Filter>

Error msg:
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<ows:ExceptionReport
version=\"1.0.0\"\n xsi:schemaLocation=\"http://www.opengis.net/ows
http://10.0.1.2:8080/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd\\&quot;\\n
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\\&quot;
xmlns:ows=\"http://www.opengis.net/ows\\&quot;&gt;\\n <ows:Exception
exceptionCode=\"NoApplicableCode\"
locator=\"org.vfny.geoserver.util.requests.readers.XmlRequestReader\">\n
<ows:ExceptionText>org.xml.sax.SAXParseException: XML\n document
structures must start and end within the same\n entity. XML document
structures must start and end\n within the same
entity.</ows:ExceptionText>\n </ows:Exception>\n</ows:ExceptionReport>\n"
--
View this message in context: http://www.nabble.com/SAXParsing-error-in-OpenLayers-and-or-Geoserver-tp17830214p17830214.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Hi,

the XML got clobbered up along the way. Can you copy the original request to http://pastebin.com and send us the link?

-Arne

Zer wrote:

Dear List,

When I send the following request from OpenLayers to Geoserver, I receive an
error message regarding SAXParsing ("document structures must start and end
within the same entity"). I have tried to sent this request using both POST
and GET, but I receive the same error. The strange part is that when I try
the same request from Geoserver's DeomRequest page, everything is fine. If i
type in the request URL into the web browsers address field, I also receives
a correct GML! When checking then request parameters in Firefox, it seems
like the Filer parameter is cut off just at the first "="-sign.

Is the Filter parameter not encoded correctly? Or is there i bug somewhere?
If so, in OpenLayers och Geosever?

Request:
http://10.0.1.2:8080/geoserver/wfs?request=GetFeature&version=1.0.0&typeName=topp:states&outputFormat=GML2&FILTER=&lt;Filter
xmlns=\"http://www.opengis.net/ogc\\&quot;
xmlns:gml=\"http://www.opengis.net/gml\\&quot;&gt;&lt;Intersects&gt;&lt;PropertyName&gt;the\_geom&lt;/PropertyName&gt;&lt;gml:Point
srsName=\"EPSG:4326\"><gml:coordinates>-74.817265,40.5296504</gml:coordinates></gml:Point></Intersects></Filter>

Error msg:
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<ows:ExceptionReport
version=\"1.0.0\"\n xsi:schemaLocation=\"http://www.opengis.net/ows
http://10.0.1.2:8080/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd\\&quot;\\n xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\\&quot;
xmlns:ows=\"http://www.opengis.net/ows\\&quot;&gt;\\n <ows:Exception
exceptionCode=\"NoApplicableCode\"
locator=\"org.vfny.geoserver.util.requests.readers.XmlRequestReader\">\n <ows:ExceptionText>org.xml.sax.SAXParseException: XML\n document
structures must start and end within the same\n entity. XML document
structures must start and end\n within the same
entity.</ows:ExceptionText>\n </ows:Exception>\n</ows:ExceptionReport>\n"