<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.19046"></HEAD>
<BODY>
<DIV><SPAN class=278335714-14092011><FONT size=2 face=Arial>Hello
list!</FONT></SPAN></DIV>
<DIV><SPAN class=278335714-14092011><FONT size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=278335714-14092011><FONT size=2 face=Arial>I am having
difficulty adding a WFS layer that was created using GeoServer. i am using
OpenLayers.Layer.Vector with WFS protocol. When I add a layer to
OpenLayers from the WMS equivalent, it is fine. My code is below.
The layer datasource is a shapefile called datazones_2001 which resides in the
RobinTest workspace.</FONT></SPAN></DIV>
<DIV><SPAN class=278335714-14092011><FONT size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=278335714-14092011><FONT size=2
face=Arial>==========================================================</FONT></SPAN></DIV>
<DIV><SPAN class=278335714-14092011>
<P><FONT size=2><FONT face=Arial><FONT color=#0000ff><FONT
color=#0000ff>var</FONT></FONT> wfsLayer = <FONT color=#0000ff><FONT
color=#0000ff>new</FONT></FONT> OpenLayers.Layer.Vector(<FONT
color=#a31515><FONT color=#a31515>"Datazones 2001"</FONT></FONT>,
{</FONT></FONT></P>
<P><FONT face=Arial><FONT size=2><SPAN
class=278335714-14092011>
</SPAN>strategies: [<FONT color=#0000ff><FONT color=#0000ff>new</FONT></FONT>
OpenLayers.Strategy.BBOX()],</FONT></FONT></P>
<P><FONT face=Arial><FONT size=2><SPAN
class=278335714-14092011>
</SPAN>protocol: [<FONT color=#0000ff><FONT color=#0000ff>new</FONT></FONT>
OpenLayers.Protocol.WFS({</FONT></FONT></P>
<P><FONT face=Arial><FONT size=2><SPAN
class=278335714-14092011>
</SPAN>url: <FONT color=#a31515><FONT
color=#a31515>"http://vmfiddich:8081/geoserver/RobinTest/ows"</P></FONT></FONT></FONT></FONT>
<P><FONT face=Arial><FONT size=2><SPAN
class=278335714-14092011> </SPAN><SPAN
class=278335714-14092011>
</SPAN>,featureType: <FONT color=#a31515><FONT
color=#a31515>"RobinTest:datazones_2001"</P></FONT></FONT></FONT></FONT>
<P><FONT face=Arial><FONT size=2><SPAN
class=278335714-14092011> </SPAN><SPAN
class=278335714-14092011> </SPAN>,
featureNS: <FONT color=#a31515><FONT
color=#a31515>"http://vmfiddich:8081/geoserver/data"</P></FONT></FONT></FONT></FONT>
<P><FONT face=Arial><FONT size=2><SPAN
class=278335714-14092011>
</SPAN>, version: <FONT color=#a31515><FONT
color=#a31515>"1.0.0"</P></FONT></FONT></FONT></FONT>
<P><FONT face=Arial><FONT size=2><SPAN
class=278335714-14092011>
</SPAN>})],</FONT></FONT></P>
<P><FONT face=Arial><FONT size=2><SPAN
class=278335714-14092011>
</SPAN>styleMap: <FONT color=#0000ff><FONT color=#0000ff>new</FONT></FONT>
OpenLayers.StyleMap({</FONT></FONT></P>
<P><FONT face=Arial><FONT size=2><SPAN
class=278335714-14092011>
</SPAN>strokeWidth: 3</FONT></FONT></P>
<P><FONT face=Arial><FONT size=2><SPAN
class=278335714-14092011>
</SPAN>,strokeColor: <FONT color=#a31515><FONT
color=#a31515>"#333333"</P></FONT></FONT></FONT></FONT>
<P><FONT face=Arial><FONT size=2><SPAN
class=278335714-14092011>
</SPAN>})</FONT></FONT></P>
<P><FONT size=2 face=Arial>})</FONT></P>
<P><FONT size=2 face=Arial>map.addLayer(wfsLayer);</FONT></P></SPAN></DIV>
<DIV><SPAN class=278335714-14092011><FONT size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=278335714-14092011><FONT size=2
face=Arial>=========================================================</FONT></SPAN></DIV>
<DIV><SPAN class=278335714-14092011><FONT size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=278335714-14092011><FONT size=2 face=Arial>When I preview the
layer in GeoServer as GML it produces valid GML. Any
ideas???</FONT></SPAN></DIV>
<DIV><SPAN class=278335714-14092011><FONT size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=278335714-14092011><FONT size=2 face=Arial>Thanks in
advance,</FONT></SPAN></DIV>
<DIV><SPAN class=278335714-14092011><FONT size=2
face=Arial>Robin</FONT></SPAN></DIV>
<DIV><SPAN class=278335714-14092011><FONT size=2
face=Arial></FONT></SPAN> </DIV>
<TABLE border=0 cellSpacing=0 cellPadding=0>
<TBODY>
<TR>
<TD style="PADDING-LEFT: 0px; PADDING-RIGHT: 6px; PADDING-TOP: 6px"
vAlign=top>
<DIV
style="FONT-FAMILY: Arial, Helvetica, sans-serif; COLOR: #000000; FONT-SIZE: 8pt; FONT-WEIGHT: bold">Robin
BOYLE</DIV>
<DIV
style="FONT-FAMILY: Arial, Helvetica, sans-serif; COLOR: #000000; FONT-SIZE: 8pt; FONT-WEIGHT: normal">IT
Consultant (GIS)</DIV></TD></TR>
<TR>
<TD style="FONT-WEIGHT: bold" align=left><SPAN
style="FONT-FAMILY: Times New Roman,Times,serif; COLOR: #da162e; FONT-SIZE: 12pt">Sopra</SPAN><SPAN
style="FONT-STYLE: italic; FONT-FAMILY: Helvetica,Arial,sans-serif; FONT-SIZE: 7.5pt">
group</SPAN><SPAN
style="FONT-FAMILY: Helvetica,Arial,sans-serif; COLOR: red; FONT-SIZE: 14pt">.</SPAN></TD></TR>
<TR>
<TD
style="BORDER-BOTTOM: #c80a2d 1px solid; PADDING-BOTTOM: 6px; PADDING-LEFT: 0px; PADDING-RIGHT: 6px; BORDER-RIGHT: #c80a2d 1px solid; PADDING-TOP: 6px">
<DIV
style="FONT-FAMILY: Arial, Helvetica, sans-serif; COLOR: #888888; FONT-SIZE: 8pt; FONT-WEIGHT: normal">Orchard
Brae House<BR>30 Queensferry Terrace<BR>Edinburgh EH4 3ER<BR>Phone : (DDI)
+44 (0)131 311 6604 - (Office) +44 (0)131 332 3311<BR>Mob : 07736 664
619<BR><A style="COLOR: #888888; TEXT-DECORATION: none"
href="mailto:rboyle@uk.sopragroup.com">rboyle@uk.sopragroup.com</A> - <A
style="COLOR: #888888; TEXT-DECORATION: none"
href="http://www.sopragroup.co.uk/">www.sopragroup.co.uk</A></DIV></TD></TR></TBODY></TABLE>
<TABLE border=0 cellSpacing=0 cellPadding=0>
<TBODY>
<TR>
<TD
style="PADDING-BOTTOM: 6px; PADDING-LEFT: 0px; PADDING-RIGHT: 6px; FONT-FAMILY: Arial, Helvetica, sans-serif; COLOR: #888888; FONT-SIZE: 8pt; FONT-WEIGHT: normal; PADDING-TOP: 16px"
colSpan=2><FONT size=5 face=Webdings>P</FONT> Before printing, think
about the environment.</TD></TR></TBODY></TABLE>
<DIV> </DIV><PRE>IMPORTANT NOTICE: This message is intended for the addressee only. The content
may be confidential, legally privileged and protected by law. Unauthorised
use, copying or disclosure of any of it may be unlawful. If you are not the
intended recipient please notify the sender and remove it from your system.
Internet emails are not necessarily secure. Although we have taken steps to
ensure this email and attachments are free from any virus, we advise that in
keeping with good computing practice you should ensure they are actually virus
free. The right to monitor email communications through our network is
reserved by us.
Sopra Group Limited (Registered in England, No. 1588948) with Registered
Offices at: Middlesex House, Meadway Technology Park, Rutherford Close,
Stevenage, Hertfordshire, SG1 2EF. VAT No. 366 9784 84.
</PRE></BODY></HTML>