[Geoserver-users] Problems with WFS

Hi all,
I am using geoserver1.6RC1 with shapfile datasource.
I am trying to get records with WFS,but the result is none.
The request xml is below:
...
  <wfs:Query typeName="sf:SD_JS_E_DGCENTER_500KV_84">
    <ogc:Filter>
       <ogc:PropertyIsEqualTo>
         <ogc:PropertyName>INTERID</ogc:PropertyName>
        <ogc:Literal>0002103620010001000429</ogc:Literal>
       </ogc:PropertyIsEqualTo>
   </ogc:Filter>
  </wfs:Query>
...
And the response xml is below:
*********************************************
<wfs:FeatureCollection numberOfFeatures="0"
timeStamp="2007-11-22T14:58:24.312+08:00"
xsi:schemaLocation="http://www.openplans.org/spearfish
http://172.16.124.174:8080/geoserverRC/wfs?service=WFS&version=1.1.0&request=DescribeFeatureType&typeName=sf:SD_JS_E_DGCENTER_500KV_84
http://www.opengis.net/wfs
http://172.16.124.174:8080/geoserverRC/schemas/wfs/1.1.0/wfs.xsd&quot;&gt;
<gml:featureMembers/>
</wfs:FeatureCollection>
*********************************************

First I can sure that there is one record with the condition.
Second I have tried that query with SDE as the datasource,and the result is
not none.
The response xml is below:
*********************************************
<wfs:FeatureCollection numberOfFeatures="1"
timeStamp="2007-11-22T15:01:34.390+08:00"
xsi:schemaLocation="http://geoserver.sf.net
http://172.16.124.174:8080/geoserverRC/wfs?service=WFS&version=1.1.0&request=DescribeFeatureType&typeName=sde:SDE.SDE.SD_JS_E_DGCENTER_500KV_84
http://www.opengis.net/wfs
http://172.16.124.174:8080/geoserverRC/schemas/wfs/1.1.0/wfs.xsd&quot;&gt;

  <gml:featureMembers>

  <sde:SDE.SDE.SD_JS_E_DGCENTER_500KV_84
gml:id="SDE.SDE.SD_JS_E_DGCENTER_500KV_84.10">

  <gml:boundedBy>

  <gml:Envelope srsName="urn:x-ogc:def:crs:EPSG:6.11.2:4326">
<gml:lowerCorner>34.37901827 117.17969544</gml:lowerCorner>
<gml:upperCorner>34.37901827 117.17969544</gml:upperCorner>
</gml:Envelope>
</gml:boundedBy>
<sde:OBJECTID>0.0</sde:OBJECTID>
<sde:TYPEID>3207.0</sde:TYPEID>
<sde:SYMINDEX>320.0</sde:SYMINDEX>
<sde:USERID>201;11000409481927</sde:USERID>
<sde:USERNAME>彭城发电厂</sde:USERNAME>
<sde:SYMANGLE>0.0</sde:SYMANGLE>
<sde:DISPSYM>0.0</sde:DISPSYM>
<sde:TMPID>0.0</sde:TMPID>
<sde:DIRECTION>0.0</sde:DIRECTION>
<sde:EDATE>0.0</sde:EDATE>
<sde:INTERID>0002103620010001000429</sde:INTERID>
<sde:OUTID> </sde:OUTID>
<sde:POLENUM> </sde:POLENUM>
<sde:XO>0.0</sde:XO>
<sde:YO>5.0E-4</sde:YO>
<sde:RO>0.0</sde:RO>
<sde:FONTNAME>宋体</sde:FONTNAME>
<sde:ANNOCOLOR>3554031.0</sde:ANNOCOLOR>
<sde:ANNOSIZE>12.0</sde:ANNOSIZE>
<sde:FEATURE_FI>0.0</sde:FEATURE_FI>

  <sde:FEATURE>

  <gml:Point>
<gml:pos>34.37901827 117.17969544</gml:pos>
</gml:Point>
</sde:FEATURE>
</sde:SDE.SDE.SD_JS_E_DGCENTER_500KV_84>
</gml:featureMembers>
</wfs:FeatureCollection>
*********************************************

It is so strange.
Thanks in advance of any tips.
--minimeteor

--
View this message in context: http://www.nabble.com/Problems-with-WFS-tf4854760.html#a13891946
Sent from the GeoServer - User mailing list archive at Nabble.com.

minimeteor ha scritto:

Hi all,
I am using geoserver1.6RC1 with shapfile datasource.
I am trying to get records with WFS,but the result is none.
The request xml is below:
...
  <wfs:Query typeName="sf:SD_JS_E_DGCENTER_500KV_84">
    <ogc:Filter>
       <ogc:PropertyIsEqualTo>
         <ogc:PropertyName>INTERID</ogc:PropertyName>
        <ogc:Literal>0002103620010001000429</ogc:Literal>
       </ogc:PropertyIsEqualTo>
   </ogc:Filter>
  </wfs:Query>
...
And the response xml is below:
*********************************************
<wfs:FeatureCollection numberOfFeatures="0"
timeStamp="2007-11-22T14:58:24.312+08:00"
xsi:schemaLocation="http://www.openplans.org/spearfish
http://172.16.124.174:8080/geoserverRC/wfs?service=WFS&version=1.1.0&request=DescribeFeatureType&typeName=sf:SD_JS_E_DGCENTER_500KV_84
http://www.opengis.net/wfs
http://172.16.124.174:8080/geoserverRC/schemas/wfs/1.1.0/wfs.xsd&quot;&gt;
<gml:featureMembers/>
</wfs:FeatureCollection>
*********************************************

Hum, this looks like being either a property name typo or a type mismatch. Can you report the result of calling DescribeFeatureType on the shapefile?
Should look something like:
http://localhost:8080/geoserver/wfs?service=WFS&version=1.1.0&request=DescribeFeatureType&typeName=sf:SD_JS_E_DGCENTER_500KV_84

And then do the same on the ArcSDE source.

Cheers
Andrea

hi Andrea,
thanks for your reply.
The response xml with shapefile is below:
********************************************************
<xsd:schema elementFormDefault="qualified"
targetNamespace="http://www.openplans.org/spearfish&quot;&gt;
<xsd:import namespace="http://www.opengis.net/gml&quot;
schemaLocation="http://172.16.124.174:8080/geoserverRC/schemas/gml/3.1.1/base/gml.xsd&quot;/&gt;
<xsd:complexType name="SD_JS_E_DGCENTER_500KV_84Type">
  <xsd:complexContent>
    <xsd:extension base="gml:AbstractFeatureType">
      <xsd:sequence>
        <xsd:element maxOccurs="1" minOccurs="0" name="the_geom" nillable="true"
type="gml:PointPropertyType"/>
        <xsd:element maxOccurs="1" minOccurs="0" name="OBJECTID" nillable="true"
type="xsd:double"/>
        ...

        <xsd:element maxOccurs="1" minOccurs="0" name="INTERID" nillable="true"
type="xsd:string"/>
        <xsd:element maxOccurs="1" minOccurs="0" name="FEATURE_FI"
nillable="true" type="xsd:double"/>
      </xsd:sequence>
    </xsd:extension>
  </xsd:complexContent>
</xsd:complexType>
<xsd:element name="SD_JS_E_DGCENTER_500KV_84"
substitutionGroup="gml:_Feature" type="sf:SD_JS_E_DGCENTER_500KV_84Type"/>
</xsd:schema>
********************************************************

The response xml with ArcSDE is below:
********************************************************
<xsd:schema elementFormDefault="qualified"
targetNamespace="http://geoserver.sf.net">
<xsd:import namespace="http://www.opengis.net/gml&quot;
schemaLocation="http://172.16.124.174:8080/geoserverRC/schemas/gml/3.1.1/base/gml.xsd&quot;/&gt;
<xsd:complexType name="SDE.SDE.SD_JS_E_DGCENTER_500KV_84Type">
  <xsd:complexContent>
    <xsd:extension base="gml:AbstractFeatureType">
      <xsd:sequence>
        <xsd:element maxOccurs="1" minOccurs="0" name="OBJECTID" nillable="true"
type="xsd:double"/>
                                  ...

        <xsd:element maxOccurs="1" minOccurs="0" name="INTERID" nillable="true"
type="xsd:string"/>
        <xsd:element maxOccurs="1" minOccurs="0" name="FEATURE_FI"
nillable="true" type="xsd:double"/>
        <xsd:element maxOccurs="1" minOccurs="1" name="FEATURE" nillable="false"
type="gml:PointPropertyType"/>
      </xsd:sequence>
    </xsd:extension>
  </xsd:complexContent>
</xsd:complexType>
<xsd:element name="SDE.SDE.SD_JS_E_DGCENTER_500KV_84"
substitutionGroup="gml:_Feature"
type="sde:SDE.SDE.SD_JS_E_DGCENTER_500KV_84Type"/>
</xsd:schema>
********************************************************

regards
minimeteor
--
View this message in context: http://www.nabble.com/Problems-with-WFS-tf4854760.html#a13895926
Sent from the GeoServer - User mailing list archive at Nabble.com.

Hum, this looks like being either a property name typo or a type
mismatch. Can you report the result of calling DescribeFeatureType on
the shapefile?
Should look something like:
http://localhost:8080/geoserver/wfs?service=WFS&version=1.1.0&request=DescribeFeatureType&typeName=sf:SD_JS_E_DGCENTER_500KV_84

And then do the same on the ArcSDE source.

Are we sure that shapefile is using the came conversion tactics as
arcsde. The literal in this case starts with zero, i have a feeling
that the shapefile datastore is converting to an integer and those
leading zeros's are being stripped off.

ArcSDE uses the filter encoding stuff that saul did up which actually
checks the type and does the conversion properly.

Could be wrong, just a hunch though.

-Justin

Cheers
Andrea

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4007,47454069131486491211187!

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org