[OpenLayers-Users] OL vector/wfs trouble with GeoServer

Wally Atkins wallyatkins at gmail.com
Fri Jan 6 15:30:17 EST 2012


I think the problem is that you are using Oracle APEX ;)

On Friday, January 6, 2012, Neil T <tallentn at gmail.com> wrote:
> Hello, my first post on an online forum, so I appoligize if I fail at the
> info!
>
> My setup:
>
> Tomcat 7.0.22, localhost:8082
> GeoServer 2.1.3, hosted via Tomcat (also :8082)
> Oracle XE/Apex 4.1, running via embedded XDB gateway on :8080
> Openlayers 2.10 (tried 2.11, not sure if that was the issue, currently
back
> on 2.10)
> Python 2.7 (for my proxy script)
> Using Firefox/Firebug for review
>
> I'm attempting to offer a layer of point geometries from my XE DB as a
> Vector layer on my map.  The layer displays fine in Geoserver
> (workspace:BETA_ORCL, layer:CC_COUNTRIES); I can preview in all formats.
 I
> had first attempted the GeoServer Proxy (proxy-2.1-SNAPSHOP), but was
> unsuccessful and deleted the .jar from my web-inf/lib.  Next, I tried the
> proxy.cgi provided by Openlayers - it was origionally unsuccessful as well
> (the section that rendered the 'qs' "QUERY_STRING" as an array set was
> truncating my url request at the first &...I replaced with an
lstrip('url=')
> to clean my url instead), and I can successfully pass a getFeature request
> using the proxy by manually inserting the url (proxy and getFeatures call)
> into a browser; it returns what seems to be a valid xml of my feature set.
>
> All this leads me to believe my Geoserver can offer this layer as a wfs
> layer (wfs is enabled, getCapabilities checks out, etc.) through the
proxy.
> Here's my layer call from javascript:
>
> var countryLayer = new OpenLayers.Layer.Vector("WFS", {
>    strategies: [new OpenLayers.Strategy.Fixed()],
>    projection: new OpenLayers.Projection("EPSG:4326"),
>    protocol: new OpenLayers.Protocol.WFS({
>      url: "http://localhost:8082/geoserver/wfs",
>      featurePrefix:"BETA_ORCL",
>      featureType: "CC_COUNTRIES",
>      geometryName: "CENT_GEOM",
>      featureNS: "http://betaora.org",
>      schema:
> "
http://localhost:8082/geoserver/wfs?service=wfs&version=1.1.0&request=DescribeFeatureType&typename=BETA_ORCL:CC_COUNTRIES
",
>      srsName: "EPSG:4326",
>      version: "1.1.0"
>      })
> });
>
> When the page renders, the only activity I see in the GeoServer logs is
the
> request for WMS tiles (my base map, which displays fine).  Nothing at all
> for WFS layer, no errors...nothing.  In FireBug, I get two warnings on the
> console (regarding the xml.js and v1.js for openlayers) about null
objects,
> but no errors.  On the Net panel, the activity reads:
>
> URL: OPTIONS cust.cgi?url=.... (on mouseover, changes to full
> http://localhost:8082)
> STATUS: 200 OK
> DOMAIN: localhost:8082
> SIZE: 0
> Remote IP: localhost:8082
>
> The response is completely empty.
>
> I'm concerned because the net activity in Firebug for WMS layers starts
with
> POST/GET (vice OPTIONS); does this indicate the problem?
>
> Also unsure of the paramater calls for Protocol.WFS - I've seen SOOO many
> combos that all claim to work (using/not using featureNS, schema,
etc.)...do
> I have it right?
>
> Finally; my Vector layer does create.  It is added to the layer selector,
> and is under the dom objects.  However, there are no features; nothing
> displayed, nothing in the feature array, and the final two <g> elements
> (vroot and troot) have no children.  If I manually add a feature (using
the
> markup controls), they are successfully added to the map and dom.  Which
> makes me think the layer IS working...just not getting data from
Geoserver.
>
> Any help is SERIOUSLY appreciated...I'm red-eyed from scouring forums, and
> would love to get on with my life.  Thanks!
>
> Neil
>
> --
> View this message in context:
http://osgeo-org.1803224.n2.nabble.com/OL-vector-wfs-trouble-with-GeoServer-tp7159749p7159749.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> 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/20120106/c4284cb0/attachment.html


More information about the Users mailing list