[ome-devel] OMERO Spring
josh.moore at gmx.de
josh.moore at gmx.de
Wed Jun 4 11:38:10 BST 2008
Hi Simon.
The key entry point to the client library is
ome.system.ServiceFactory, not the OmeroContext, which is more the
underlying substrate that everything runs on.
A quick introduction to using the client library is available at:
https://trac.openmicroscopy.org.uk/omero/wiki/OmeroClientLibrary
Would you mind telling me how you got this far with
getClientContext()? It's actually almost exactly correct, so I'm
interested to know if there's some documentation lying around which
pointed you in the nearly right direction but needs to be updated.
In any event, let us know what else you need to get going. Though the
OmeroClientLibrary page does point to one other example, there are any
number of examples of real working code under:
https://trac.openmicroscopy.org.uk/omero/browser/trunk/components/client/test/ome/client/itests
Best wishes,
~Josh
Simon Kainz writes:
> I'm trying to integrate the client library into an existing java
> project, also, among others, based on spring.
>
> I'm trying the following:
>
> OmeroContext ctx=OmeroContext.getClientContext();
>
> IAdmin ia=(IAdmin)ctx.getBean("managed:ome.api.IAdmin");
>
> String fn=iadmin.lookupExperimenter("skainz").getFirstName();
>
> This fails with a NullPointerException in java.util.Hashtable.put()
>
> I set up the credentials in a local.properties file, but also see no
> "acivity" on the omero server log when executing the code above.
>
> What/how is the correct usage of the ClientContext? Is there some
> docs/examples?
>
> TIA,
> --
> Simon Kainz, BSc
> Graz, University of Technology
> Department Computing
> Phone: ++43 (0) 316 / 873 6885
More information about the ome-devel
mailing list