We've been doing WFS cleanups for the last while, and have fixed a large
number of issues, and also found others:
- Our WFS support is much stronger in the ongoing 1.1RC series than in 1.0
- The Mapserver WFS support does some illegal things in versions prior
to 4.8, which makes support spotty for ealier versions (some feature
types work, others don't, some things work depending on the kind of
backend you have, others don't, etc).
The sad truth about WFS so far is that it seems to be quite hard for WFS
servers to obey the schema/instance contract... they advertise different
things in the DescribeFeatureType schema than they actually provide in
the GetFeature instance. We have been turning these kinds of things up
in commercial WFS servers too -- a complex specification takes no prisoners.
P.
Ryan Ollerenshaw wrote:
When trying to add a Web Feature Server to uDIG i am getting a
IllegalArgumentException.
when i post the same URL into the web browser the XML document that is
returned looks just fine, no warnings.
any ideas on what the problem could be, i havent seen anything posted
anywhere saying that uDIG has any problems with WFS. I can dispaly the
same features just fine in uDIG using a WMS
the URL
http://neuron/cgi-bin/mapserv?map=../html/mapserver/htdocs/wfs_service.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=hrsc_nd&
The error:
java.lang.IllegalArgumentException:
at org.eclipse.core.internal.runtime.Assert.isLegal(Assert.java:58)
at org.eclipse.core.internal.runtime.Assert.isLegal(Assert.java:42)
at org.eclipse.core.runtime.Status.setMessage(Status.java:174)
at org.eclipse.core.runtime.Status.<init>(Status.java:81)
at
net.refractions.udig.catalog.internal.wfs.WfsPlugin.log(WfsPlugin.java:110)
at
net.refractions.udig.catalog.internal.wfs.UDIGWFSDataStoreFactory.createNewDataStore(UDIGWFSDataStoreFactory.java:96)
at
org.geotools.data.wfs.WFSDataStoreFactory.createDataStore(WFSDataStoreFactory.java:108)
at
net.refractions.udig.catalog.internal.wfs.WFSServiceImpl.getDS(WFSServiceImpl.java:143)
at
net.refractions.udig.catalog.internal.wfs.WFSServiceImpl.members(WFSServiceImpl.java:95)
at
net.refractions.udig.catalog.internal.ui.ConnectionPage$1.run(ConnectionPage.java:133)
at
org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:346)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:291)
at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:830)
at
net.refractions.udig.catalog.internal.ui.ConnectionPage.getNextPage(ConnectionPage.java:147)
at
org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDialog.java:747)
at
org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:345)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:556)
at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3125)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2758)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1699)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:367)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
at
net.refractions.udig.internal.ui.UDIGApplication.run(UDIGApplication.java:28)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:163)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334)
at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
at org.eclipse.core.launcher.Main.run(Main.java:973)
at org.eclipse.core.launcher.Main.main(Main.java:948)
The MapFile:
MAP
IMAGETYPE PNG
EXTENT -180 -90 180 90
#EXTENT -350878.81 -9890271.86 350878.81 9890271.86
SIZE 600 500
SHAPEPATH "../my_data/"
IMAGECOLOR 255 255 255
WEB
IMAGEPATH "/tmp/ms_tmp/"
IMAGEURL "/ms_tmp/"
METADATA
wfs_title "WFS test"
wfs_name "WFS test"
wfs_srs "EPSG:4326"
wfs_onlineresourc
"http://localhost/cgi-bin/mapserv?map=../html/mapserver/htdocs/wfs_service.map&"
END
END
PROJECTION
"init=epsg:4326"
END
LAYER
NAME "hrsc_nd"
#STATUS DEFAULT
STATUS off
TYPE POLYGON
PROJECTION
"init=epsg:4326"
END
DUMP TRUE
CONNECTIONTYPE POSTGIS
CONNECTION "host=localhost dbname=mars_db user=postgres"
DATA "the_geom FROM hrsc0001_footprints_sep05_nd"
METADATA
wfs_title "hrsc_nd"
wfs_srs "EPSG:4326"
wfs_onlineresourc
"http://localhost/cgi-bin/mapserv?map=../html/mapserver/htdocs/wfs_service.map&"
gml_include_items "all" ## Optional (serves all attributes for
layer) END
CLASS
NAME "hrsc_nd"
STYLE
COLOR 200 255 0
OUTLINECOLOR 120 120 120
END
END
END # layer
END # of map file