Sadly this is not really possible because the params are used to recreate the datastore after a restart. If you do that then the "normal" udig WFS service will be used after reboot. As such we have not provided support. Either changes to uDig are required or you need to add a new service plugin.
Jesse 2011/6/9 Joaquín Rodriguez-Guerra Urcelay <[email protected]> > Hello list, > > I know two ways to add a wfs layer into udig, importing from the catalog > view a Web Feature Server, or a Geotools Datastore-> Web Feature Server, > right? > Programatically I do it like this: > > url = new URL(MAPSERVER_GETCAPABILITIES_WFS); > java.util.Map<String, Serializable> params = new > HashMap<String, Serializable>(); > > params.put(org.geotools.data.wfs.WFSDataStoreFactory.URL.key,url); > > > params.put(org.geotools.data.wfs.WFSDataStoreFactory.WFS_STRATEGY.key,"mapserver"); > handle = catalog.acquire(params, new NullProgressMonitor()); > > But If I obtain the IService using the acquire method, then I am getting a > WFSServiceImpl. My question is... would it be possible to add a WFS service > using the geotools WFS datastore instead of udig's WFS?? The reason is that > Jody improved geotools WFS datastore to accpet the WFS_STRATEGY parameter to > have a better support of mapserver, and this parameter is not accepted by > udig's datastore. I tried using createService, expecting maybe to have > different IServices (udig's and geotools's), but I only obtain udig's > > IServiceFactory serviceFactory = > CatalogPlugin.getDefault().getServiceFactory(); > for( IService service : serviceFactory.createService( params > ) ){ > try { > IServiceInfo info = service.getInfo( null ); // > try connecting to make sure the service works > System.out.println("SERVICIO "+ > service.toString()); > } > catch (IOException couldNotConnect ){ > } > } > > Thanks! > > Regards, > > Joauqín > > ______________________ > This message including any attachments may contain confidential > information, according to our Information Security Management System, > and intended solely for a specific individual to whom they are addressed. > Any unauthorised copy, disclosure or distribution of this message > is strictly forbidden. If you have received this transmission in error, > please notify the sender immediately and delete it. > > ______________________ > Este mensaje, y en su caso, cualquier fichero anexo al mismo, > puede contener informacion clasificada por su emisor como confidencial > en el marco de su Sistema de Gestion de Seguridad de la > Informacion siendo para uso exclusivo del destinatario, quedando > prohibida su divulgacion copia o distribucion a terceros sin la > autorizacion expresa del remitente. Si Vd. ha recibido este mensaje > erroneamente, se ruega lo notifique al remitente y proceda a su borrado. > Gracias por su colaboracion. > > ______________________ > > _______________________________________________ > User-friendly Desktop Internet GIS (uDig) > http://udig.refractions.net > http://lists.refractions.net/mailman/listinfo/udig-devel >
_______________________________________________ User-friendly Desktop Internet GIS (uDig) http://udig.refractions.net http://lists.refractions.net/mailman/listinfo/udig-devel
