Hi folks,
I have tried some requests to test my wfs server based on geoserver 1.1 and
running on tomcat 4.1.30:
Test 1 - Filter (Area Of Interest)
Query all properties of all feature instances of the feature type LOCATORS
that lie within the specified box
http://localhost:8080/GridRetriever/wfs?request=GetFeature&typename=locators
&filter=<Filter%20xmlns="http://www.opengis.net/ogc"%20xmlns:gml="http://www
.opengis.net/gml"><Within><PropertyName>locators/the_geom</PropertyName><gml
:Box><gml:coordinates>-120,30%200,80</gml:coordinates></gml:Box></Within></F
ilter>
Works fine! So, a filter with the Within operator seems to work properly...
Test 2 - Filter (location name)
Query all properties of all feature instances of the feature type LOCATORS
where the location name is 'Toronto'
http://localhost:8080/GridRetriever/wfs?request=GetFeature&typename=locators
&filter=<Filter><PropertyIsEqualTo><PropertyName>loc_name</PropertyName><Lit
eral>Toronto</Literal></PropertyIsEqualTo></Filter>
Works fine!!
Test 3 - Filter (country code)
Query all properties of all feature instances of the feature type LOCATORS
where the code name is 'CA'
http://localhost:8080/GridRetriever/wfs?request=GetFeature&typename=locators
&filter=<Filter><PropertyIsEqualTo><PropertyName>country_code</PropertyName>
<Literal>CA</Literal></PropertyIsEqualTo></Filter>
Works fine!!!
Test 4 - Filter(location name + country code)
Query all properties of all feature instances of the feature type LOCATORS
where the location name is 'Toronto' and the country code is 'CA'
http://localhost:8080/GridRetriever/wfs?request=GetFeature&typename=locators
&filter=<Filter%20xmlns="http://www.opengis.net/wfs"%20xmlns:ogc="http://www
.opengis.net/ogc"%20xmlns:gml="http://www.opengis.net/gml"><And><PropertyIsE
qualTo><PropertyName>country_code</PropertyName><Literal>CA</Literal></Prope
rtyIsEqualTo><PropertyIsEqualTo><PropertyName>loc_name</PropertyName><Litera
l>Toronto</Literal></PropertyIsEqualTo></And></Filter>
Works fine!!!! So, a filter with the And operator seems to work properly...
Test 5 - Filter(AOI + loc_name)
Query all properties of all feature instances of the feature type LOCATORS
that lie within the specified box and where the location name is 'Toronto'
http://localhost:8080/GridRetriever/wfs?request=GetFeature&typename=locators
&filter=<Filter%20xmlns="http://www.opengis.net/wfs"%20xmlns:ogc="http://www
.opengis.net/ogc"%20xmlns:gml="http://www.opengis.net/gml"><And><Within><Pro
pertyName>locators/the_geom</PropertyName><gml:Box><gml:coordinates>-74,44%-
68,47</gml:coordinates></gml:Box></Within><PropertyIsEqualTo><PropertyName>l
oc_name</PropertyName><Literal>Toronto</Literal></PropertyIsEqualTo></And></
Filter>
Error returned by the server:
java.lang.IllegalStateException: getOutputStream() has already been called
for this response
at
org.apache.coyote.tomcat4.CoyoteResponse.getWriter(CoyoteResponse.java:600)
at
org.apache.coyote.tomcat4.CoyoteResponseFacade.getWriter(CoyoteResponseFacad
e.java:171)
at
org.vfny.geoserver.servlets.AbstractService.send(AbstractService.java:446)
at
org.vfny.geoserver.servlets.AbstractService.sendError(AbstractService.java:4
87)
at
org.vfny.geoserver.servlets.AbstractService.doService(AbstractService.java:3
63)
at
org.vfny.geoserver.servlets.AbstractService.doGet(AbstractService.java:195)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.vfny.geoserver.servlets.wfs.WfsDispatcher.doResponse(WfsDispatcher.java:
159)
at
org.vfny.geoserver.servlets.wfs.WfsDispatcher.doGet(WfsDispatcher.java:112)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:256)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2422)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:171)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:163
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:199)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:700)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:683)
at java.lang.Thread.run(Thread.java:534)
What is wrong with this request???
Please help!
Thanks in advance,
Marc