[MOBY-guts] biomoby commit
Paul Gordon
gordonp at pub.open-bio.org
Sat Aug 20 02:24:10 UTC 2005
gordonp
Fri Aug 19 22:24:10 EDT 2005
Update of /home/repository/moby/moby-live/Java/docs
In directory pub.open-bio.org:/tmp/cvs-serv27577/docs
Modified Files:
SimpleClient.html
Log Message:
Updates to deal with requirements for named parameters in MOBY API 0.86, and some relaxing of this rule to allow existing anonymously parameterized one-input services to still be valid
moby-live/Java/docs SimpleClient.html,1.10,1.11
===================================================================
RCS file: /home/repository/moby/moby-live/Java/docs/SimpleClient.html,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- /home/repository/moby/moby-live/Java/docs/SimpleClient.html 2005/08/09 19:40:56 1.10
+++ /home/repository/moby/moby-live/Java/docs/SimpleClient.html 2005/08/20 02:24:10 1.11
@@ -371,7 +371,7 @@
will be blank. This data envelope is then made into a proper XML file, with declarations and all, by
<code>MobyDataUtils</code>.
- <blockquote><code>MobyDataUtils.toXMLDocument(System.out, new MobyContentInstance(null, null));</code></blockquote>
+ <blockquote><code>MobyDataUtils.toXMLDocument(System.out, new MobyContentInstance(null));</code></blockquote>
</p>
<h3>Create a MOBY XML response or query with a single data object</h3>
@@ -382,9 +382,26 @@
to form a valid content envelope.
<blockquote><code>MobyDataUtils.toXMLDocument(System.out, new MobyContentInstance(new
- MobyDataObject("gi", "100089"), null));</code></blockquote>
+ MobyDataObject("gi", "100089")));</code></blockquote>
+
</p>
+ <p>
+ If the service requires a named parameter rather than an anonymous one, the two argument constructor can be used:
+
+ <blockquote><code>MobyDataUtils.toXMLDocument(System.out, new MobyContentInstance(new
+ MobyDataObject("SGD", "S0000221"), "interactorID"));</code></blockquote>
+ </p>
+
+ <p>
+ There are also similar methods in <code>MobyRequest</code> to deal with anonymous and non-anonymous single parameter services:
+
+ <blockquote><code><pre>
+mobyRequest.setInput(MobyDataObject("gi", "100089"));
+
+mobyRequest.setInput(MobyDataObject("SGD", "S0000221"), "interactorID"));
+</pre></code></blockquote>
+
<h3>Create a MOBY XML response or query envelope with multiple invocations</h3>
<p>
Use the default constructor for <code>MobyContentInstance</code>, then add at least one <code>MobyDataInstance</code>
@@ -394,8 +411,8 @@
as input.
<blockquote><code><pre>
MobyContentInstance queries = new MobyContentInstance();
-data.put(new MobyDataObject("gi", "100089"));
-data.put(new MobyDataObject("gi", "324442"));
+queries.put(new MobyDataObject("gi", "100089"));
+queries.put(new MobyDataObject("gi", "324442"));
MobyDataUtils.toXMLDocument(System.out, queries);
</pre></code></blockquote>
More information about the MOBY-guts
mailing list