gml: prefix in returned GML2 features for SDE layers

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

gml: prefix in returned GML2 features for SDE layers

John Fletcher
I am receiving an error when attempting to access features from a
geoserver WFS using geotools.  Using the WFSDemo grabbed from the
geotools samples page on a shapefile-backed featureType works fine, but
using the same code on an SDE-backed featureType gives the following
error (abridged):

java.io.IOException: org.xml.sax.SAXException: Could not find element
handler for http://www.opengis.net/gml : SDE.SDE.TIGER_COUNTY as a child
of FeatureAssociationType.
        at org.geotools.xml.gml.FCBuffer.hasNext(FCBuffer.java:304)
        at
org.geotools.data.wfs.WFSFeatureReader.loadElement(WFSFeatureReader.java
:164)
        at
org.geotools.data.wfs.WFSFeatureReader.hasNext(WFSFeatureReader.java:153
)
        at
org.geotools.data.wfs.WFSDataStore.getFeatureReader(WFSDataStore.java:74
7)
... etc

This seems to be a similar problem to that described here:
http://www.mail-archive.com/geotools-gt2-users@.../msg
00478.html

I am posting this to the geoserver site as I think it may relate to the
GML produced by geoserver.  I'm not 100% sure if the classes which do
that are part of the geotools project or the geoserver project, so I
apologize if this is posted to the wrong forum.  I have noticed that
whenever I request features as GML from geoserver (using 1.3.0 RC7 for
testing here) which are backed by SDE, I see a gml: prefix on the
elements where I would expect to see the configured geoserver namespace.

As an example, I issued the following GetFeatures request for the
included tasmania_cities shapefile data in the topp namespace:
http://localhost:8080/geoserver/wfs/GetFeature?typename=topp:tasmania_ci
ties&version=1.0.0&maxfeatures=1
And I received the following response (abridged):
...
<gml:featureMember>
  <topp:tasmania_cities fid="tasmania_cities.1">
    <topp:the_geom>
      <gml:MultiPoint
srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
        <gml:pointMember>
... etc

I set up an SDE data source and featureType using the same geoserver
instance in a new 'prod' namespace, and issued the following GetFeatures
request:
http://localhost:8080/geoserver/wfs/GetFeature?typename=prod:SDE.SDE.TIG
ER_COUNTY&version=1.0.0&maxfeatures=1
And I received the following response (abridged):
...
<gml:featureMember>
  <gml:SDE.SDE.TIGER_COUNTY fid="SDE.SDE.TIGER_COUNTY.1">
    <gml:OBJECTID>1</gml:OBJECTID>
    <gml:SHAPE>
      <gml:MultiPolygon
srsName="http://www.opengis.net/gml/srs/epsg.xml#32119">
        <gml:polygonMember>
... etc

I would expect to see 'prod' as the namespace for the featureType name
and for all of the attributes, instead of 'gml'.  This observation with
my test instance is consistent with observations I have made with other
SDE-backed featureTypes through geoserver (Oracle and SQL Server have
been tested).  Has anyone else experienced this, and can anyone confirm
whether or not this is the cause of the the error I'm seeing from
geotools?  I did a little poking around in the code, but it's a bit like
going down the rabbit-hole for the uninitiated so I didn't take it too
far...

Thanks in advance.

John


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
<a href="http://ads.osdn.com/?ad_idv37&alloc_id865&op=click">http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users