[MOBY-guts] biomoby commit

Eddie Kawas kawas at dev.open-bio.org
Tue Sep 2 19:04:36 UTC 2008


kawas
Tue Sep  2 15:04:36 EDT 2008
Update of /home/repository/moby/moby-live/Docs/MOBY-S_API/Perl
In directory dev.open-bio.org:/tmp/cvs-serv23438/Docs/MOBY-S_API/Perl

Modified Files:
	construct_moses_async_service.html 
Log Message:
updated the service testing section. this document is now up to date.
moby-live/Docs/MOBY-S_API/Perl construct_moses_async_service.html,1.1,1.2
===================================================================
RCS file: /home/repository/moby/moby-live/Docs/MOBY-S_API/Perl/construct_moses_async_service.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /home/repository/moby/moby-live/Docs/MOBY-S_API/Perl/construct_moses_async_service.html	2008/09/02 16:35:32	1.1
+++ /home/repository/moby/moby-live/Docs/MOBY-S_API/Perl/construct_moses_async_service.html	2008/09/02 19:04:36	1.2
@@ -130,9 +130,9 @@
 Done.</pre>
 <p>If you happen to see redefinition warnings, <span class="update">please just ignore them</span>; The warnings look like the following:</p>
 <pre class="script2">Generating services from samples.jmoby.net:
-Subroutine header redefined at /usr/local/share/perl/5.8.8/MOBY/Async/WSRF.pm line 521.
+<span class="update">Subroutine header redefined at /usr/local/share/perl/5.8.8/MOBY/Async/WSRF.pm line 521.
 Subroutine new redefined at /usr/local/share/perl/5.8.8/MOBY/Async/WSRF.pm line 694.
-Subroutine DESTROY redefined at /usr/local/share/perl/5.8.8/MOBY/Async/WSRF.pm line 704.
+Subroutine DESTROY redefined at /usr/local/share/perl/5.8.8/MOBY/Async/WSRF.pm line 704.</span>
 Done.</pre>
 <p>Basically, we used the script <em><strong>moses-generate-services.pl</strong></em> to:</p>
 <ol>
@@ -170,6 +170,11 @@
         value => "$string",   # TO BE EDITED
 );
 </pre>
+<p>Optionally, to test out the asynchronous aspect of our service, feel free to slow your service down. Something like the following would do that for you:</p>
+<pre class="script2"># this will cause our service to sleep for 60 seconds
+# as long as data was sent to our service
+sleep(60) if defined $my_input_string;</pre>
+<p>You can add the optional code below the definition of <span class="bb">$my_reverse_string</span>.</p>
 <p>That is all there is to it. Now we can test our service!</p>
 <h2><a name="test" id="test"></a>Service testing</h2>
 <p>To test the service, issue the following command:</p>
@@ -195,15 +200,23 @@
 <p>You only have to do this once. In other words, all other asynchronous SOAP based services that you construct using MoSeS automatically use that cgi-bin script, because the moses-generate-services.pl script updates the ASYNC_SERVICE_TABLE that we talked about earlier.</p>
 <h2><a name="test2" id="test2"></a>Service testing using SOAP</h2>
 <p>Now that the service has been deployed, you can test it using WSRF/SOAP with the following command:</p>
-<pre class="script2">moses-testing-service.pl -e http://localhost/cgi-bin/MobyServer.cgi getReverseEchoString input.xml</pre>
-<p>When we call the script with the <em><strong>-e</strong></em> option, we tell the moses-testing-service.pl script that we would like to call our service using SOAP. We then must provide the script with 2 or 3 parameters:</p>
+<pre class="script2">moses-testing-service.pl -v -a http://localhost/cgi-bin/AsyncMobyServer.cgi getReverseEchoString input.xml</pre>
+<p class="note">The <em><strong>-v</strong></em> option is just a flag that makes the script be verbose, so that you can see what is going on.</p>
+<p>When we call the script with the <em><strong>-a</strong></em> option, we tell the moses-testing-service.pl script that we would like to call our service using Asynchronous SOAP. We then must provide the script with 2 or 3 parameters:</p>
 <ol>
   <li>the url to the service</li>
   <li>the name of the service that we would like to call</li>
   <li>an <em>optional</em> file containing the input to our service</li>
 </ol>
 <p>The expected output should be very similar to the output we saw above when we tested our service:</p>
-<pre class="script2">&lt;?xml version=&quot;1.0&quot;?&gt;<br />&lt;moby:MOBY xmlns:moby=&quot;http://www.biomoby.org/moby&quot;&gt;<br />  &lt;moby:mobyContent moby:authority=&quot;samples.jmoby.net&quot;&gt;<br />    &lt;moby:serviceNotes&gt;<br />      &lt;moby:Notes&gt;Response created at Thu May  1 19:22:00 2008 (GMT), by the service 'getReverseEchoString'.&lt;/moby:Notes&gt;<br />    &lt;/moby:serviceNotes&gt;<br />    &lt;moby:mobyData moby:queryID=&quot;job_0&quot;&gt;<br />      &lt;moby:Simple moby:articleName=&quot;my_reverse_string&quot;&gt;<br />        &lt;moby:String moby:id=&quot;&quot; moby:namespace=&quot;&quot;&gt;!desrever gnirts siht tnaw I&lt;/moby:String&gt;<br />      &lt;/moby:Simple&gt;<br />    &lt;/moby:mobyData&gt;<br />  &lt;/moby:mobyContent&gt;<br />&lt;/moby:MOBY&gt;</pre>
+<pre class="script2">
+Sending the following data to getReverseEchoString_submit asynchronously:<br />&lt;moby:MOBY xmlns:moby=&quot;http://www.biomoby.org/moby&quot;&gt;<br />  &lt;moby:mobyContent&gt;<br />    &lt;moby:mobyData moby:queryID=&quot;job_0&quot;&gt;<br />      &lt;moby:Simple moby:articleName=&quot;my_input_string&quot;&gt;<br />        &lt;moby:String moby:id=&quot;&quot; moby:namespace=&quot;&quot;&gt;I want this string reversed!&lt;/moby:String&gt;<br />      &lt;/moby:Simple&gt;<br />    &lt;/moby:mobyData&gt;<br />  &lt;/moby:mobyContent&gt;<br />&lt;/moby:MOBY&gt;
+
+
+Current State: running<br />Current State: running<br />Current State: running
+
+
+&lt;?xml version=&quot;1.0&quot;?&gt;<br />&lt;moby:MOBY xmlns:moby=&quot;http://www.biomoby.org/moby&quot;&gt;<br />  &lt;moby:mobyContent moby:authority=&quot;samples.jmoby.net&quot;&gt;<br />    &lt;moby:serviceNotes&gt;<br />      &lt;moby:Notes&gt;Response created at Thu May  1 19:22:00 2008 (GMT), by the service 'getReverseEchoString'.&lt;/moby:Notes&gt;<br />    &lt;/moby:serviceNotes&gt;<br />    &lt;moby:mobyData moby:queryID=&quot;job_0&quot;&gt;<br />      &lt;moby:Simple moby:articleName=&quot;my_reverse_string&quot;&gt;<br />        &lt;moby:String moby:id=&quot;&quot; moby:namespace=&quot;&quot;&gt;!desrever gnirts siht tnaw I&lt;/moby:String&gt;<br />      &lt;/moby:Simple&gt;<br />    &lt;/moby:mobyData&gt;<br />  &lt;/moby:mobyContent&gt;<br />&lt;/moby:MOBY&gt;</pre>
 <p>That's all there is to constructing asynchronous SOAP based Perl MoSeS services!</p>
 </body>
 </html>




More information about the MOBY-guts mailing list