Adding new website from r3934 JABA_r1 branch
[jabaws.git] / website / man_dev.html
diff --git a/website/man_dev.html b/website/man_dev.html
new file mode 100644 (file)
index 0000000..73dee08
--- /dev/null
@@ -0,0 +1,359 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<!DOCTYPE html PUBLIC "XHTML 1.0 Strict"\r
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\r
+<html xmlns="http://www.w3.org/1999/xhtml">\r
+<head>\r
+<meta name="Last-modified" content="Mon, 4 Apr 2011 12:00:00 GMT"/>\r
+<title>Java Bioinformatics Analyses Web Services (JABAWS) client developers manual</title>\r
+<link href="ws.css" rel="stylesheet" type="text/css" media=\r
+"screen, projection, handheld, tv" />\r
+<link rel="stylesheet" type="text/css" media="print" href=\r
+"print.css" />\r
+<script type="text/javascript" src="prototype-1.6.0.3.js"></script>\r
+</head>\r
+<body>\r
+<div id="page">\r
+<div id="banner">\r
+<table> \r
+<tr><td style="width:130px;"><a href="http://www.dundee.ac.uk"><img src="images/uod_lt.gif"  alt="University of Dundee" class="logo"  title="University of Dundee" longdesc="http://www.dundee.ac.uk"/></a></td>\r
+<td class="bg"><img src="images/jabaws.png" title="JABAWS:MSA" alt="JABAWS:MSA"/></td>\r
+<td class="bg"><img src="images/align.png"/></td>\r
+</tr>\r
+</table></div><!-- banner end-->\r
+\r
+<div id="wrapper">\r
+<div id="panel"><a href="index.html">Home</a> \r
+ <a href="quick_start.html">Getting Started</a> \r
+ <a class="selected" href="man_about.html">Manual</a> \r
+       <div id="submenu">\r
+               <a href="man_about.html">About</a>\r
+               <a href="man_servervm.html" title="JABAWS Server as Virtual Appliance">Server VA</a>\r
+               <a href="man_serverwar.html" title="JABAWS Server as Web Application aRchive">Server WAR</a>\r
+               <a href="man_configuration.html" >Server<br/>\r
+               Configuration</a>\r
+               <a href="man_client.html" title="JABAWS Command Line Client">CMD Client</a>\r
+               <a class="selected" href="man_dev.html" title="Accessing JABAWS from your program">Accessing<br/>\r
+               JABAWS</a>      \r
+       </div>\r
+<a href="download.html">Download</a> \r
+<a href="contacts.html">Contact Us</a>\r
+<a href="http://www.compbio.dundee.ac.uk">Barton Group</a> \r
+</div>\r
+\r
+<!-- panel end-->\r
+<div id="content">\r
+<h2 id="headtitle">JABAWS MANUAL</h2>\r
+\r
+<h2>Using JABAWS From Your Program </h2>\r
+<ul>\r
+  <li><a href="#wsfunctions">Web services functions overview </a></li>\r
+  <li><a href="#templatestr">The template client structure</a></li>\r
+  <li><a href="#connectto">Connecting to JABAWS</a></li>\r
+  <li><a href="#validnames">Valid JABAWS service names and WSDL files</a></li>\r
+  <li><a href="#defalign">Aligning sequences</a></li>\r
+  <li><a href="#checkresults">Checking the status of the calculation </a></li>\r
+  <li><a href="#presetalign">Aligning with presets</a></li>\r
+  <li><a href="#customalign">Aligning with custom parameters</a></li>\r
+  <li><a href="#writingaltofile">Writing alignments to a file</a></li>\r
+  <li><a href="#compex">A complete client example </a></li>\r
+  <li><a href="#buildart">Building web services artifacts</a></li>\r
+</ul>\r
+<h3><a name="wsfunctions" id="wsfunctions"></a>Web services functions overview </h3>\r
+<p>All JABA multiple sequence alignment web services comply to the same interface, thus the function described below are available from all the services. </p>\r
+<p><strong>Functions for initiating the alignment </strong><span class="code">  String id = align(List&lt;FastaSequence&gt; list)<br />\r
+  String id = customAlign(List&lt;FastaSequence&gt; sequenceList, List&lt;Option&gt; optionList)<br />\r
+  String id = presetAlign(List&lt;FastaSequence&gt; sequenceList, Preset preset)</span></p>\r
+<p><strong>Functions pertaining to job monitoring and control</strong><br />\r
+  <span class="code">JobStatus status = getJobStatus(String id)<br />\r
+  Alignment al = getResult(String id)<br />\r
+  boolean cancelled = cancelJob(String id)<br />\r
+  ChunkHolder chunk = pullExecStatistics(String id, long marker)</span></p>\r
+<p><strong>Functions relating to service features discovery</strong><br />\r
+  <span class="code">RunnerConfig rc = getRunnerOptions()<br />\r
+  Limit limit = getLimit(String name)<br />\r
+  LimitsManager lm = getLimits()<br />\r
+  PresetManager pm = getPresets()</span></p>\r
+<p>Please refer to a <a href="dm_javadoc/compbio/data/msa/MsaWS.html">data model  javadoc</a> for a detailed description of each methods. </p>\r
+<h3><a name="templatestr" id="templatestr"></a>Structure of the template command line client</h3>\r
+<table width="100%" border="1">\r
+  <tr>\r
+    <td style="width:19%"><strong>Packages</strong></td>\r
+    <td style="width:81%"><strong>Classes and Interfaces </strong></td>\r
+  </tr>\r
+  <tr>\r
+    <td>compbio.data.msa </td>\r
+    <td>MsaWS the interface for all multiple sequence alignment web services </td>\r
+  </tr>\r
+  <tr>\r
+    <td>compbio.data.sequence</td>\r
+    <td>JABAWS data types </td>\r
+  </tr>\r
+  <tr>\r
+    <td>compbio.metadata</td>\r
+    <td>JABAWS meta data types </td>\r
+  </tr>\r
+  <tr>\r
+    <td>compbio.ws.client</td>\r
+    <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
+  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
+<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="download.html">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="code"> import java.net.URL;<br />\r
+  import javax.xml.namespace.QName;<br />\r
+  import javax.xml.ws.Service;<br />\r
+  ...............<br />\r
+  1) String qualifiedName = &quot;http://msa.data.compbio/01/01/2010/&quot;;<br />\r
+  2) URL url = new URL(&quot;http://www.compbio.dundee.ac.uk/jabaws/ClustalWS?wsdl&quot;);<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
+<p class="code"> import java.net.URL;<br />\r
+  import javax.xml.namespace.QName;<br />\r
+  import javax.xml.ws.Service;<br />\r
+  import compbio.ws.client.Services<br />\r
+  .............. <br />\r
+  String qualifiedServiceName = &quot;http://msa.data.compbio/01/01/2010/&quot;;<br />\r
+  String host = &quot;http://www.compbio.dundee.ac.uk/jabaws&quot;;<br />\r
+  // In real life the service name can come from args<br />\r
+  Services clustal = Services.ClustalWS;<br />\r
+  URL url = new URL(host + &quot;/&quot; + clustal.toString() + &quot;?wsdl&quot;);<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
+<h3><a name="validnames" id="validnames"></a>Valid JABAWS service names and WSDL files </h3>\r
+<ul>\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
+<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 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
+  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> <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
+<h3><a name="presetalign" id="presetalign"></a>Aligning with presets</h3>\r
+<p class="code">1) PresetManager presetman = msaws.getPresets();<br />\r
+  2) Preset preset = presetman.getPresetByName(presetName);<br />\r
+  3) List&lt;FastaSequence&gt; fastalist = SequenceUtil.readFasta(new FileInputStream(file));<br />\r
+  4) String jobId = msaws.presetAlign(fastalist, preset);<br />\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
+  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
+  2) Argument matrix = options.getArgument(&quot;MATRIX&quot;);<br />\r
+  3) matrix.setValue(&quot;PAM300&quot;);<br />\r
+  4) Argument gapopenpenalty = options.getArgument(&quot;GAPOPEN&quot;);<br />\r
+  5) gapopenpenalty.setValue(&quot;20&quot;);<br />\r
+  6) List&lt;Argument&gt; arguments = new ArrayList&lt;Argument&gt;(); <br />\r
+  7) arguments.add(matrix);\r
+  arguments.add(gapopenpenalty);<br />\r
+  8) List&lt;FastaSequence&gt; fastalist = SequenceUtil.readFasta(new FileInputStream(file));<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
+  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 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
+<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="download.html">JABAWS binary client</a>. 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
+import java.io.IOException;\r
+import java.net.URL;\r
+import java.util.List;\r
+\r
+import javax.xml.namespace.QName;\r
+import javax.xml.ws.Service;\r
+\r
+import compbio.data.msa.MsaWS;\r
+import compbio.data.sequence.Alignment;\r
+import compbio.data.sequence.FastaSequence;\r
+import compbio.data.sequence.SequenceUtil;\r
+import compbio.metadata.JobSubmissionException;\r
+import compbio.metadata.LimitExceededException;\r
+import compbio.metadata.Preset;\r
+import compbio.metadata.PresetManager;\r
+import compbio.metadata.ResultNotAvailableException;\r
+import compbio.metadata.UnsupportedRuntimeException;\r
+import compbio.metadata.WrongParameterException;\r
+\r
+public class Example {\r
+\r
+       /*\r
+        * Input sequences for alignment\r
+        */\r
+       static final String input = &quot;&gt;Foo\r\n&quot;\r
+                       + &quot;MTADGPRELLQLRAAVRHRPQDFVAWLMLADAELGMGDTTAGEMAVQRGLALHPGHPEAVARLGR&quot;\r
+                       + &quot;VRWTQQRHAEAAVLLQQASDAAPEHPGIALWLGHALEDAGQAEAAAAAYTRAHQLLPEEPYITAQ&quot;\r
+                       + &quot;LLNWRRRLCDWRALDVLSAQVRAAVAQGVGAVEPFAFLSEDASAAEQLACARTRAQAIAASVRPL&quot;\r
+                       + &quot;APTRVRSKGPLRVGFVSNGFGAHPTGLLTVALFEALQRRQPDLQMHLFATSGDDGSTLRTRLAQA&quot;\r
+                       + &quot;STLHDVTALGHLATAKHIRHHGIDLLFDLRGWGGGGRPEVFALRPAPVQVNWLAYPGTSGAPWMD&quot;\r
+                       + &quot;YVLGDAFALPPALEPFYSEHVLRLQGAFQPSDTSRVVAEPPSRTQCGLPEQGVVLCCFNNSYKLN&quot;\r
+                       + &quot;PQSMARMLAVLREVPDSVLWLLSGPGEADARLRAFAHAQGVDAQRLVFMPKLPHPQYLARYRHAD&quot;\r
+                       + &quot;LFLDTHPYNAHTTASDALWTGCPVLTTPGETFAARVAGSLNHHLGLDEMNVADDAAFVAKAVALAS&quot;\r
+                       + &quot;DPAALTALHARVDVLRRESGVFEMDGFADDFGALLQALARRHGWLGI\r\n&quot;\r
+                       + &quot;\r\n&quot;\r
+                       + &quot;&gt;Bar\r\n&quot;\r
+                       + &quot;MGDTTAGEMAVQRGLALHQQRHAEAAVLLQQASDAAPEHPGIALWLHALEDAGQAEAAAAYTRAH&quot;\r
+                       + &quot;QLLPEEPYITAQLLNAVAQGVGAVEPFAFLSEDASAAESVRPLAPTRVRSKGPLRVGFVSNGFGA&quot;\r
+                       + &quot;HPTGLLTVALFEALQRRQPDLQMHLFATSGDDGSTLRTRLAQASTLHDVTALGHLATAKHIRHHG&quot;\r
+                       + &quot;IDLLFDLRGWGGGGRPEVFALRPAPVQVNWLAYPGTSGAPWMDYVLGDAFALPPALEPFYSEHVL&quot;\r
+                       + &quot;RLQGAFQPSDTSRVVAEPPSRTQCGLPEQGVVLCCFNNSYKLNPQSMARMLAVLREVPDSVLWLL&quot;\r
+                       + &quot;SGPGEADARLRAFAHAQGVDAQRLVFMPKLPHPQYLARYRHADLFLDTHPYNAHTTASDALWTGC&quot;\r
+                       + &quot;PVLTTPGETFAARVAGSLNHHLGLDEMNVADDAAFVAKAVALASDPAALTALHARVDVLRRESGV&quot;\r
+                       + &quot;FEMDGFADDFGALLQALARRHGWLGI\r\n&quot;\r
+                       + &quot;\r\n&quot;\r
+                       + &quot;&gt;Friends\r\n&quot;\r
+                       + &quot;MTADGPRELLQLRAAVRHRPQDVAWLMLADAELGMGDTTAGEMAVQRGLALHPGHPEAVARLGRV&quot;\r
+                       + &quot;RWTQQRHAEAAVLLQQASDAAPEHPGIALWLGHALEDHQLLPEEPYITAQLDVLSAQVRAAVAQG&quot;\r
+                       + &quot;VGAVEPFAFLSEDASAAEQLACARTRAQAIAASVRPLAPTRVRSKGPLRVGFVSNGFGAHPTGLL&quot;\r
+                       + &quot;TVALFEALQRRQPDLQMHLFATSGDDGSTLRTRLAQASTLHDVTALGHLATAKHIRHHGIDLLFD&quot;\r
+                       + &quot;LRGWGGGGRPEVFALRPAPVQVNWLAYPGTSGAPWMDYVLGDAFALPPALEPFYSEHVLRLQGAF&quot;\r
+                       + &quot;QPSDTSRVVAEPPSRTQCGLPEQGVVLCCFNNSYKLNPQSMARMLAVLREVPDSVLWLLSGPGEA&quot;\r
+                       + &quot;DARLRAFAHAQGVDAQRLVFMPKLPHPQYLARYRHADLFLDTHPYNAHTTASDALWTGCPVLTTP&quot;\r
+                       + &quot;GETFAARVAGSLNHHLGLDEMNVADDAAFVAKAVALASDPAALTALHARVDVLRRESI&quot;;\r
+\r
+       public static void main(String[] args) throws UnsupportedRuntimeException,\r
+                       LimitExceededException, JobSubmissionException,\r
+                       WrongParameterException, FileNotFoundException, IOException,\r
+                       ResultNotAvailableException, InterruptedException {\r
+\r
+               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
+\r
+               /*\r
+                * If you are making a client that connects to different web services\r
+                * you can use something like this:\r
+                */\r
+               // URL url = new URL(host + &quot;/&quot; + Services.ClustalWS.toString() +\r
+               // &quot;?wsdl&quot;);\r
+\r
+               QName qname = new QName(qualifiedServiceName, &quot;ClustalWS&quot;);\r
+               Service serv = Service.create(url, qname);\r
+               /*\r
+                * Multiple sequence alignment interface for Clustal web service\r
+                * instance\r
+                */\r
+               MsaWS msaws = serv.getPort(new QName(qualifiedServiceName, &quot;ClustalWS&quot;\r
+                               + &quot;Port&quot;), MsaWS.class);\r
+\r
+               /* Get the list of available presets */\r
+               PresetManager presetman = msaws.getPresets();\r
+\r
+               /* Get the Preset object by preset name */\r
+               Preset preset = presetman\r
+                               .getPresetByName(&quot;Disable gap weighting (Speed-oriented)&quot;);\r
+\r
+               /*\r
+                * Load sequences in FASTA format from the file You can use something\r
+                * like new FileInputStream(&lt;filename&gt;) to load sequence from the file\r
+                */\r
+               List&lt;FastaSequence&gt; fastalist = SequenceUtil\r
+                               .readFasta(new ByteArrayInputStream(input.getBytes()));\r
+\r
+               /*\r
+                * Submit loaded sequences for an alignment using preset. The job\r
+                * identifier is returned by this method, you can retrieve the results\r
+                * with it sometime later.\r
+                */\r
+               String jobId = msaws.presetAlign(fastalist, preset);\r
+\r
+               /* This method will block for the duration of the calculation */\r
+               Alignment alignment = msaws.getResult(jobId);\r
+\r
+               /*\r
+                * This is a better way of obtaining results, it does not involve\r
+                * holding the connection open for the duration of the calculation,\r
+                * Besides, as the University of Dundee public server will reset the\r
+                * connection after 10 minutes of idling, this is the only way to obtain\r
+                * the results of long running task from our public server.\r
+                */\r
+               // while (msaws.getJobStatus(jobId) != JobStatus.FINISHED) {\r
+               // Thread.sleep(1000); // wait a second, then recheck the status\r
+               // }\r
+\r
+               /* Output the alignment to standard out */\r
+               System.out.println(alignment);\r
+\r
+               // Alternatively, you can record retrieved alignment into the file in\r
+               // ClustalW format\r
+\r
+               // ClustalAlignmentUtil.writeClustalAlignment(new FileOutputStream(\r
+               // &quot;output.al&quot;), alignment);\r
+\r
+       }\r
+}\r
+</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 class="code">wsimport -keep http://www.compbio.dundee.ac.uk/jabaws/ClustalWS?wsdl</p>\r
+</div>\r
+\r
+<!-- content end-->\r
+<div id="copyright">Last update: 1 April 2011<br />\r
+ Peter Troshin, Jim Procter and Geoff Barton, The Barton Group, University of\r
+Dundee, UK</div>\r
+</div>\r
+\r
+<!-- wrapper end-->\r
+</div>\r
+<!-- page end-->\r
+\r
+<!-- Google analitics -->\r
+<script type="text/javascript">\r
+var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");\r
+document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));\r
+</script>\r
+<script type="text/javascript">\r
+try{\r
+var pageTracker = _gat._getTracker("UA-5356328-1");\r
+pageTracker._trackPageview();\r
+} catch(err) {}\r
+</script>\r
+</body>\r
+</html>\r
+\r