On 24/07/2010 23:25, Tamas Szekeres wrote:


2010/7/24 geographika <[email protected] <mailto:[email protected]>>


    Has anyone successfully created a WFS service using the SQL Server
    2008 plug in?

    I followed the steps at http://mapserver.org/ogc/wfs_server.html,
    and get no errors when running a
    SERVICE=WFS&VERSION=1.0.0&REQUEST=getcapabilities request.

    However when trying to retrieve the features using a feature
    request
    (&SERVICE=WFS&VERSION=1.0.0&REQUEST=getfeature&TYPENAME=RoadsWFS)
    I don't get any GML. There are no errors in the MapServer log
    file. I don't believe this GET request requires a proxy and I get
    the same result on the server itself.

    I ran SQL Server profiler and the results and geometry are being
    correctly queried from the database. A shortened version of the
    SQL is below (several attributes removed):

    SELECT convert(varchar(max),
    RoadID),GEOM.STAsBinary(),convert(varchar(20), ROADID) from
    RoadNetwork2 WHERE
    GEOM.STIntersects(Geometry::STGeomFromText('POLYGON((-710069
    7038976,-683731 7038976,-683731 7059350,-710069 7059350,-710069
    7038976))',3785)) = 1

    I think there may be an issue due to none of the columns having names.



Hi

I've just tried with the recent version of the mssql2008 driver and it works for me. Which mapserver version are you testing with? I would recommend to do a test with one of the daily build packages from: http://vbkto.dyndns.org/sdk/

If your problem still persists, feel free to open a ticket, attach your mapfile, sample requests and test data (ie. a shapefile) to be uploaded to the mssql2008 server.

Best regards,

Tamas


Thanks Tamas for your reply.
I am currently using a 5.6.1 build (x64) of MapServer taken from your site - thanks also for this vital site. I will start to try and recreate the issue from the simplest data and map file as possible, but I just wanted to check that the issue is not due to the SQL statement not having alias names. When you run your requests do the columns have names? When I run the SQL in the management studio all fields are titled (No Column Name). However the correct data and geometry is returned.
In my METADATA for the layer I've tried using

"gml_include_items" "all"
and also setting alias names for fields e.g.
"gml_RoadID_alias"  "OID" but with no luck.

Regards,

Seth

http://geographika.co.uk


_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to