这个是我自己的WFS服务地址
String url = http://192.168.0.114:8090/geoserver/txh/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=txh%3Adata&maxFeatures=50;
DatasourceConnectionInfo dsInfo = new DatasourceConnectionInfo(); dsInfo.setEngineType(EngineType.OGC); dsInfo.setAlias("OGC_1"); dsInfo.setDriver("WFS"); dsInfo.setServer(url); Datasource ds = m_mapControl.getMap().getWorkspace().getDatasources().open(dsInfo);
获取数据源为null