Hello,
In order to setup a WFS server, I'm trying to use GeoServer on an Ubuntu
8.04 server with Postgres and the PostGIS extension;
I added a new Feature Data Set over PostGIS and it works fine with Demo
on GeoServer page, but I have an issue when I try to perform a
GetFeature using POST method.
If I use the following link (GET method), the server returns the correct
xml file
http://<myHostName>:<myPort>/geoserver/wfs?request=getfeature&typename=roads&service=wfs&version=1.0.0
but if I send the following xml message with 'curl' using POST method,
GeoServer throws a "java.net.ConnectException: Connection refused"
exception (see attached exception.txt file)
<?xml version="1.0" encoding="UTF-8"?>
<wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:gml="http://www.opengis.net/gml"
xmlns:cgf="http://www.opengis.net/cite/geometry" outputFormat="GML2"
version="1.0.0" service="WFS">
<wfs:Query typeName="sf:roads">
</wfs:Query>
</wfs:GetFeature>
curl command is:
curl -T roads.xml -X POST http://<hostname>:<port>/geoserver/wfs
I tried to remove the namespace from the typeName (sf:), but the result
is the same.
The returned message is:
<?xml version="1.0" ?>
<ServiceExceptionReport
version="1.2.0"
xmlns="http://www.opengis.net/ogc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/ogc
http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd">
<ServiceException>
java.lang.RuntimeException: java.io.IOException
java.io.IOException
null
null
Connection test failed
Cannot create PoolableConnectionFactory (Connection refused. Check
that the hostname and port are correct and that the postmaster is
accepting TCP/IP connections.)
Connection refused. Check that the hostname and port are correct and
that the postmaster is accepting TCP/IP connections.
Connection refused
</ServiceException></ServiceExceptionReport>
Note that GetCapabilities works with both POST and GET methods.
POST: <wfs:GetCapabilities service="wfs"
xmlns:wfs="http://www.opengis.net/wfs"/>
GET:
http://<hostname>:<port>/geoserver/wfs?request=getcapabilities&service=wfs&version=1.0.0
Other information (software versions):
Ubuntu Server 8.04.2
GeoServer 1.7.3
Apache Tomcat 5.5.17
Postgres 8.3
PostGIS 1.3.3
PROJ Rel. 4.6.0, 21 Dec 2007
Trying with
GEOS 2.2.3-CAPI-1.1.1
and
GEOS 3.0.0-CAPI-1.4.1
Many thanks for any advice and best regards
Marco
--
Marco Bascetta
MEEO S.r.l.
Via Saragat 9
I-44122 Ferrara, Italy
Tel: +39 0532 1861501
Fax: +39 0533 1861637
http://www.meeo.it
========================================
"ATTENZIONE:le informazioni contenute in questo messaggio sono
da considerarsi confidenziali ed il loro utilizzo è riservato unicamente
al destinatario sopra indicato. Chi dovesse ricevere questo messaggio
per errore è tenuto ad informare il mittente ed a rimuoverlo
definitivamente da ogni supporto elettronico o cartaceo."
"WARNING:This message contains confidential and/or proprietary
information which may be subject to privilege or immunity and which
is intended for use of its addressee only. Should you receive this
message in error, you are kindly requested to inform the sender and
to definitively remove it from any paper or electronic format."