[Mapserver-users] Displaying WFS data from a GeoServer/OracleSpatial server

Jeff McKenna jmckenna at dmsolutions.ca
Thu Feb 12 18:21:32 EST 2004


Thanks for replying Bart and Tom.

I tried your mapfile Bart and I still got the same junk error...so then I wondered if it
is a mapserver version issue of mine, so I got the lastest version and voila my own
mapfile works.  I was using a build from October...what had changed since then that
affected this WFS call???  

Anyway problem solved, and thanks guys for helping me.

jeff


  



On Feb 12, Bart van den Eijnden <bartvde at xs4all.nl> wrote:
> 
> Hi Jeff,
> 
> if I use the following MAP file I get the correct GML in my temp directory 
> and an Image. Note that I use a MAXFEATURES to prevent getting a timeout.
> 
> BTW Try removing your METADATA and see if that works, or fill in the 
> complete metadata (including at least wfs_service, wfs_typename).
> 
> NAME "sample client"
> STATUS ON
> SIZE 400 300
> #SYMBOLSET "../etc/symbols.sym"
> EXTENT 76.1 -69.4 76.4 -69.2
> UNITS METERS
> SHAPEPATH "../data"
> IMAGECOLOR 255 255 255
> #FONTSET "../etc/fonts.txt"
> IMAGETYPE PNG24
> 
> WEB
>    IMAGEPATH "/ms4w/tmp/ms_tmp/"
>    IMAGEURL "/ms_tmp/"
> END
> 
> PROJECTION
>    "init=epsg:4326"
> END
> 
> LAYER
>    NAME popplace
>    CONNECTIONTYPE WFS
>    CONNECTION 
> "<a
href='http://aadc-maps.aad.gov.au/geoserver/wfs?VERSION=1.0.0&amp;REQUEST=GetFeature&amp;TYPENAME=topp:ICEBERG_PY&amp;MAXFEATURES=100&#34;'>http://aadc-maps.aad.gov.au/geoserver/wfs?VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=topp:ICEBERG_PY&MAXFEATURES=100"</a>
>    TYPE POLYGON
>    STATUS ON
> 
>    PROJECTION
>      "init=epsg:4326"
>    END
>    CLASS
>      NAME "test"
>      COLOR 255 0 0
>    END
> END
> 
> END
> 
> Best regards,
> Bart
> 
> On Thu, 12 Feb 2004 14:58:25 -0500 (EST), Jeff McKenna 
> <jmckenna at dmsolutions.ca> wrote:
> 
> > (with a subject line, sorry)
> > -----
> >
> > Hello,
> >
> > I am trying to view a WFS layer in MapServer from a server that is 
> > publishing their data
> > using GeoServer (and they are storing their data in Oracle).  When I try 
> > their GetFeature
> > request in a browser valid GML is returned
> > (<a
href='http://aadc-maps.aad.gov.au/geoserver/wfs?VERSION=1.0.0&amp;REQUEST=GetFeature&amp;TYPENAME=topp:ICEBERG_PY'>http://aadc-maps.aad.gov.au/geoserver/wfs?VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=topp:ICEBERG_PY</a>).
> >  I have verified that the GML is valid with the ogrinfo utility, as well 
> > as converting the
> > GML to a shapefile using the OGR2OGR utility...it looks good.  But when 
> > I try to access
> > the layer with MapServer I get a lovely MapServer error:
> > [MapServer Error]: msWFSLayerWhichShapes(): WFS request produced 
> > unexpected output (junk?)
> > for layer aad_wfs
> >
> > In my IMAGEPATH directory the GML file that is produced looks like this:
> >
> > <?xml version="1.0" ?>
> > <ServiceExceptionReport
> >    version="1.2.0"
> >    xmlns="<a href='http://www.opengis.net/ogc&#34;'>http://www.opengis.net/ogc"</a>
> >    xmlns:xsi="<a
href='http://www.w3.org/2001/XMLSchema-instance&#34;'>http://www.w3.org/2001/XMLSchema-instance"</a>
> >    xsi:schemaLocation="<a href='http://www.opengis.net/ogc'>http://www.opengis.net/ogc</a>
> > <a
href='http://localhost:8080/geoserver/data/capabilities/wfs/1.0.0/OGC-exception.xsd&#34;&gt;'>http://localhost:8080/geoserver/data/capabilities/wfs/1.0.0/OGC-exception.xsd"></a>
> >    <ServiceException>
> >       problem with FeatureResults: 
> > org.geotools.data.DataSourceException: Could not count
> > 	at 
> > org.geotools.data.jdbc.JDBCFeatureSource.count(JDBCFeatureSource.java:402)
> > 	at 
> > org.geotools.data.jdbc.JDBCFeatureSource$1.getCount(JDBCFeatureSource.java:218)
> > 	at 
> > org.vfny.geoserver.responses.wfs.FeatureResponse.execute(FeatureResponse.java:307)
> > 	at 
> > org.vfny.geoserver.responses.wfs.FeatureResponse.execute(FeatureResponse.java:193)
> > 	at 
> > org.vfny.geoserver.servlets.AbstractService.doService(AbstractService.java:295)
> > 	at 
> > org.vfny.geoserver.servlets.AbstractService.doGet(AbstractService.java:202)
> > 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> > 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > 	at 
> > org.vfny.geoserver.servlets.wfs.WfsDispatcher.doResponse(WfsDispatcher.java:172)
> > 	at 
> > org.vfny.geoserver.servlets.wfs.WfsDispatcher.doGet(WfsDispatcher.java:123)
> > 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> > 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > 	at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
> > 	at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
> > 	at 
> > jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:252)
> > 	at 
> > jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:527)
> > 	at jrun.servlet.http.WebService.invokeRunnable(WebService.java:168)
> > 	at 
> > jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:451)
> > 	at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
> > Caused by: java.sql.SQLException: ORA-00921: unexpected end of SQL 
> > command
> >
> > 	at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
> > 	at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
> > 	at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:579)
> > 	at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1894)
> > 	at 
> > oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:831)
> > 	at 
> > oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2496)
> > 	at 
> > oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2840)
> > 	at 
> > oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:623)
> > 	at 
> > org.geotools.data.jdbc.JDBCFeatureSource.count(JDBCFeatureSource.java:391)
> > 	... 18 more
> >    </ServiceException>
> > </ServiceExceptionReport>
> >
> > The mapfile that I'm using is as follows:
> >
> >
> > NAME AAD_WFS
> > STATUS ON
> > SIZE 400 300
> > SYMBOLSET ./etc/symbols.sym
> > EXTENT 60 -90 160 0
> > UNITS DD
> > #SHAPEPATH "C:/GCRC/data/antarctica/scale0/st17_20"
> > IMAGECOLOR 255 255 255
> > FONTSET ./etc/fonts.txt
> >
> > WEB
> >   IMAGEPATH "c:/tmp/ms_tmp/"
> >   IMAGEURL "c:/ms_tmp/"
> >   METADATA
> >   END
> >   LOG "c:/GCRC/www/add-demo/htdocs/ms_error.txt"
> > END
> >
> > PROJECTION
> >   "init=epsg:4326"
> > END
> >
> >
> > LAYER
> >     NAME "aad_wfs"
> >     TYPE POLYGON
> >     CONNECTIONTYPE WFS
> >     CONNECTION
> > "<a
href='http://aadc-maps.aad.gov.au/geoserver/wfs?VERSION=1.0.0&amp;REQUEST=GetFeature&amp;TYPENAME=topp:ICEBERG_PY&#34;'>http://aadc-maps.aad.gov.au/geoserver/wfs?VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=topp:ICEBERG_PY"</a>
> >     PROJECTION
> >       "init=epsg:8307"
> >     END
> >     METADATA
> >       "wfs_connectiontimeout" "60"
> >       "wfs_latlonboundingbox" "60 -90 160 0"
> >     END
> >     STATUS ON
> >     DEBUG TRUE
> >     CLASS
> >       NAME "test"
> >       COLOR 255 0 0
> >     END
> > END
> >
> > The WFS server in question is actually the Australian Antarctic Division 
> > (AAD), and we are
> > trying to make their data available to other partners around the world.  
> > Is it something
> > on their side that is causing MapServer to blow up??
> > From a GetCapabilities request we can see that the data is in 8307 EPSG, 
> > which is not
> > included in the standard EPSG file....and I think that 8307 is the same 
> > as generic
> > lat/long....so I added an 8307 code in my EPSG file with the same params 
> > as 4326 (is this
> > the problem???).
> >
> > More questions: from comparing the GML returned in the browser with 
> > other valid GML that
> > MapServer CAN display we've noticed that the AAD server GML states 
> > <gml:Box
> > srsName="<a
href='http://www.opengis.net/gml/srs/epsg.xml#8307&#34;&gt;'>http://www.opengis.net/gml/srs/epsg.xml#8307"></a>
whereas others 
> > say <gml:Box
> > srsName="EPSG:9810">...is MapServer having a problem with that URL????
> >
> > Any help is greatly appreciated.
> >
> > jeff
> >
> >
> >
> > ---
> > Jeff McKenna
> > Research Assistant
> > Geomatics and Cartographic Research Centre
> > Carleton University
> > Ottawa, ON
> > Canada
> >
> >
> >
> >
> >
> >
> >
> > _______________________________________________
> > Mapserver-users mailing list
> > Mapserver-users at lists.gis.umn.edu
> > <a
href='http://lists.gis.umn.edu/mailman/listinfo/mapserver-users'>http://lists.gis.umn.edu/mailman/listinfo/mapserver-users</a>
> >
> 
> 
> 
> -- 
>   
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> <a
href='http://lists.gis.umn.edu/mailman/listinfo/mapserver-users'>http://lists.gis.umn.edu/mailman/listinfo/mapserver-users</a>
> 



More information about the mapserver-users mailing list