[Geoserver-devel] [jira] Created: (GEOS-3143) DescribeFeatureType for complex types give wrong type names

DescribeFeatureType for complex types give wrong type names
-----------------------------------------------------------

                 Key: GEOS-3143
                 URL: http://jira.codehaus.org/browse/GEOS-3143
             Project: GeoServer
          Issue Type: Improvement
          Components: WFS
    Affects Versions: 2.0.x
            Reporter: Rini Angreani
            Assignee: Rini Angreani
             Fix For: 2.0.x

DescribeFeatureType builds a complex schema content as an output, but the contents are inaccurate.
Eg.
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema elementFormDefault="qualified"
    targetNamespace="http://www.cgi-iugs.org/xml/GeoSciML/2&quot;
    xmlns:Q1="http://www.opengis.net/sampling/1.0&quot;
    xmlns:gml="http://www.opengis.net/gml&quot;
    xmlns:gsml="http://www.cgi-iugs.org/xml/GeoSciML/2&quot; xmlns:xsd="http://www.w3.org/2001/XMLSchema&quot;&gt;
    <xsd:import namespace="http://www.opengis.net/gml&quot; schemaLocation="http://localhost:80/geoserver/schemas/gml/3.1.1/base/gml.xsd&quot;/&gt;
    <xsd:complexType name="MappedFeatureTypeType">
        <xsd:complexContent>
            <xsd:extension base="gml:AbstractFeatureType">
                <xsd:sequence>
                    <xsd:element maxOccurs="2147483647" minOccurs="0"
                        name="metaDataProperty" nillable="false" type="gml:MetaDataPropertyType"/>
                    <xsd:element maxOccurs="1" minOccurs="0"
                        name="description" nillable="false" type="gml:StringOrRefType"/>
                    <xsd:element maxOccurs="2147483647" minOccurs="0"
                        name="name" nillable="false" type="gml:CodeType"/>
                    <xsd:element maxOccurs="1" minOccurs="0"
                        name="boundedBy" nillable="false" type="gml:BoundingShapeType"/>
                    <xsd:element maxOccurs="1" minOccurs="0"
                        name="location" nillable="false" type="gml:LocationPropertyType"/>
                    <xsd:element maxOccurs="1" minOccurs="1"
                        name="positionalAccuracy" nillable="false" type="gsml:CGI_ValuePropertyType"/>
                    <xsd:element maxOccurs="2147483647" minOccurs="1"
                        name="observationMethod" nillable="false" type="gsml:CGI_TermValuePropertyType"/>
                    <xsd:element maxOccurs="1" minOccurs="1"
                        name="samplingFrame" nillable="false" type="Q1:SpatiallyExtensiveSamplingFeaturePropertyType"/>
                    <xsd:element maxOccurs="1" minOccurs="1"
                        name="shape" nillable="false" type="gml:GeometryPropertyType"/>
                    <xsd:element maxOccurs="1" minOccurs="1"
                        name="specification" nillable="false" type="gsml:GeologicFeaturePropertyType"/>
                    <xsd:element maxOccurs="1" minOccurs="0"
                        name="metadata" nillable="false" type="gsml:MetadataPropertyType"/>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="MappedFeature" substitutionGroup="gml:_Feature" type="gsml:MappedFeatureTypeType"/>
</xsd:schema>

whereas the type name is "MappedFeatureType", not "MappedFeatureTypeType".

Ben's idea is to import schema locations provided in the configuration file instead.
eg.
Config file:

<targetTypes>
    <FeatureType>
      <schemaUri>http://schemas.opengis.net/GeoSciML/geosciml.xsd </schemaUri>
    </FeatureType>
</targetTypes>

The new DescribeFeatureType output:

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema elementFormDefault="qualified"
    targetNamespace="http://www.cgi-iugs.org/xml/GeoSciML/2&quot;
    xmlns:gml="http://www.opengis.net/gml&quot;
    xmlns:gsml="http://www.cgi-iugs.org/xml/GeoSciML/2&quot; xmlns:xsd="http://www.w3.org/2001/XMLSchema&quot;&gt;
    <xsd:import namespace="http://www.opengis.net/gml&quot; schemaLocation="http://localhost:80/geoserver/schemas/gml/3.1.1/base/gml.xsd&quot;/&gt;
    <xsd:import namespace="http://www.cgi-iugs.org/xml/GeoSciML/2&quot; schemaLocation="http://schemas.opengis.net/GeoSciML/geosciml.xsd&quot;/&gt;
</xsd:schema>

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira