Personal tools
You are here: Home Bioinformatics Tutorials jMOBY Step-By-Step Writing BioMoby Web Services Almost pure console Web Service development walkthrough
Document Actions

Almost pure console Web Service development walkthrough

Almost pure console Web Service development walkthrough

In some cases the dashboard might not work and maybe you are tired of setting up everything in Eclipse. This section will go through all steps by working (almost) only with the console - and you will see how fast one can develop services :)

 

 

  • Walkthrough

    • Get the JMoby code from CVS... go to any directory in which you want to have the checkout and type:
      • cvs -d :pserver:cvs@cvs.open-bio.org:/home/repository/moby login 
        (password is 'cvs')
        cvs -d :pserver:cvs@cvs.open-bio.org:/home/repository/moby co -P moby-live/Java
    • go into the moby-live/Java directory and call ant install (this will download all dependencies and can take up to 10 minutes). If you doing this the first time you have to call ant bootstrap before !
      • hint: if you dont have admin rights to deploy your service later on tomcat and e.g. need to use sudo or something similar, it is best to do all ant calls also as root (using sudo e.g.)

    • Register your service online here.
    • Call ant moses-datatypes. This will generate and compile all dataypes so that they are available for your implementation.

    • Ant takes input values from a file called build.properties, so copy the build.properties.template to build.properties
    • Open build.properties with your favorite editor and add the following two lines
      • moses.authority = YOUR-AUTHORITY // the name of your authority you used to register the service
      • moses.service = SERVICE_NAME // the name of the service you registered and want to develop
    • Now we want to have the skeleton for our service - so call ant moses-services.
    • Now its your part. You have to implement your service by creating a class which extends the skeleton which was just created. You can do that with your favorite editor. Normally as naming convention the implementing class has the suffix Impl (e.g. your service is called MyBlastService, ergo the implementing class is then MyBlastServiceImpl).
    • To deploy we need to specify the service(s) to be deployed. Add to your build.properties
      • service.NAME = IMPL_CLASS // NAME is the service name (e.g. MyBlastService) and IMPL_CLASS the implementing class (with the full package structure !)
    • Make sure that your tomcat is running and type ant deploy.
    • We need to copy the implementating class to tomcat. So copy your Impl class (with the complete package structure !) into CATALINA_HOME/webapps/axis/WEB-INF/classes.
    • Restart tomcat and call the service.

 

Done.... great job :)

 


Powered by Plone, the Open Source Content Management System