<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">Dear Mapserver people,<DIV><BR class="khtml-block-placeholder"></DIV><DIV>I am trying to serve some data by WFS. I want to get the data directly out of a mysql database</DIV><DIV>table.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I have read the wiki , etc and searched around on the web for some answers but nothing </DIV><DIV>seems to help. Here is my layer:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>LAYER</DIV><DIV> NAME "sites"</DIV><DIV> METADATA</DIV><DIV> "wfs_title" "sites" ## REQUIRED</DIV><DIV> "gml_include_items" "all" ## Optional (serves all attributes for layer)</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV> END</DIV><DIV> STATUS ON </DIV><DIV> TYPE POINT</DIV><DIV> DUMP TRUE</DIV><DIV> CONNECTIONTYPE OGR </DIV><DIV> CONNECTION "/var/www/docs/sites.ovf"</DIV><DIV> DATA "sites"</DIV><DIV> CLASS</DIV><DIV> STYLE</DIV><DIV> COLOR 0 0 0</DIV><DIV> END #style</DIV><DIV> END #class</DIV><DIV>END #layer</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Here is my ovf file:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><OGRVRTDataSource></DIV><DIV> <OGRVRTLayer name="sites"></DIV><DIV> <SrcDataSource>MYSQL:mydb,user=myuser,password=mypasswd,port=3306,tables</DIV><DIV>=sites</SrcDataSource></DIV><DIV> <SrcSQL>SELECT * FROM sites</SrcSQL></DIV><DIV> <GeometryType>wkbPoint</GeometryType></DIV><DIV> <GeometryField encoding="PointFromColumns" x="latitude" y="longitude"/></DIV><DIV> </OGRVRTLayer></DIV><DIV></OGRVRTDataSource></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Here is my output (view sourced)</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><?xml version='1.0' encoding="ISO-8859-1" ?></DIV><DIV><wfs:FeatureCollection</DIV><DIV> xmlns:ms="<A href="http://mapserver.gis.umn.edu/mapserver">http://mapserver.gis.umn.edu/mapserver</A>"</DIV><DIV> xmlns:wfs="<A href="http://www.opengis.net/wfs">http://www.opengis.net/wfs</A>"</DIV><DIV> xmlns:gml="<A href="http://www.opengis.net/gml">http://www.opengis.net/gml</A>"</DIV><DIV> xmlns:ogc="<A href="http://www.opengis.net/ogc">http://www.opengis.net/ogc</A>"</DIV><DIV> xmlns:xsi="<A href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</A>"</DIV><DIV> xsi:schemaLocation="<A href="http://www.opengis.net/wfs">http://www.opengis.net/wfs</A> <A href="http://schemas.opengeospatial.net/wfs/1.0.0/WFS-basic.xsd">http://schemas.opengeospatial.net/wfs/1.0.0/WFS-basic.xsd</A> </DIV><DIV> <A href="http://mapserver.gis.umn.edu/mapserver">http://mapserver.gis.umn.edu/mapserver</A> <A href="http://somewhere/cgi-bin/mapserv-4.8.3?SERVICE=WFS&VERSION=1.0.0&REQUEST=DescribeFeatureType&TYPENAME=sites&OUTPUTFORMAT=XMLSCHEMA">http://somewhere/cgi-bin/mapserv-4.8.3?SERVICE=WFS&VERSION=1.0.0&REQUEST=DescribeFeatureType&TYPENAME=sites&OUTPUTFORMAT=XMLSCHEMA</A>"></DIV><DIV> <gml:boundedBy></DIV><DIV> <gml:null>missing</gml:null></DIV><DIV> </gml:boundedBy></DIV><DIV></wfs:FeatureCollection></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>OGRINFO says everything is ok:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>>$ ./ogrinfo sites.ovf </DIV><DIV>ERROR 4: Update access not supported for VRT datasources.</DIV><DIV>Had to open data source read-only.</DIV><DIV>INFO: Open of `sites.ovf'</DIV><DIV>using driver `VRT' successful.</DIV><DIV>1: sites (Point)</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>and </DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>>$ ./ogrinfo sites.ovf -al</DIV><DIV>ERROR 4: Update access not supported for VRT datasources.</DIV><DIV>Had to open data source read-only.</DIV><DIV>INFO: Open of `sites.ovf'</DIV><DIV>using driver `VRT' successful.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Layer name: sites</DIV><DIV>Geometry: Point</DIV><DIV>Feature Count: 8</DIV><DIV>Extent: (45.916000, -129.985000) - (60.900000, -25.000000)</DIV><DIV>Layer SRS WKT:</DIV><DIV>(unknown)</DIV><DIV>id: Integer (20.0)</DIV><DIV>sample_id: String (255.0)</DIV><DIV>latitude: Real (22.0)</DIV><DIV>longitude: Real (22.0)</DIV><DIV>depth: Real (22.0)</DIV><DIV>temp: Real (22.0)</DIV><DIV>cell_conc: Real (22.0)</DIV><DIV>description: String (255.0)</DIV><DIV>notes: String (0.0)</DIV><DIV>date_collected: DateTime (0.0)</DIV><DIV>OGRFeature(sites):2</DIV><DIV> id (Integer) = 2</DIV><DIV> sample_id (String) = 53</DIV><DIV> latitude (Real) = 58</DIV><DIV> longitude (Real) = -29</DIV><DIV> depth (Real) = 1400</DIV><DIV> temp (Real) = 4</DIV><DIV> cell_conc (Real) = 64000</DIV><DIV> description (String) = (Labrador Sea Water), Eastern Atlantic Basin</DIV><DIV> notes (String) = The water masses were identified based on the Sal, Temp characteristics.</DIV><DIV> date_collected (DateTime) = 2002/09/16 0:00:00</DIV><DIV> POINT (58.299999999999997 -29.132999999999999 0)</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>and a curl result returns:</DIV><DIV> curl <A href="http://somewhere/cgi-bin/mapserv-4.8.3?map=/var/www/docs/sites_wfs.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=getfeature&TYPENAME=sites">http://somewhere/cgi-bin/mapserv-4.8.3?map=/var/www/docs/sites_wfs.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=getfeature&TYPENAME=sites</A></DIV><DIV>[1] 18085</DIV><DIV>[2] 18086</DIV><DIV>[3] 18087</DIV><DIV>[4] 18088</DIV><DIV>$ <HTML></DIV><DIV><HEAD><TITLE>MapServer Message</TITLE></HEAD></DIV><DIV><!-- MapServer version 4.8.3 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=PDF OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=THREADS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE --></DIV><DIV><BODY BGCOLOR="#FFFFFF"></DIV><DIV>mapserv(): Web application error. No template provided. <br></DIV><DIV></BODY></HTML></DIV><DIV>[1] Done curl <A href="http://somewhere/cgi-bin/mapserv-4.8.3?map=/var/www/docs/sites_wfs.map">http://somewhere/cgi-bin/mapserv-4.8.3?map=/var/www/docs/sites_wfs.map</A></DIV><DIV>[2] Done SERVICE=WFS</DIV><DIV>[3]- Done VERSION=1.0.0</DIV><DIV>[4]+ Done REQUEST=getfeature</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>What am I doing wrong ? </DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Best regards,</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Phil Neal</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV>Phillip Neal</DIV><DIV><A href="mailto:pneal@mbl.edu">pneal@mbl.edu</A></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><FONT class="Apple-style-span" color="#333333" face="Trebuchet MS" size="3"><SPAN class="Apple-style-span" style="font-size: 13px;; color: rgb(51, 51, 51); font-family: Trebuchet MS; "><SPAN class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: Trebuchet MS; font-size: 13px; ">"An ocean without its unnamed monsters would be like a completely dreamless sleep."</SPAN></SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" color="#333333" face="Trebuchet MS" size="3"><SPAN class="Apple-style-span" style="font-size: 13px;; color: rgb(51, 51, 51); font-family: Trebuchet MS; "><BR class="khtml-block-placeholder"></SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" color="#333333" face="Trebuchet MS" size="3"><SPAN class="Apple-style-span" style="font-size: 13px;; color: rgb(51, 51, 51); font-family: Trebuchet MS; "><SPAN class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: Trebuchet MS; font-size: 13px; ">John Steinbeck - 'The Log from the Sea of Cortez'</SPAN></SPAN></FONT></DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR class="Apple-interchange-newline"></SPAN> </DIV><BR></DIV></BODY></HTML>