Just to answer my own question: I found the cause.
The thing is that I am writing code that transparently modifies the
requests to geoserver (kind of like a proxy), and my code just copied the
HTTP headers from the original request, into the new request to geoserver,
but it modified the XML content of the WFS request. The HTTP headers als
included the Content-Length header. But since I added some stuff to the XML
request, that got the XML body to be truncated after Content-Length bytes
by Jetty/geoserver. Oops. Took me a while and some tcpdump/wireshark
fussing about to figure it out, but now I fixed it :)
And by the way: I love the CQL and WFS Query/Filter functionality in
geoserver!
Cheers,
Dolf.
On 1 May 2012 20:26, Dolf Andringa <[email protected]> wrote:
> Hey everyone,
>
> I am trying to send the following POST request to my geoserver:
>
> <wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance" service="WFS" version="1.1.0"
> maxFeatures="10" xsi:schemaLocation="http://www.opengis.net/wfs
> http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"><wfs:Query
> typeName="viplive_patienten_test" srsName="EPSG:900913"><ogc:Filter
> xmlns:ogc="http://www.opengis.net/ogc"><ogc:And xmlns:gml="
> http://www.opengis.net/gml"><ogc:PropertyIsEqualTo><ogc:PropertyName>datasessionid</ogc:PropertyName><ogc:Literal>6</ogc:Literal></ogc:PropertyIsEqualTo><ogc:BBOX><ogc:PropertyName>the_geom</ogc:PropertyName><gml:Envelope
> srsName="EPSG:900913"><gml:lowerCorner>514519.49377981
> 6838896.9406081</gml:lowerCorner><gml:upperCorner>514543.38035115
> 6838920.8271794</gml:upperCorner></gml:Envelope></ogc:BBOX></ogc:And></ogc:Filter></wfs:Query></wfs:GetFeature>
>
> or pretty printed:
>
> <wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance" service="WFS" version="1.1.0"
> maxFeatures="10" xsi:schemaLocation="http://www.opengis.net/wfs
> http://schemas.opengis.net/wfs/1.1.0/wfs.xsd">
> <wfs:Query typeName="viplive_patienten_test" srsName="EPSG:900913">
> <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
> <ogc:And xmlns:gml="http://www.opengis.net/gml">
> <ogc:PropertyIsEqualTo>
> <ogc:PropertyName>datasessionid</ogc:PropertyName>
> <ogc:Literal>6</ogc:Literal>
> </ogc:PropertyIsEqualTo>
> <ogc:BBOX>
> <ogc:PropertyName>the_geom</ogc:PropertyName>
> <gml:Envelope srsName="EPSG:900913">
> <gml:lowerCorner>514519.49377981
> 6838896.9406081</gml:lowerCorner>
> <gml:upperCorner>514543.38035115
> 6838920.8271794</gml:upperCorner>
> </gml:Envelope>
> </ogc:BBOX>
> </ogc:And>
> </ogc:Filter>
> </wfs:Query>
> </wfs:GetFeature>
>
> But this returns the following error which I can't explain (the XML seems
> to be valid, althoug the SAXParser complains somehow):
>
> <ows:ExceptionReport xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:ows="http://www.opengis.net/ows" version="1.0.0"
> xsi:schemaLocation="http://www.opengis.net/ows
> http://127.0.0.1:5000/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd">
> <ows:Exception exceptionCode="NoApplicableCode">
> <ows:ExceptionText>org.xml.sax.SAXParseException: XML document
> structures must start and end within the same entity.
> XML document structures must start and end within the same
> entity.</ows:ExceptionText>
> </ows:Exception>
> </ows:ExceptionReport>
>
> Does anyone have any idea? I hope so.
>
> This is my geoserver version information:
> Build Information
>
> - Version 2.1.2
> - Subversion Revision -1
> - Build Date 06-ott-2011 11:09
> - GeoTools Version 2.7.3 (rev -1)
>
>
> Cheers,
>
> Dolf.
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users