<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt;color:#000000;"><div>Hi list,<br><br>I want to display a wfs layer but I get only a firebug response.<br>My code:<br>var wfs2 = new OpenLayers.Layer.Vector("WFS_", <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {strategies: [new OpenLayers.Strategy.BBOX()],<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; projection: new OpenLayers.Projection("EPSG:4326"), <br><span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; protocol: new OpenLayers.Protocol.WFS({url: "<a target="_blank" href="http://myserver:81/geoserver/wfs">http://myserver:81/geoserver/wfs</a>", </span><br><span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; featureNS: "<a target="_blank"
 href="http://geonetwork-opensource.org">http://geonetwork-opensource.org</a>",</span><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; featureType: "mylayer", <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; geometryName: "SHAPE", <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; srsName: "EPSG:4326",<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; version: "1.0.0"})<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; });<br><br>This is my respone:<br><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="ProgId" content="Word.Document"><meta name="Generator" content="Microsoft Word 11"><meta name="Originator" content="Microsoft Word 11"><link rel="File-List"
 href="file:///C:%5CDOKUME%7E1%5CSARAH%7E1.SCH%5CLOKALE%7E1%5CTemp%5C1%5Cmsohtml1%5C01%5Cclip_filelist.xml"><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:View>Normal</w:View>
  <w:Zoom>0</w:Zoom>
  <w:HyphenationZone>21</w:HyphenationZone>
  <w:PunctuationKerning/>
  <w:ValidateAgainstSchemas/>
  <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
  <w:IgnoreMixedContent>false</w:IgnoreMixedContent>
  <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
  <w:Compatibility>
   <w:BreakWrappedTables/>
   <w:SnapToGridInCell/>
   <w:WrapTextWithPunct/>
   <w:UseAsianBreakRules/>
   <w:DontGrowAutofit/>
  </w:Compatibility>
  <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
 </w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:LatentStyles DefLockedState="false" LatentStyleCount="156">
 </w:LatentStyles>
</xml><![endif]--><style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {mso-style-parent:"";
        margin:0cm;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:12.0pt;
        font-family:"Times New Roman";
        mso-fareast-font-family:"Times New Roman";}
code
        {font-family:"Courier New";
        mso-ascii-font-family:"Courier New";
        mso-fareast-font-family:"Times New Roman";
        mso-hansi-font-family:"Courier New";
        mso-bidi-font-family:"Courier New";}
@page Section1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;
        mso-header-margin:36.0pt;
        mso-footer-margin:36.0pt;
        mso-paper-source:0;}
div.Section1
        {page:Section1;}
-->
</style><!--[if gte mso 10]>
<style>
 /* Style Definitions */
 table.MsoNormalTable
        {mso-style-name:"Normale Tabelle";
        mso-tstyle-rowband-size:0;
        mso-tstyle-colband-size:0;
        mso-style-noshow:yes;
        mso-style-parent:"";
        mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
        mso-para-margin:0cm;
        mso-para-margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:10.0pt;
        font-family:"Times New Roman";
        mso-ansi-language:#0400;
        mso-fareast-language:#0400;
        mso-bidi-language:#0400;}
</style>
<![endif]--><code><span style="font-size: 10pt;"><span><wfs:featurecollection xmlns="&lt;a target='_blank' href='http://www.opengis.net/wfs'&gt;http://www.opengis.net/wfs&lt;/a&gt;" xmlns:wfs="&lt;a target='_blank' href='http://www.opengis.net/wfs'&gt;http://www.opengis.net/wfs&lt;/a&gt;" xmlns:gml="&lt;a target='_blank' href='http://www.opengis.net/gml'&gt;http://www.opengis.net/gml&lt;/a&gt;" xmlns:gn="&lt;a target='_blank' href='http://geonetwork-opensource.org'&gt;http://geonetwork-opensource.org&lt;/a&gt;" xmlns:xsi="&lt;a target='_blank' href='http://www.w3.org/2001/XMLSchema-instance'&gt;http://www.w3.org/2001/XMLSchema-instance&lt;/a&gt;" xsi:schemalocation="&lt;a target='_blank' href='http://geonetwork-opensource.org'&gt;http://geonetwork-opensource.org&lt;/a&gt;
&lt;a target='_blank' href='http://myserver:81/geoserver/wfs?service=WFS&amp;version=1.0.0&amp;request=DescribeFeatureType&amp;typeName=gn:mylayer'&gt;http://myserver:81/geoserver/wfs?service=WFS&amp;version=1.0.0&amp;request=DescribeFeatureType&amp;typeName=gn:mylayer&lt;/a&gt;
&lt;a target='_blank' href='http://www.opengis.net/wfs'&gt;http://www.opengis.net/wfs&lt;/a&gt; &lt;a target='_blank' href='http://myserver:81/geoserver/schemas/wfs/1.0.0/WFS-basic.xsd'&gt;http://myserver:81/geoserver/schemas/wfs/1.0.0/WFS-basic.xsd&lt;/a&gt;"><gml:boundedby><gml:null>unknown</gml:null></gml:boundedby><gml:featuremember><gn:mylayer fid="mylayer.38456"><gn:area>5413933.112453</gn:area><gn:perimeter>31994.987682</gn:perimeter><gn:wffl_id>2729</gn:wffl_id><gn:o_id>6000555</gn:o_id><gn:oa_id>128</gn:oa_id><gn:datum>20031215</gn:datum><gn:wer>0</gn:wer><gn:erh>128</gn:erh><gn:wfk_fk>202450</gn:wfk_fk><gn:name>mylayer
2450</gn:name><gn:bemerk> </gn:bemerk><gn:bs_fehler>
</gn:bs_fehler><gn:x_coord>3543559.996483</gn:x_coord><gn:y_coord>5386316.298864</gn:y_coord><gn:erst_dat>1998-12-15T00:00:00.819</gn:erst_dat><gn:aend_dat>2005-11-21T00:00:00.819</gn:aend_dat><gn:wfk_prj>
</gn:wfk_prj><gn:wfk_ldat>2005-11-21T00:00:00.819</gn:wfk_ldat><gn:dob_f>6</gn:dob_f><gn:shape><gml:multipolygon srsname="&lt;a target='_blank' href='http://www.opengis.net/gml/srs/epsg.xml#31467'&gt;http://www.opengis.net/gml/srs/epsg.xml#31467&lt;/a&gt;"><gml:polygonmember><gml:polygon><gml:outerboundaryis><gml:linearring><gml:coordinates xmlns:gml="&lt;a target='_blank' href='http://www.opengis.net/gml'&gt;http://www.opengis.net/gml&lt;/a&gt;" decimal="." cs="," ts=" ">3541658.27,5388303.67 3541634.73,5388307.71
3541619.75,5388285.51 3541602.55,5388279.83 3541596.081,5388247.895
3541594.57,5388243.972 3541590.42,5388232.1 3541589.45,5388229.34
3541586.61,5388202.45 3541577.424,5388201.4 3541576.61,5388191.43
3541572.56,5388165.36 3541569.52,5388146.47 3541488.02,5388172.96
3541484,5388174.3 </gml:coordinates></gml:linearring></gml:outerboundaryis></gml:polygon></gml:polygonmember></gml:multipolygon></gn:shape></gn:mylayer></gml:featuremember></wfs:featurecollection></span></span></code>...<br><br>Post:<br><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="ProgId" content="Word.Document"><meta name="Generator" content="Microsoft Word 11"><meta name="Originator" content="Microsoft Word 11"><link rel="File-List" href="file:///C:%5CDOKUME%7E1%5CSARAH%7E1.SCH%5CLOKALE%7E1%5CTemp%5C1%5Cmsohtml1%5C01%5Cclip_filelist.xml"><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:View>Normal</w:View>
  <w:Zoom>0</w:Zoom>
  <w:HyphenationZone>21</w:HyphenationZone>
  <w:PunctuationKerning/>
  <w:ValidateAgainstSchemas/>
  <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
  <w:IgnoreMixedContent>false</w:IgnoreMixedContent>
  <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
  <w:Compatibility>
   <w:BreakWrappedTables/>
   <w:SnapToGridInCell/>
   <w:WrapTextWithPunct/>
   <w:UseAsianBreakRules/>
   <w:DontGrowAutofit/>
  </w:Compatibility>
  <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
 </w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:LatentStyles DefLockedState="false" LatentStyleCount="156">
 </w:LatentStyles>
</xml><![endif]--><style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {mso-style-parent:"";
        margin:0cm;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:12.0pt;
        font-family:"Times New Roman";
        mso-fareast-font-family:"Times New Roman";}
code
        {font-family:"Courier New";
        mso-ascii-font-family:"Courier New";
        mso-fareast-font-family:"Times New Roman";
        mso-hansi-font-family:"Courier New";
        mso-bidi-font-family:"Courier New";}
pre
        {margin:0cm;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:10.0pt;
        font-family:"Courier New";
        mso-fareast-font-family:"Times New Roman";}
@page Section1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;
        mso-header-margin:36.0pt;
        mso-footer-margin:36.0pt;
        mso-paper-source:0;}
div.Section1
        {page:Section1;}
-->
</style><!--[if gte mso 10]>
<style>
 /* Style Definitions */
 table.MsoNormalTable
        {mso-style-name:"Normale Tabelle";
        mso-tstyle-rowband-size:0;
        mso-tstyle-colband-size:0;
        mso-style-noshow:yes;
        mso-style-parent:"";
        mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
        mso-para-margin:0cm;
        mso-para-margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:10.0pt;
        font-family:"Times New Roman";
        mso-ansi-language:#0400;
        mso-fareast-language:#0400;
        mso-bidi-language:#0400;}
</style>
<![endif]--><pre><code><span style="" lang="EN-GB"><span><wfs:getfeature xmlns:wfs="&lt;a target='_blank' href='http://www.opengis.net/wfs'&gt;http://www.opengis.net/wfs&lt;/a&gt;" service="WFS" version="1.0.0" xsi:schemalocation="&lt;a" target="_blank" href="http://www.opengis.net/wfs">http://www.opengis.net/wfs <a target="_blank" href="http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd">http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd</a> </wfs:getfeature></span><br><span><a target="_blank" href="http://geonetwork-opensource.org">http://geonetwork-opensource.org</a> <a target="_blank" href="http://myserver:81/geoserver/wfs/DescribeFeatureType?version=1.0.0&amp;typename=gn:Erholungswald">http://myserver:81/geoserver/wfs/DescribeFeatureType?version=1.0.0&amp;typename=gn:Erholungswald</a>" xmlns:xsi="<a target="_blank"
 href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>"&gt;</span><br><span><wfs:query typename="feature:mylayer" xmlns:feature="&lt;a target='_blank' href='http://geonetwork-opensource.org'&gt;http://geonetwork-opensource.org&lt;/a&gt;"><ogc:filter xmlns:ogc="&lt;a target='_blank' href='http://www.opengis.net/ogc'&gt;http://www.opengis.net/ogc&lt;/a&gt;"><ogc:bbox><ogc:propertyname>SHAPE</ogc:propertyname></ogc:bbox></ogc:filter></wfs:query></span><br><span><gml:box xmlns:gml="&lt;a target='_blank' href='http://www.opengis.net/gml'&gt;http://www.opengis.net/gml&lt;/a&gt;" srsname="EPSG:4326"><gml:coordinates decimal="." cs="," ts=" ">9.2809876852504,48.409352045852 9.7190123147496,48.590647954148</gml:coordinates></gml:box></span><o:p></o:p></span></code></pre><br><br>In fact that I have problems with OpenLayers.Control.GetFeature (to select features) I found out that I need to use other coordinates (Gauß
 Krüger) and only version 1.0.0 (version 1.1.0 gave me exception: <meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="ProgId" content="Word.Document"><meta name="Generator" content="Microsoft Word 11"><meta name="Originator" content="Microsoft Word 11"><link rel="File-List" href="file:///C:%5CDOKUME%7E1%5CSARAH%7E1.SCH%5CLOKALE%7E1%5CTemp%5C1%5Cmsohtml1%5C01%5Cclip_filelist.xml"><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:View>Normal</w:View>
  <w:Zoom>0</w:Zoom>
  <w:HyphenationZone>21</w:HyphenationZone>
  <w:PunctuationKerning/>
  <w:ValidateAgainstSchemas/>
  <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
  <w:IgnoreMixedContent>false</w:IgnoreMixedContent>
  <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
  <w:Compatibility>
   <w:BreakWrappedTables/>
   <w:SnapToGridInCell/>
   <w:WrapTextWithPunct/>
   <w:UseAsianBreakRules/>
   <w:DontGrowAutofit/>
  </w:Compatibility>
  <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
 </w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:LatentStyles DefLockedState="false" LatentStyleCount="156">
 </w:LatentStyles>
</xml><![endif]--><style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {mso-style-parent:"";
        margin:0cm;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:12.0pt;
        font-family:"Times New Roman";
        mso-fareast-font-family:"Times New Roman";}
@page Section1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;
        mso-header-margin:36.0pt;
        mso-footer-margin:36.0pt;
        mso-paper-source:0;}
div.Section1
        {page:Section1;}
-->
</style><!--[if gte mso 10]>
<style>
 /* Style Definitions */
 table.MsoNormalTable
        {mso-style-name:"Normale Tabelle";
        mso-tstyle-rowband-size:0;
        mso-tstyle-colband-size:0;
        mso-style-noshow:yes;
        mso-style-parent:"";
        mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
        mso-para-margin:0cm;
        mso-para-margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:10.0pt;
        font-family:"Times New Roman";
        mso-ansi-language:#0400;
        mso-fareast-language:#0400;
        mso-bidi-language:#0400;}
</style>
<![endif]-->





<p class="MsoNormal"><span style="" lang="EN-GB">ows:Exception
exceptionCode="NoApplicableCode"&gt;<o:p></o:p>&lt;ows:ExceptionText&gt;<o:p></o:p>java.lang.RuntimeException:
Encode<o:p></o:p></span></p>

<p class="MsoNormal"><span style="" lang="EN-GB"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>failed for numberOfFeatures. Cause: Value<o:p></o:p></span></p>

<p class="MsoNormal"><span style="" lang="EN-GB"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&amp;apos;-1&amp;apos; must be
non-negative (0 or<o:p></o:p></span></p>

<p class="MsoNormal"><span style="" lang="EN-GB"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>above). Encode failed for
numberOfFeatures. Cause:<o:p></o:p></span></p>

<p class="MsoNormal"><span style="" lang="EN-GB"><span style="">&nbsp;</span><span style="">&nbsp;&nbsp;&nbsp;&nbsp;
</span>Value &amp;apos;-1&amp;apos; must be non-negative (0<o:p></o:p></span></p>

<p class="MsoNormal"><span style="" lang="EN-GB"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>or above). Value &amp;apos;-1&amp;apos;
must be<o:p></o:p></span></p>

<span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;;" lang="EN-GB"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;;">non-negative (0 or above).</span>. )<br><br>If I use:<br><span>var wfs2 = new OpenLayers.Layer.WFS("WFS_", "<a target="_blank" href="http://myserver:81/geoserver/wfs">http://myserver:81/geoserver/wfs</a>", {typename: "gn:mylayer", maxfeatures: 15},{featureClass: OpenLayers.Feature.WFS});</span><br>there is a request string with false bbox, so I need to reproject. I tried it with srsName and projection but nothing worked. I read something about format instead of featureClass but don´t know how to.<br><br>I work with win server 2003. I put code at root of geoserver.<br>Where are my mistake(s)? Any hints are welcome!<br><br>Thanks!<br>best regards<br>Sarah<br></div>
</div><br>__________________________________________________<br>Do You Yahoo!?<br>Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails. <br>http://mail.yahoo.com </body></html>