[MOBY-guts] biomoby commit

Mark Wilkinson mwilkinson at pub.open-bio.org
Mon May 3 20:39:11 UTC 2004


mwilkinson
Mon May  3 16:39:11 EDT 2004
Update of /home/repository/moby/moby-live/Perl/MOBY/Client
In directory pub.open-bio.org:/tmp/cvs-serv12636/MOBY/Client

Modified Files:
	Service.pm Service.html 
Log Message:
enable execution of services that require parameters

moby-live/Perl/MOBY/Client Service.pm,1.8,1.9 Service.html,1.4,1.5
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Client/Service.pm,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- /home/repository/moby/moby-live/Perl/MOBY/Client/Service.pm	2004/04/01 21:23:47	1.8
+++ /home/repository/moby/moby-live/Perl/MOBY/Client/Service.pm	2004/05/03 20:39:11	1.9
@@ -181,6 +181,16 @@
                 This would cause a single invocation of a service requiring
                 two input parameters named "input1" and "input2" 
 
+                $Service->execute(XMLinputlist => [
+	                         [
+                             'input1', '<Object namespace="blah" id="123"/>',
+                             'input2', '<Object namespace="blah" id="234"/>',
+                             'param1', '<Value>0.001</Value>',
+                             ]
+                              ]);
+                This would cause a single invocation of a service requiring
+                two input parameters named "input1" and "input2" 
+
 
 =cut
 
@@ -198,8 +208,11 @@
             if (!(ref($XML)=~/array/i)){
                 $articleName ||="";
                 $XML ||= "";
-                $data .= "<moby:Simple moby:articleName='$articleName'>\n$XML\n</moby:Simple>\n";
-                
+                if (($XML =~ /\<Value\>/) || ($XML =~ /\<moby\:Value\>/)){
+                    $data .= "<moby:Parameter moby:articleName='$articleName'>$XML</moby:Parameter>";
+                } else {
+                    $data .= "<moby:Simple moby:articleName='$articleName'>\n$XML\n</moby:Simple>\n";
+                }
             # need to do this for collections also!!!!!!    
             } elsif (ref($XML)=~/array/i){
                 my @objs = @{$XML};

===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Client/Service.html,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- /home/repository/moby/moby-live/Perl/MOBY/Client/Service.html	2004/04/01 21:23:47	1.4
+++ /home/repository/moby/moby-live/Perl/MOBY/Client/Service.html	2004/05/03 20:39:11	1.5
@@ -110,6 +110,16 @@
                               ]);
                 This would cause a single invocation of a service requiring
                 two input parameters named &quot;input1&quot; and &quot;input2&quot;</pre>
+<pre>
+                $Service-&gt;execute(XMLinputlist =&gt; [
+                                 [
+                             'input1', '&lt;Object namespace=&quot;blah&quot; id=&quot;123&quot;/&gt;',
+                             'input2', '&lt;Object namespace=&quot;blah&quot; id=&quot;234&quot;/&gt;',
+                             'param1', '&lt;Value&gt;0.001&lt;/Value&gt;',
+                             ]
+                              ]);
+                This would cause a single invocation of a service requiring
+                two input parameters named &quot;input1&quot; and &quot;input2&quot;</pre>
 <p>
 </p>
 <h2><a name="servicename">ServiceName</a></h2>




More information about the MOBY-guts mailing list