Yep, that's it. I believe you can get to the catalog quicker this way:

On Thu, Aug 29, 2013 at 11:33 PM, Bessette-Halsema, Dominique E <
dominique.besse...@gdit.com> wrote:

> That worked thanks!****
>
> ** **
>
> *public* *static* SimpleFeature GetFeature(String featurename, String
> namespace, String fid){****
>
>         SimpleFeature feature = *null*;****
>
>         GeoServer geoServer = GeoServerExtensions.*bean*(GeoServer.*class*
> );****
>
>         DefaultWebFeatureService20 wfs = 
> *new*DefaultWebFeatureService20(geoServer);
> ****
>
>         Catalog catalog = wfs.getCatalog();
>

Catalog catalog = GeoServerExtensions.bean("catalog");

Cheers
Andrea


-- 
==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
information.
==

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39  339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to