[Geoserver-users] Problems with DescribeFeatureType

Hello,

I have a layer stored in an Oracle Database and am trying to get the FeatureType via Geotools WFSDataStore, which sends the following POST request to a geoserver (Version 1.7.0):

<?xml version="1.0" encoding="UTF-8"?>
<DescribeFeatureType xmlns="http://www.opengis.net/wfs&quot;
    xmlns:gml="http://www.opengis.net/gml&quot;
    xmlns:ogc="http://www.opengis.net/ogc&quot; version="1.0.0" service="WFS"
    outputFormat="XMLSCHEMA">
    <TypeName>topp:ALPHA_FIELD_ROTATIONS</TypeName>
</DescribeFeatureType>

The response is:

<?xml version="1.0" ?>
<ServiceExceptionReport
    version="1.2.0"
    xmlns="http://www.opengis.net/ogc&quot;
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
    xsi:schemaLocation="http://www.opengis.net/ogc http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd&quot;&gt;
    <ServiceException>
       Could not find type: ALPHA_FIELD_ROTATIONS
</ServiceException></ServiceExceptionReport>

I found out that it works with a GET request (http://<host>/geoserver/wfs?request=DescribeFeatureType&typeName=topp:ALPHA_FIELD_ROTATIONS), and that it works with a POST request if I use "ALPHA_FIELD_ROTATIONS" as TypeName instead of "topp:ALPHA_FIELD_ROTATIONS".

Is this a bug in the geoserver? Or may it be a configuration issue?

The problem is that I cannot use GET because I want to add Features to the FeatureStore and that is only possible with POST. And I cannot remove the "topp:" in all cases.

Regards,
Frank

--
Dipl.-Inf. Frank Steinmann
Knowledge Management Department
DFKI GmbH

Tel.: +49 (0)631 20575 - 114
Sekr.: +49 (0)631 20575 - 101
Fax: +49 (0)631 20575 - 103
E-Mail: Frank.Steinmann@anonymised.com
-----------------------------------------------------------
Deutsches Forschungszentrum für Künstliche Intelligenz GmbH
Trippstadter Straße 122, D-67663 Kaiserslautern, Germany

Geschäftsführung:
Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster (Vorsitzender)
Dr. Walter Olthoff

Vorsitzender des Aufsichtsrats:
Prof. Dr. h.c. Hans A. Aukes

Amtsgericht Kaiserslautern, HRB 2313
-----------------------------------------------------------

Frank Steinmann ha scritto:

Hello,

I have a layer stored in an Oracle Database and am trying to get the FeatureType via Geotools WFSDataStore, which sends the following POST request to a geoserver (Version 1.7.0):

<?xml version="1.0" encoding="UTF-8"?>
<DescribeFeatureType xmlns="http://www.opengis.net/wfs&quot;
    xmlns:gml="http://www.opengis.net/gml&quot;
    xmlns:ogc="http://www.opengis.net/ogc&quot; version="1.0.0" service="WFS"
    outputFormat="XMLSCHEMA">
    <TypeName>topp:ALPHA_FIELD_ROTATIONS</TypeName>
</DescribeFeatureType>

The response is:

<?xml version="1.0" ?>
<ServiceExceptionReport
    version="1.2.0"
    xmlns="http://www.opengis.net/ogc&quot;
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
    xsi:schemaLocation="http://www.opengis.net/ogc http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd&quot;&gt;
    <ServiceException>
       Could not find type: ALPHA_FIELD_ROTATIONS
</ServiceException></ServiceExceptionReport>

Yeah, it does not work because the topp prefix has not been declared,
you miss this attribute in the DescribeFeatureType element:

xmlns:topp="http://www.openplans.org/topp&quot;

However, arguably there is no way to know what the namespace is
at the DescribeFeatureType level (GetCapabilities does not tell).
Justin, this is an issue with the new xml parser afaik... any idea?

Cheers
Andrea

PS: checked, the problem is easily reproduced with the sample
requests GeoServer is shipping with.

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

Yeah, it does not work because the topp prefix has not been declared,
you miss this attribute in the DescribeFeatureType element:

xmlns:topp="http://www.openplans.org/topp&quot;

Ok, if I add this to the request, it works. Unfortunately it's not me writing the request, it's the WFSDataStore, so I'm not able to change anything there.
Any ideas how to solve the problem?

Frank

--
Dipl.-Inf. Frank Steinmann
Knowledge Management Department
DFKI GmbH

Tel.: +49 (0)631 20575 - 114
Sekr.: +49 (0)631 20575 - 101
Fax: +49 (0)631 20575 - 103
E-Mail: Frank.Steinmann@anonymised.com
-----------------------------------------------------------
Deutsches Forschungszentrum für Künstliche Intelligenz GmbH
Trippstadter Straße 122, D-67663 Kaiserslautern, Germany

Geschäftsführung:
Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster (Vorsitzender)
Dr. Walter Olthoff

Vorsitzender des Aufsichtsrats:
Prof. Dr. h.c. Hans A. Aukes

Amtsgericht Kaiserslautern, HRB 2313
-----------------------------------------------------------

However, arguably there is no way to know what the namespace is
at the DescribeFeatureType level (GetCapabilities does not tell).
Justin, this is an issue with the new xml parser afaik... any idea?

I don't think its an issue with the parser. The parser is actually passing back a qname with a prefix... so GeoServer should have enough info to figure it out. I think its more a bug with the lookup in the DFT operation. Creating a jira issue:

http://jira.codehaus.org/browse/GEOS-2401

-Justin

Cheers
Andrea

PS: checked, the problem is easily reproduced with the sample
requests GeoServer is shipping with.

--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

Frank Steinmann ha scritto:

Yeah, it does not work because the topp prefix has not been declared,
you miss this attribute in the DescribeFeatureType element:

xmlns:topp="http://www.openplans.org/topp&quot;

Ok, if I add this to the request, it works. Unfortunately it's not me writing the request, it's the WFSDataStore, so I'm not able to change anything there.
Any ideas how to solve the problem?

I'd say the only option is to wait for
http://jira.codehaus.org/browse/GEOS-2401 to be solved...

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.