[OpenLayers-Users] Re: Problems getting WFS layer

Bart van den Eijnden bartvde at osgis.nl
Thu Jun 9 07:51:59 EDT 2011


Hi Casper,

AJAX requests normally show up in the Console tab of Firebug, make you sure you have activated the option to show AJAX requests.

Without a request XML and response XML it's really difficult to help you.

Otherwise, send us the output of your DescribeFeatureType request, a common mistake is that the featureNS does not exactly match the namespace advertized on the WFS.

Best regards,
Bart

-- 
Looking for flexible support on OpenLayers or GeoExt? Please check out http://www.osgis.nl/support.html

Bart van den Eijnden
OSGIS
bartvde at osgis.nl

On Jun 9, 2011, at 12:05 PM, Casper Span wrote:

> A small followup... I've found out a few things in the meantime. For starters, I had a missing proxy. I've added this into apache now, so it forwards everything nicely from port 80 to port 8080 to geoserver.
> 
> My layer had a few changes as well:
> 
>     wfs = new OpenLayers.Layer.Vector("Editable Features", {
>         strategies: [new OpenLayers.Strategy.BBOX()],
>         projection: new OpenLayers.Projection("EPSG:28992"),
>         protocol: new OpenLayers.Protocol.WFS({
>             version: "1.1.0",
>             srsName: "EPSG:28992",
>             url: "http://casp-geoserver/geoserver/wfs",
>             featureNS :  "http://casp-geoserver/",
>             featureType: "locatiedossiers",
>             geometryName: "geometry",
>             schema: "http://casp-geoserver/geoserver/wfs/DescribeFeatureType?version=1.1.0&typename=gs:locatiedossiers"
>         })
>     }); 
> 
> This is basically just the WFS Transactional sample from OL, with my server adres and layer in it. I have doublechecked all the url's, namespaces, etc. I really don't know what to check next. Firebug tries to get something from WFS "OPTIONS wfs", but the reponse is empty. That's the only WFS related line on the NET tab in FireBug. 
> 
> I can serve the layer through WMS without any problems. The WMS is also served through the proxy, so that should work properly.
> 
> I'm currently using GeoServer 2.1 RC2, OL 2.10. This problem is the same for Firefox 4, Chrome 12 and IE8.
> 
> I really hope I'm missing just a small thing, because I've been at this problem for a few days already...
> 
> Regards,
> Casper Span
> 
> 
> On Thu, May 26, 2011 at 11:22 AM, Casper Span <info at spatially-oriented.com> wrote:
> Hi list,
> 
> I know this question has been asked before (many times I guess), but somehow I just can't get this thing to work. Unfortunately, Google isn't my friend either.
> 
> So, I have this setup:
> - Oracle Spatial database
> - Geoserver serving WFS and WMS and setup with a single layer
> - OpenLayers
> 
> So nothing fancy there.
> 
> I created a layer using the samples and docs. It came down to this:
>   var locdos = new OpenLayers.Layer.Vector("Locatiedossiers", {
>               strategies: [new OpenLayers.Strategy.BBOX()],
>               projection: new OpenLayers.Projection("EPSG:28992"),
>               protocol: new OpenLayers.Protocol.WFS({
>                       version: "1.1.0",
>                       url: "http://roxit-geoserver:8080/geoserver/wfs", 
>                       featureType: "Locatiedossiers",
>                       geometryName: "GEOMETRIE",
>                       featureNS: "http://www.roxit.nl",
>                       srsName: "EPSG:28992",
>                       schema: "http://roxit-geoserver:8080/geoserver/wfs/DescribeFeatureType?version=1.1.0&featuretype=Locatiedossiers"
>                       }),
> 
>               });
> 
> So I added that to my map and booted firefox. Nothing is being loaded. Looking at firebug: OL does a request to /wfs and gets an empty response. The geoserver setup works like a charm when I use it with, for example uDig and Gaia.
> 
> I've tried adding the prefix with the featureType, but removed that after reading a post from Bart vd Eijnden saying it should be removed. 
> 
> 
> I'm most likely missing something trivial, but I just can't find it. Any suggestions?
> 
> 
> Regards,
> Casper Span
> 
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20110609/b05be52d/attachment.html


More information about the Users mailing list