Doc update
authorpvtroshin <pvtroshin@e3abac25-378b-4346-85de-24260fe3988d>
Thu, 24 Mar 2011 16:37:04 +0000 (16:37 +0000)
committerpvtroshin <pvtroshin@e3abac25-378b-4346-85de-24260fe3988d>
Thu, 24 Mar 2011 16:37:04 +0000 (16:37 +0000)
git-svn-id: link to svn.lifesci.dundee.ac.uk/svn/barton/ptroshin/JABA2@3855 e3abac25-378b-4346-85de-24260fe3988d

how_to_add_new_webservice.txt

index 529aa42..4f62d05 100644 (file)
@@ -3,16 +3,17 @@ How To add a new executable
 1) Add executable to the binaries folder. If it has source code and can be recompiled for different platforms include it under binaries/src \r
 Edit binaries/src setexecutableflag.sh and compilebin.sh scripts accordingly. \r
 \r
-2) Make sure all the dependencies of the software being installed are satisfied. If there are other binaries they should be included as well. Keep the dependant binaries in subfolder for the main executable. Update compily and setexecflag scripts accordigly. \r
+2) Make sure all the dependencies of the software being installed are satisfied. If there are other binaries they should be included as well. Keep the dependant binaries in subfolder for the main executable. Update compile and setexecflag scripts accordingly. \r
 \r
 3) Make sure executable \r
    - Does not have any hard links to its dependencies, e.g. is able to run from any installation folder and does not contain any hardcoded paths. (TODO examples...) \r
 \r
-4) Describe executable in conf/Exectuable.properties. \r
+4) Describe executable in conf/Exectuable.properties. The lowcase name of the wrapper should be included in the name of the property for example Clustal properties all include clustal as a part of the name e.g. local.clustalw.bin\r
+The same property for Mafft will be called local.mafft.bin. \r
 \r
-5) Add <ExecutableName>Limit.xml, <ExecutableName>Parameters.xml and <ExecutableName>Presets.xml. All but Limits are optional. \r
+5) Add <ExecutableName>Limit.xml, <ExecutableName>Parameters.xml and <ExecutableName>Presets.xml. All are optional (should be at least). If the executable does not support parameters you do not have to refer to the XXXParameter.xml file into the Executable.properties file. The same is true for Presets and Limits. \r
 \r
-6) Create a Java wrapper class for your executable. Create it within runner source directory.\r
+6) Create a Java wrapper class for your executable. Create it within runner source directory. Examples of other wrappers can be found in compbio.runner.msa or compbio.runner.disorder packages. Wrapper should extend SkeletalExecutable<T> implements PipedExecutable<T> if you need to pass the input or collect the results from the standard in/out. Please see Mafft code as example. Wrapper should expend SkeletalExecutable<T> if input/output can be set as a parameter for an executable. Please see ClustalW code as example. \r
 \r
 7) Create a testcase suit for your wrapper and run the test cases. \r
 \r
@@ -20,44 +21,35 @@ Edit binaries/src setexecutableflag.sh and compilebin.sh scripts accordingly.
 \r
 9) Test the parser\r
 \r
-10) Decide which interface your executable is going to match. \r
-    For example it what the executable produces can be represented as Annotations \r
-    to the sequence file or alignment, then SequenceAnnotation interface might be appropriate. \r
+10) Decide which web services interface your executable is going to match. \r
+    For example if the executable output can be represented as SequenceAnnotation then SequenceAnnotation interface might be appropriate. \r
     For multiple sequence alignment an Msa interface should be used. \r
 \r
-11) If matching interface is found, then implement a web service confirming to it within \r
-    a webservices source folder \r
+11) If you find a web interface that matches your returning data type, then implement a web service which confirms to it within a webservices source folder \r
 \r
 12) Register web service in WEB-INF/ web.xml and sun-jaxws.xml\r
 \r
 13) Add generated wsdl to wsbuild.xml ant script to generate the stubs\r
 \r
-14) Run build-server task in wsbuild file. Watch for errors. If cannot compile that means \r
-that JAXB cannot serialize some of the data structures. Add appropriate annotations to your data types.\r
-Check that \r
+14) Run build-server task in wsbuild file. Watch for errors. If the task fails that means that JAXB cannot serialize some of the data structures. Add appropriate annotations to your data types.\r
+Also check that \r
   - you do not have interfaces to serialize. JAXB cannot serialize them.\r
   - you have a default no args constructor (can be private if you do not need it)\r
   - JAXB cannot serialize a Map, use custom data structure instead!\r
   - Enum cannot be serialized as its abstract class (do not confuse with enum which is fine)\r
-  - Fields serialization leave a little more space for manuevre, so use it. If you do you then \r
-  can accept and return interfaces, e.g. List, Map; abstract classes etc, from your methods. \r
+  - Fields serialization leave a little more space for manoeuvre, so use it. If you do then you can accept and return interfaces, e.g. List, Map; abstract classes etc, from your methods. \r
   \r
-If you have the data on the server side, but nothing is coming through to the client, \r
-this is a JAXB serialization problem. They tend to be very silent and thus hard to debug. Check your \r
-data structure can be serialized! \r
+If you have the data on the server side, but nothing is coming through to the client, this is a JAXB serialization problem. They tend to be very silent and thus hard to debug. Check your data structure can be serialized! \r
 \r
 13) Modify the client to work with your web service. \r
 \r
 14) Test. \r
 \r
-15) Testing on the cluster...\r
+15) Test on the cluster...\r
 \r
 \r
 \r
-If executable does not support parameters do not add a reference to the XXXParameter.xml \r
-file into the Executable.properties file. Do the same for Presets\r
-\r
-\r
  \r
 \r
 \r
+  \r