[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"><?xml version="1.0"?><br /><moby:MOBY xmlns:moby="http://www.biomoby.org/moby"><br /> <moby:mobyContent moby:authority="samples.jmoby.net"><br /> <moby:serviceNotes><br /> <moby:Notes>Response created at Thu May 1 19:22:00 2008 (GMT), by the service 'getReverseEchoString'.</moby:Notes><br /> </moby:serviceNotes><br /> <moby:mobyData moby:queryID="job_0"><br /> <moby:Simple moby:articleName="my_reverse_string"><br /> <moby:String moby:id="" moby:namespace="">!desrever gnirts siht tnaw I</moby:String><br /> </moby:Simple><br /> </moby:mobyData><br /> </moby:mobyContent><br /></moby:MOBY></pre>
+<pre class="script2">
+Sending the following data to getReverseEchoString_submit asynchronously:<br /><moby:MOBY xmlns:moby="http://www.biomoby.org/moby"><br /> <moby:mobyContent><br /> <moby:mobyData moby:queryID="job_0"><br /> <moby:Simple moby:articleName="my_input_string"><br /> <moby:String moby:id="" moby:namespace="">I want this string reversed!</moby:String><br /> </moby:Simple><br /> </moby:mobyData><br /> </moby:mobyContent><br /></moby:MOBY>
+
+
+Current State: running<br />Current State: running<br />Current State: running
+
+
+<?xml version="1.0"?><br /><moby:MOBY xmlns:moby="http://www.biomoby.org/moby"><br /> <moby:mobyContent moby:authority="samples.jmoby.net"><br /> <moby:serviceNotes><br /> <moby:Notes>Response created at Thu May 1 19:22:00 2008 (GMT), by the service 'getReverseEchoString'.</moby:Notes><br /> </moby:serviceNotes><br /> <moby:mobyData moby:queryID="job_0"><br /> <moby:Simple moby:articleName="my_reverse_string"><br /> <moby:String moby:id="" moby:namespace="">!desrever gnirts siht tnaw I</moby:String><br /> </moby:Simple><br /> </moby:mobyData><br /> </moby:mobyContent><br /></moby:MOBY></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