Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have a Openlayers+Geoserver application. Now I'm trying to move the application on a new server with the new GEOSERVER 2.2 RC1. With the Geoserver ver. 2.1.0 i was able to show the WFS-T layer, while now, there is something different and with GeoServer 2.2 the WFS-T Layes seem not to work propertly: i can't load the layer at all.

I use the following code in the openlayers map.js file:

 //wfs-t editable overlay
 var v1497_shp = new OpenLayers.Layer.Vector("v1497_shp", {
     strategies: [new OpenLayers.Strategy.BBOX(), saveStrategy],
     //projection: new OpenLayers.Projection("EPSG:26910"),
     protocol: new OpenLayers.Protocol.WFS({
         version: "1.1.0",
         // loading data through localhost url path
         url: "http://151.12.58.246/geoserver/wfs",
         featureNS :  "http://www.opengeospatial.net/cite",
         maxExtent: mapextent,
         // layer name
         featureType: "v1497pol_wgs84",
         // geometry column name
         geometryName: "the_geom",
         schema: "http://151.12.58.246/geoserver/wfs/DescribeFeatureType?version=1.1.0&typename=cite:v1497pol_wgs84"
     })
});

if i browse to:

 http://151.12.58.246/geoserver/wfs/DescribeFeatureType?version=1.1.0&typename=cite:v1497pol_wgs84

i have the result:

<xsd:schema xmlns:cite="http://www.opengeospatial.net/cite" xmlns:gml="http://www.opengis.net/gml" xmlns:it.geosolutions="http://www.geo-solutions.it" xmlns:nurc="http://www.nurc.nato.int" xmlns:sde="http://geoserver.sf.net" xmlns:sf="http://www.openplans.org/spearfish" xmlns:sitap="http://151.12.58.246:8080/geoserver/wfs" xmlns:test_ws="http://test_ws" xmlns:tiger="http://www.census.gov" xmlns:topp="http://www.openplans.org/topp" xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.opengeospatial.net/cite">
<xsd:import namespace="http://www.opengis.net/gml" schemaLocation="http://151.12.58.246:80/geoserver/schemas/gml/3.1.1/base/gml.xsd"/>
<xsd:complexType name="v1497pol_wgs84Type">
<xsd:complexContent>
<xsd:extension base="gml:AbstractFeatureType">
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="0" name="codvr" nillable="true" type="xsd:decimal"/>
<xsd:element maxOccurs="1" minOccurs="0" name="uso" nillable="true" type="xsd:int"/>
<xsd:element maxOccurs="1" minOccurs="0" name="objectid" nillable="true" type="xsd:decimal"/>
<xsd:element maxOccurs="1" minOccurs="0" name="area__mq_" nillable="true" type="xsd:double"/>
<xsd:element maxOccurs="1" minOccurs="0" name="perim__m_" nillable="true" type="xsd:double"/>
<xsd:element maxOccurs="1" minOccurs="0" name="the_geom" nillable="true" type="gml:GeometryPropertyType"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:element name="v1497pol_wgs84" substitutionGroup="gml:_Feature" type="cite:v1497pol_wgs84Type"/>
</xsd:schema>

but if i load the map nothing appear. In the firebug console i have no error. When i load the page i can see the POST request loading but after few minutes, it simply stop to charge.

Do you know what i have to change (in openlayers or directly in geoserver) in order to let the code work? Thank you


UPDATE:

i've installed the 2.1 version of Geo Server and i've configured it with the same layer from the db store. Then i've launched the php file test and.. it worked!!

This demonstrated that the problem IS NOT the proxy.

Now i have to make it working propertly also with the 2.2 version of Geoserver. Do you know if is there something to activate in order to show the wfs layer? maybe there are some configurations in the layer/stores/workspaces?

PS: the net-tab of firebug says "502 Bad gateway" (after 10 minutes where you can see only a turning wheel)


UPDATE (important):

In the new version of Geoserver 2.2 there is a new flag on the workspace definition. The flag is labelled as "enable" and it is under a section called "settings". When you check the "enable" a form with the contact details (?) for the workspace. At the very bottom of the form, there is a field called "Proxy Base URL".

If you write there the address of the proxy (for example: http://localhost/cgi-bin/proxy.cgi?url=) the wfs layer works fine in localhost. Now the problem is to make the layes working also from a remote pc. i don't understand what i should write in the field "proxy base url" and there are no information in the release note of the GS new version.

i've tried to put

http://151.12.58.246/cgi-bin/proxy.cgi?url= 

but without results..

if i fill the field with

http://151.12.58.246/cgi-bin/proxy.cgi?url= 

or

http://localhost/cgi-bin/proxy.cgi?url= 

i receive in the firebug net tab the same message: "Aborted".

Any suggestion?

share|improve this question
    
possible duplicate of Unable to create WFS successfully –  iant Jul 19 '12 at 7:46
    
I don't think so. In the post you said the problem seems in the proxy configuration. Here it seems to work well: in fact i don't have any error message (with firebug) and if i navigate in the test url: 151.12.58.246/cgi-bin/proxy.cgi?url= i can see the openlayers page as i have configured. –  Michi Jul 19 '12 at 15:19
    
check the net tab in firebug - this sounds like a classic proxy issue –  iant Jul 20 '12 at 7:34
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.