Replace temporary path to the download app with the standard one
[jabaws.git] / website / man_dev.html
index 0fc3a33..35da5fd 100644 (file)
     <td>JABAWS command line client </td>\r
   </tr>\r
 </table>\r
-<p>Additional utility libraries this client depend upon is the compbio-util-1.3.jar and compbio-annotation-1.0.jar. <br />\r
+<p>Additional utility libraries that this client depend upon is the compbio-util-1.3.jar and compbio-annotation-1.0.jar. <br />\r
   Please refer to a <a href="dm_javadoc/index.html">data model javadoc</a> for a detailed description of each class and its methods. </p>\r
+\r
+\r
 <h3><a name="connectto" id="connectto"></a>Connecting to JABAWS</h3>\r
-<p class="attention">For a complete working example of JABAWS command line client please see compbio.ws.client.Jws2Client class. JABAWS command line client source code is available from the <a href="http://www.compbio.dundee.ac.uk/download">download page</a>. Please note that for now all the examples are in Java other languages will follow given a sufficient demand. </p>\r
-<p>Download a binary JABAWS client. Add the client to the class path. The following code excerpt will connect your program to Clustal web service deployed in the University of Dundee. </p>\r
+<p class="attention">\r
+For a complete working example of JABAWS command line client please see compbio.ws.client.Jws2Client class. JABAWS command line client \r
+source code is available from the <a href="http://www.compbio.dundee.ac.uk/download">download page</a>. Please note that for now all \r
+the examples are in Java other languages will follow given a sufficient demand. </p>\r
+\r
+<p>\r
+Download a binary JABAWS client. Add the client to the class path. The following code excerpt will connect your program to Clustal \r
+web service deployed in the University of Dundee. </p>\r
 <p class="code"> import java.net.URL;<br />\r
   import javax.xml.namespace.QName;<br />\r
   import javax.xml.ws.Service;<br />\r
   3) QName qname = new QName(, &quot;ClustalWS&quot;);<br />\r
   4) Service serv = Service.create(url, qname);<br />\r
   5) MsaWS msaws = serv.getPort(new QName(qualifiedName, &quot;ClustalWSPort&quot;),\r
-  MsaWS.class);</p>\r
-<p>Line 1 makes a qualified name for JABA web services.<br />\r
-  Line 2 \r
-  constructs the URL to the web services WSDL. <br />\r
-  Line 3 makes a qualified name instance for Clustal JABA web service. <br />\r
-  Line 4 creates a service instance.<br />\r
-  Line 5 makes a connection to the server. </p>\r
-<p>A more generic connection method would look like this </p>\r
+  MsaWS.class);\r
+</p>\r
+<p>\r
+       Line 1 makes a qualified name for JABA web services.<br />\r
+       Line 2 constructs the URL to the web services WSDL. <br />\r
+       Line 3 makes a qualified name instance for Clustal JABA web service. <br />\r
+       Line 4 creates a service instance.<br />\r
+       Line 5 makes a connection to the server.\r
+</p>\r
+<p>\r
+       A more generic connection method would look like this\r
+</p>\r
 <p class="code"> import java.net.URL;<br />\r
   import javax.xml.namespace.QName;<br />\r
   import javax.xml.ws.Service;<br />\r
   QName qname = new QName(qualifiedServiceName, clustal.toString());<br />\r
   Service serv = Service.create(url, qname);<br />\r
   MsaWS msaws = serv.getPort(new QName(qualifiedServiceName, clustal<br />\r
-  + &quot;Port&quot;), MsaWS.class);</p>\r
-<p>Where Services is enumeration of JABAWS web services. All JABAWS multiple sequence alignment methods confirm to MsaWS specification, thus from the caller point of view all JABAWS web services can be represented by MsaWS interface. The full documentation of MsaWS functions is available from the <a href="dm_javadoc/compbio/data/msa/MsaWS.html">javadoc</a>. </p>\r
+  + &quot;Port&quot;), MsaWS.class);\r
+</p>\r
+<p>\r
+       Where Services is enumeration of JABAWS web services. All JABAWS multiple sequence alignment methods confirm to \r
+       MsaWS specification, thus from the caller point of view all JABAWS web services can be represented by MsaWS \r
+       interface. The full documentation of MsaWS functions is available from the <a href="dm_javadoc/compbio/data/msa/MsaWS.html">javadoc</a>.\r
+</p>\r
+\r
+\r
 <h3><a name="validnames" id="validnames"></a>Valid JABAWS service names and WSDL files </h3>\r
 <p>Multiple sequence alignment services </p>\r
-<ul><li><a href="http://www.compbio.dundee.ac.uk/jabaws/ClustalOWS?wsdl">ClustalOWS</a> (http://www.compbio.dundee.ac.uk/jabaws/ClustalOWS?wsdl) </li>\r
-  <li><a href="http://www.compbio.dundee.ac.uk/jabaws/ClustalWS?wsdl">ClustalWS</a> (http://www.compbio.dundee.ac.uk/jabaws/ClustalWS?wsdl) </li>\r
-  <li><a href="http://www.compbio.dundee.ac.uk/jabaws/MuscleWS?wsdl">MuscleWS</a> (http://www.compbio.dundee.ac.uk/jabaws/MuscleWS?wsdl) </li>\r
-  <li><a href="http://www.compbio.dundee.ac.uk/jabaws/MafftWS?wsdl">MafftWS</a> (http://www.compbio.dundee.ac.uk/jabaws/MafftWS?wsdl) </li>\r
-  <li><a href="http://www.compbio.dundee.ac.uk/jabaws/TcoffeeWS?wsdl">TcoffeeWS</a> (http://www.compbio.dundee.ac.uk/jabaws/TcoffeeWS?wsdl) </li>\r
-  <li><a href="http://www.compbio.dundee.ac.uk/jabaws/ProbconsWS?wsdl">ProbconsWS</a> (http://www.compbio.dundee.ac.uk/jabaws/ProbconsWS?wsdl) </li>\r
-  </ul>\r
+<ul><li><a href="http://www.compbio.dundee.ac.uk/jabaws-dev/ClustalOWS?wsdl">ClustalOWS</a> (http://www.compbio.dundee.ac.uk/jabaws-dev/ClustalOWS?wsdl) </li>\r
+       <li><a href="http://www.compbio.dundee.ac.uk/jabaws-dev/ClustalWS?wsdl">ClustalWS</a> (http://www.compbio.dundee.ac.uk/jabaws-dev/ClustalWS?wsdl) </li>\r
+       <li><a href="http://www.compbio.dundee.ac.uk/jabaws-dev/MuscleWS?wsdl">MuscleWS</a> (http://www.compbio.dundee.ac.uk/jabaws-dev/MuscleWS?wsdl) </li>\r
+       <li><a href="http://www.compbio.dundee.ac.uk/jabaws-dev/MafftWS?wsdl">MafftWS</a> (http://www.compbio.dundee.ac.uk/jabaws-dev/MafftWS?wsdl) </li>\r
+       <li><a href="http://www.compbio.dundee.ac.uk/jabaws-dev/TcoffeeWS?wsdl">TcoffeeWS</a> (http://www.compbio.dundee.ac.uk/jabaws-dev/TcoffeeWS?wsdl) </li>\r
+       <li><a href="http://www.compbio.dundee.ac.uk/jabaws-dev/ProbconsWS?wsdl">ProbconsWS</a> (http://www.compbio.dundee.ac.uk/jabaws-dev/ProbconsWS?wsdl) </li>\r
+       <li><a href="http://www.compbio.dundee.ac.uk/jabaws-dev/MSAprobsWS?wsdl">MSAprobsWS</a> (http://www.compbio.dundee.ac.uk/jabaws-dev/MSAprobsWS?wsdl) </li>\r
+       <li><a href="http://www.compbio.dundee.ac.uk/jabaws-dev/GLprobsWS?wsdl">GLprobsWS</a> (http://www.compbio.dundee.ac.uk/jabaws-dev/GLprobsWS?wsdl) </li>\r
+</ul>\r
 <p>Protein disorder prediction services </p>\r
 <ul>\r
-  <li><a href="http://www.compbio.dundee.ac.uk/jabaws/IUPredWS?wsdl">IUPredWS</a> (http://www.compbio.dundee.ac.uk/jabaws/IUPredWS?wsdl) </li>\r
-  <li><a href="http://www.compbio.dundee.ac.uk/jabaws/GlobPlotWS?wsdl">GlobPlotWS</a> (http://www.compbio.dundee.ac.uk/jabaws/GlobPlotWS?wsdl) </li>\r
-  <li><a href="http://www.compbio.dundee.ac.uk/jabaws/DisemblWS?wsdl">DisemblWS</a> (http://www.compbio.dundee.ac.uk/jabaws/DisemblWS?wsdl) </li>\r
-  <li><a href="http://www.compbio.dundee.ac.uk/jabaws/JronnWS?wsdl">JronnWS</a> (http://www.compbio.dundee.ac.uk/jabaws/JronnWS?wsdl) </li>\r
-  </ul>\r
+       <li><a href="http://www.compbio.dundee.ac.uk/jabaws-dev/IUPredWS?wsdl">IUPredWS</a> (http://www.compbio.dundee.ac.uk/jabaws-dev/IUPredWS?wsdl) </li>\r
+       <li><a href="http://www.compbio.dundee.ac.uk/jabaws-dev/GlobPlotWS?wsdl">GlobPlotWS</a> (http://www.compbio.dundee.ac.uk/jabaws-dev/GlobPlotWS?wsdl) </li>\r
+       <li><a href="http://www.compbio.dundee.ac.uk/jabaws-dev/DisemblWS?wsdl">DisemblWS</a> (http://www.compbio.dundee.ac.uk/jabaws-dev/DisemblWS?wsdl) </li>\r
+       <li><a href="http://www.compbio.dundee.ac.uk/jabaws-dev/JronnWS?wsdl">JronnWS</a> (http://www.compbio.dundee.ac.uk/jabaws-dev/JronnWS?wsdl) </li>\r
+</ul>\r
 <p>Amino acid conservation service</p>\r
 <ul>\r
-  <li><a href="http://www.compbio.dundee.ac.uk/jabaws/AAConWS?wsdl">AAConWS</a> (http://www.compbio.dundee.ac.uk/jabaws/AAConWS?wsdl) </li>\r
-  </ul>\r
-<p>Please replace <span class="hightlight">http://www.compbio.dundee.ac.uk/</span> with your JABAWS instance host name, and <span class="hightlight">jabaws</span> with your JABAWS context name to access your local version of JABAWS web services. For example <span class="hightlight">http://localhost:8080/jabaws</span> would be a valid URL for the default Apache-Tomcat installation and jabaws.war file deployment. </p>\r
+       <li><a href="http://www.compbio.dundee.ac.uk/jabaws-dev/AAConWS?wsdl">AAConWS</a> (http://www.compbio.dundee.ac.uk/jabaws-dev/AAConWS?wsdl) </li>\r
+</ul>\r
+<p>Protein and RNA Secondary Structure Prediction</p>\r
+<ul>\r
+       <li><a href="http://www.compbio.dundee.ac.uk/jabaws-dev/JpredWS?wsdl">JpredWS</a> (http://www.compbio.dundee.ac.uk/jabaws-dev/JpredWS?wsdl) </li>\r
+       <li><a href="http://www.compbio.dundee.ac.uk/jabaws-dev/RNAalifoldWS?wsdl">RNAalifoldWS</a> (http://www.compbio.dundee.ac.uk/jabaws-dev/RNAalifoldWS?wsdl) </li>\r
+</ul>\r
+<p>\r
+Please replace <span class="hightlight">http://www.compbio.dundee.ac.uk/</span> with your JABAWS instance host name, and \r
+<span class="hightlight">jabaws</span> with your JABAWS context name to access your local version of JABAWS web services. \r
+For example <span class="hightlight">http://localhost:8080/jabaws</span> would be a valid URL for the default Apache-Tomcat \r
+installation and jabaws.war file deployment. </p>\r
+\r
+\r
 <h3><a name="defalign" id="defalign"></a>Aligning sequences </h3>\r
-<p>Given that <span class="hightlight">msaws</span> is web service proxy, created as described in &quot;Connecting to JABAWS&quot; section, the actual alignment can be obtained as follows: </p>\r
+<p>\r
+Given that <span class="hightlight">msaws</span> is web service proxy, created as described in &quot;Connecting to JABAWS&quot; \r
+section, the actual alignment can be obtained as follows: </p>\r
 <p class="code">1) List&lt;FastaSequence&gt; fastalist = SequenceUtil.readFasta(new FileInputStream(file));<br />\r
   2) String jobId = msaws.align(fastalist); <br />\r
   3) Alignment alignment = msaws.getResult(jobId);</p>\r
-<p>Line  one loads FASTA sequence from the file<br />\r
-  Line two submits them to web service represented by msaws proxy <br />\r
-  Line three retrieves the alignment from a web service. This line will block the execution until the result is available. Use this with caution. In general, you should make sure that the calculation has been completed before attempting retrieving results. This is to avoid keeping the connection to the server on hold for a prolonged periods of time. While this may be ok with your local server, our public server (<a href="http://www.compbio.dundee.ac.uk/jabaws">www.compbio.dundee.ac.uk/jabaws</a>) will not let you hold the connection for longer than 10 minutes. This is done to prevent excessive load on the server. The next section describes how to check the status of the calculation.<br />\r
+<p>Line  one loads FASTA sequence from the file.<br />\r
+  Line two submits them to web service represented by msaws proxy. <br />\r
+  Line three retrieves the alignment from a web service. This line will block the execution until the result is available. \r
+  Use this with caution. In general, you should make sure that the calculation has been completed before attempting \r
+  retrieving results. This is to avoid keeping the connection to the server on hold for a prolonged periods of time. \r
+  While this may be ok with your local server, our public server \r
+  (<a href="http://www.compbio.dundee.ac.uk/jabaws">www.compbio.dundee.ac.uk/jabaws</a>) will not let you hold the connection \r
+  for longer than 10 minutes. This is done to prevent excessive load on the server. The next section describes how to check \r
+  the status of the calculation.<br />\r
   Methods and classes mentioned in the excerpt are available from the JABAWS client library. </p>\r
 <h3><a name="checkresults" id="checkresults"></a>Checking the status of the calculation </h3>\r
-<p> You may have noticed that there was no pause between submitting the job and retrieving of the results. This is because <span class="hightlight">getResult(jobId)</span> method block the processing until the calculation is completed. However, taking into account that the connection holds server resources, our public server (<a href="http://www.compbio.dundee.ac.uk/jabaws">www.compbio.dundee.ac.uk/jabaws</a>) is configured to reset the connection after 10 minutes of waiting. To work around the connection reset you are encouraged to check whether the calculation has been completed before accessing the results.      You can do it like this: </p>\r
+<p> You may have noticed that there was no pause between submitting the job and retrieving of the results. This is \r
+because <span class="hightlight">getResult(jobId)</span> method block the processing until the calculation is completed. \r
+However, taking into account that the connection holds server resources, our public server \r
+(<a href="http://www.compbio.dundee.ac.uk/jabaws">www.compbio.dundee.ac.uk/jabaws</a>) is configured to reset the \r
+connection after 10 minutes of waiting. To work around the connection reset you are encouraged to check whether the \r
+calculation has been completed before accessing the results.   You can do it like this: </p>\r
 <p> <span class="code">while (msaws.getJobStatus(jobId) != JobStatus.FINISHED) {<br />\r
   &nbsp;&nbsp;&nbsp;&nbsp;Thread.sleep(2000); // wait two  seconds, then recheck the status <br />\r
   }</span></p>\r
   5) Alignment alignment = msaws.getResult(jobId);</p>\r
 <p>Line one obtains the lists of presets supported by a web service.<br />\r
   Line two return a particular Preset \r
-  by its name<br />\r
+  by its name.<br />\r
   Lines three to five  are doing the same job as in the first <a href="#defalign"> aligning sequences example</a>.</p>\r
 <h3><a name="customalign" id="customalign"></a>Aligning with  custom parameters</h3>\r
 <p class="code"> 1) RunnerConfig options = msaws.getRunnerOptions();<br />\r
   9) String jobId = msaws.customAlign(fastalist, arguments);<br />\r
   10) Alignment alignment = msaws.getResult(jobId);</p>\r
 <p>Line one obtains the <span class="hightlight">RunnerConfig</span> object that holds information on supported parameters and their values<br />\r
-  Line two retrieve a particular parameter from the holder by its name<br />\r
+  Line two retrieve a particular parameter from the holder by its name.<br />\r
   Lines three sets a value to this parameter which will be used in the calculation. <br />\r
-  Line four and five do the same but for another parameter<br />\r
-  Line 6 makes a List to hold the parameters <br />\r
-  Line seven puts the parameters into that list<br />\r
+  Line four and five do the same but for another parameter.<br />\r
+  Line 6 makes a List to hold the parameters. <br />\r
+  Line seven puts the parameters into that list.<br />\r
   Line eight \r
-  and ten is the same as in previous examples<br />\r
-  Line nine submit an alignment request with the sequences and the parameters <br />\r
-  The names of all the parameters supported by a web service e.g. &quot;PAM300&quot; can be obtained using <span class="hightlight">options.getArguments() </span>method. Further details on the methods available from <span class="hightlight">RunnerConfig</span> object are available from the <a href="dm_javadoc/index.html">javadoc</a>. </p>\r
+  and ten is the same as in previous examples.<br />\r
+  Line nine submit an alignment request with the sequences and the parameters. <br />\r
+  The names of all the parameters supported by a web service e.g. &quot;PAM300&quot; can be obtained \r
+  using <span class="hightlight">options.getArguments() </span>method. Further details on the methods \r
+  available from <span class="hightlight">RunnerConfig</span> object are available from the \r
+  <a href="dm_javadoc/index.html">javadoc</a>. </p>\r
 <h3><a name="writingaltofile" id="writingaltofile"></a>Writing alignments to a file</h3>\r
 <p>There is a utility method in the client library that does exactly that. </p>\r
 <p> <span class="code">Alignment alignment = align(...) <br />\r
   FileOutputStream outStream = new FileOutputStream(file);<br />\r
   ClustalAlignmentUtil.writeClustalAlignment(outStream, align);</span></p>\r
 <h3><a name="compex" id="compex"></a>A complete client example </h3>\r
-<p>Finally, a complete example of the program that connects to JABAWS Clustal service and aligns sequences using one of the  Clustal web service preset. Three is also a <a href="Example_template.pdf">PDF version</a> of this example with syntax highlighted. The text comments are commented by block style comments e.g. /* comment */, the alternatives given in the code are line commented // comment. You may want to remove line style comments to test alternatives of the functions. All you need for this to work is a <a href="http://www.compbio.dundee.ac.uk/download/get?id=min-jaba-client-2.0.jar">JABAWS binary client</a>. Please make sure that the client is in the Java class path before running this example.</p>\r
+<p>\r
+Finally, a complete example of the program that connects to JABAWS Clustal service and aligns sequences using \r
+one of the  Clustal web service presets. There is also a <a href="Example_template.pdf">PDF version</a> of \r
+this example with syntax highlighted. The text comments are commented by block style comments e.g. /* comment */, \r
+the alternatives given in the code are line commented // comment. You may want to remove line style comments to \r
+test alternatives of the functions. All you need for this to work is a \r
+<a href="http://www.compbio.dundee.ac.uk/download/get?id=min-jaba-client-2.0.jar">JABAWS binary client</a>. \r
+Please make sure that the client is in the Java class path before running this example.</p>\r
 <pre class="code" style="line-height:1em;">\r
 import java.io.ByteArrayInputStream;\r
 import java.io.FileNotFoundException;\r
@@ -281,8 +336,7 @@ public class Example {
                String qualifiedServiceName = &quot;http://msa.data.compbio/01/01/2010/&quot;;\r
 \r
                /* Make a URL pointing to web service WSDL */\r
-               URL url = new URL(\r
-                               &quot;http://www.compbio.dundee.ac.uk/jabaws/ClustalWS?wsdl&quot;);\r
+               URL url = new URL(&quot;http://www.compbio.dundee.ac.uk/jabaws/ClustalWS?wsdl&quot;);\r
 \r
                /*\r
                 * If you are making a client that connects to different web services\r
@@ -349,10 +403,14 @@ public class Example {
 </pre>\r
 For a more detailed description of all available types and their functions please refer to the <a href="dm_javadoc/index.html">data model javadoc</a>.\r
 <h3><a name="buildart" id="buildart"></a>Building web services artifacts</h3>\r
-<p>JABAWS are the standard <a href="http://jax-ws.java.net/">JAX-WS</a> SOAP web services, which are <a href="http://www.ws-i.org/">WS-I</a> basic   profile compatible. This means that you could use whatever tool your language has to work with web services. Below is how you can generate portable artifacts to work with JABAWS from Java. However,  if programming in Java we recommend using our  client library as it provides a handful of useful methods in addition to plain data types. </p>\r
+<p>\r
+JABAWS are the standard <a href="http://jax-ws.java.net/">JAX-WS</a> SOAP web services, which are <a href="http://www.ws-i.org/">WS-I</a> \r
+basic profile compatible. This means that you could use whatever tool your language has to work with web services. Below is how you can \r
+generate portable artifacts to work with JABAWS from Java. However if programming in Java, we recommend using our  client library as \r
+it provides a handful of useful methods in addition to plain data types. </p>\r
 <p class="code">wsimport -keep http://www.compbio.dundee.ac.uk/jabaws/ClustalWS?wsdl</p>\r
 </div><!-- content end-->\r
-<div id="copyright">Last update: 28 June 2013<br/>Sasha Sherstnev, Peter Troshin, Jim Procter and Geoff Barton, The Barton Group, University of Dundee, UK</div>\r
+<div id="copyright">Last update: 30 April 2014<br/>Sasha Sherstnev, Peter Troshin, Jim Procter and Geoff Barton, The Barton Group, University of Dundee, UK</div>\r
 </div><!-- wrapper end-->\r
 </div><!-- page end-->\r
 \r