Discovering and Invoking Moby Services
Find a service and then call it
This example is only one example of a client that you can use to call moby services in JAVA.
Martin Senger and Paul Gordon have written much nicer ones and you can find examples below:
Specific Examples *
- Command-line clients http://biomoby.open-bio.org/CVS_CONTENT/moby-live/Java/docs/CmdLineClients.html
- How to use the BioMoby plugin in Taverna http://biomoby.open-bio.org/CVS_CONTENT/moby-live/Java/docs/taverna/guide/index.html
- Using generated object (MoSeS)
o Biomoby Dashboard http://biomoby.open-bio.org/CVS_CONTENT/moby-live/Java/docs/Dashboard.html
o Developing MoSeS Clients http://biomoby.open-bio.org/CVS_CONTENT/moby-live/Java/docs/Moses-clients.html
o Client for creating Biomoby input XML data http://biomoby.open-bio.org/CVS_CONTENT/moby-live/Java/docs/CreateInputClient.html
- Using general methods
o Seahawk: An extensible, user-oriented MOBY client http://biomoby.open-bio.org/CVS_CONTENT/moby-live/Java/docs/Seahawk.html
o How to develop a client talking to a BioMoby service (a Paul Gordon's simple client) http://biomoby.open-bio.org/CVS_CONTENT/moby-live/Java/docs/SimpleClient.html
Parsing the Output XML from a Service (without parsing XML!)
The following helps you initially start to parse the XML.
Please note, currently, this method only works if the 'default' registry has your datatypes registered within it!
Now use 'Data Package In Anger' page!
There are many ways to parse the XML. Another method would be to use the java class called 'MobyPackage'.
All you have to invoke the .createFromXML() method. This will return an encapsulate the XML as an Object and you are free to call methods on it.
More detail can be found here.
N.B. Use of the package MobyPackage assumes that you have all of the datatypes 'generated' using dashboard and the library, biomoby-datatypes.jar, on the class path.
BioMoby Registry Location
Two required attributes to connect to a BioMoby Registry are:
- URL: <URL> ia an endpoint of a Moby registry.
- Namespace :<namespace> is a URI defining Moby registry's namespace.