Hello,
I'm trying to make the WfsFeatureLayer sample in the HowoISamples solution work.
But I'm encoutering several problems :
The base sample works not. It send 0 results.Here is the important code in the sample :
WfsFeatureLayer wfsFeatureLayer = new WfsFeatureLayer(@"giswebservices.massgis.state.ma.us/geoserver/wfs?request=GetFeature", "massgis:TOWNS_POLYM");
Collection<string> returningColumns = new Collection<string>();
FeatureLayer wfsFeatureLayer = wpfMap1.FindFeatureLayer("WfsFeatureLayer");
wfsFeatureLayer.Open();
Collection<FeatureSourceColumn> columns = wfsFeatureLayer.FeatureSource.GetColumns();
foreach (FeatureSourceColumn item in columns)
{
returningColumns.Add(item.ColumnName);
}
Collection<Feature> allFeaturs = wfsFeatureLayer.QueryTools.GetAllFeatures(returningColumns);
wfsFeatureLayer.Close();
The result of this is simply a allFeaturs.Count = 0.
However, when I try to execute the theoric query this code must execute, I become many many data. giswebservices.massgis.state.ma.us/geoserver/wfs?request=GetFeature&Service=WFS&typeName=massgis:TOWNS_POLYM
I tracked what exactly is send from the WpfClient, and I become the folloqing requested url : giswebservices.massgis.state.ma.us/geoserver/wfs?request=GetFeature?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=massgis:TOWNS_POLYM&propertyname=
and when executing this url direct in a webbrowser, there result is an exception :
<ServiceExceptionReport version="1.2.0" xsi:schemaLocation="opengis.net/ogc schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd">
−
<ServiceException code="OperationNotSupported" locator="GetFeature?SERVICE=WFS">
No such operation wfs 1.0.0 GetFeature?SERVICE=WFS
Details:
org.geoserver.platform.ServiceException: No such operation wfs 1.0.0 GetFeature?SERVICE=WFS
at org.geoserver.ows.Dispatcher.dispatch(Dispatcher.java:399)
at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:209)
at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265)
at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:124)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:174)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149)
at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:73)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.geoserver.filters.ReverseProxyFilter.doFilter(ReverseProxyFilter.java:163)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:41)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:619)
</ServiceException>
</ServiceExceptionReport>
Then I tried the same experience with another public WFS server : bsc-eoc.org/cgi-bin/bsc_ows.asp?version=1.0.0&service=WFS
While executing the samlpe code with this URL, the execution is locked.
The line of code Collection<Feature> allFeaturs = wfsFeatureLayer.QueryTools.GetAllFeatures(returningColumns); is executed, but never end.
I tracked what exactly is sent too, and I found the following URL : bsc-eoc.org/cgi-bin/bsc_ows.asp?version=1.0.0&service=WFS&request=GetFeature?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=OWLS&BBOX=-81,45,-79,48&propertyname=msGeometry,ROUTEID,ROUTE_NAME,LATITUDE,LONGITUDE
This URI works good when executing it in a webBrowser, I become a valid WML result.
But the WpfClient seems to be locked somewhere.
Could you please give me some advices ?
Thanks
Guillaume.