WFS

40 views
Skip to first unread message

dmi...@gmail.com

unread,
Sep 16, 2013, 8:53:55 AM9/16/13
to geoshiel...@googlegroups.com
Hi,

I've started working with Geoshield 0.3.0 and found out that WMS works greatly.
But I have problems using it with WFS.

I need to filter layer "testlayer" available on Geoserver 2.1.3 under url http://server:8080/geoserver/wfs.

It is accessible in QGIS and openlayers:

    OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url=";
 
    testlayer = new OpenLayers.Layer.Vector("Testlayer", {
                styleMap: styles,
                projection: map.displayProjection,
                strategies: [
                        new OpenLayers.Strategy.BBOX(),
                        new OpenLayers.Strategy.Refresh({interval: 4000, force: true})
                ],
                protocol: new OpenLayers.Protocol.WFS({
                        version: '1.1.0',
                        url:  'http://gserver:8080/geoserver/wfs',
                        featureType: 'testlayer',
                        geometryName: 'the_geom'
                })
        });



But I can't open even predefined in Geoshield topp:tasmania_cities level (neither in QGIS, no in OpenLayers)

I've also tried to setup my own wfs layer in demo context:

Available WMS and WFS: /demo
layer name: gsstor:testlayer
Geometry name: the_geom
Namspace name: gsstor
Namespace URI: http://gserver/gsstor

but I failed to access it in user-end applications.

First of all, I can't understand how should I construct url for the shielded wfs-layer:

1) When I use this request: http://gserver:8080/geoshield/wfs?SERVICE=WFS&REQUEST=GetCapabilities&VERSION=1.0.0
I get an error:

The resource did not process correctly

java.lang.NullPointerException
	at ch.supsi.ist.geoshield.shields.UserShield.doBeforeProcessing(UserShield.java:77)
	at ch.supsi.ist.geoshield.shields.UserShield.doFilter(UserShield.java:139)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at ch.supsi.ist.geoshield.shields.CacheFilter.doFilter(CacheFilter.java:116)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:465)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
	at java.lang.Thread.run(Thread.java:722)


2) Request with layer name after wfs/ (for example: http://gserver:8080/geoshield/wfs/testlayer?SERVICE=WFS&REQUEST=GetCapabilities&VERSION=1.0.0)
ends up with following error:

HTTP Status 500 -


type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: GET method is not supported
	ch.supsi.ist.geoshield.wfs.WFSShield.doFilter(WFSShield.java:437)
	ch.supsi.ist.geoshield.wfs.WfsButler.doFilter(WfsButler.java:258)
	ch.supsi.ist.geoshield.shields.UserShield.doFilter(UserShield.java:140)
	ch.supsi.ist.geoshield.shields.CacheFilter.doFilter(CacheFilter.java:116)

3) Request with context name before wfs: http://gserver:8080/geoshield/demo/wfs?SERVICE=WFS&REQUEST=GetCapabilities&VERSION=1.0.0
gets 404 error (The requested resource (/geoshield/demo/wfs) is not available.)


4) Openlayers also gets nothing.
Firebug shows only question mark in the response part of POST request.

What form of url for wfs layer in Geoshield is correct?
What could be a reason of errors that I encounter?
Can I use shielded wfs layer in OpenLayers Vector layer?

Best regards
Dmitry Drozdov.

Reply all
Reply to author
Forward
0 new messages