Hi,
I’ve been playing around with directly acquiring a
layer from my WMS server using the following code:
URL1 = new URL( “http://localhost:8080/geoserver/wms?lService=WMS&Version=1.1.1&Request=GetCapabilities”
)
URL2 = new URL( “http://localhost:8080/geoserver/wms?lService=WMS&Version=1.1.1&Request=GetCapabilities#tiger:tiger_roads”
)
CatalogPlugin catalog = CatalogPlugin.getDefault();
IServiceFactory factory = catalog.getServiceFactory();
IResolve resolve1 = factory.acquire(URL1);
IResolve resolve2 = factory.acquire(URL2);
According to the Geotools documentation, URL2 should resolve
directly to the tiger:tiger_roads layer. However, when I step through the
code with a debugger, resolve1 and resolve2 are both instances of
WMSServiceImpl. If I do resolve1.members(monitor) and
resolve2.members(monitor), they both return the same list of every layer
deployed on my Geoserver. How can I directly retrieve the tiger:tiger_roads
layer using something similar to URL2? I don’t want to iterate through
every layer looking for the 1 layer I’m interested in.
Thanks,
Joe