[MOBY-l] Services accepting multiple inputs

Ola Spjuth ola.spjuth at farmbio.uu.se
Thu Apr 3 06:40:22 UTC 2008


Hi Eddie,

Thanks for the snippet. As the MobyRequest acceps a MobyDataInstance 
[] I thought this would be handled by the MobyRequest but reading the  
source reveals that in this case if too many inputs, only one will be  
used . Anyway, what does a service respond with if it accepts  
multiple inputs, for example a list of objects with undefined size?  
And could you please show how I pass in mutliple MobyData objects, as  
Mark described it, in the same MobyRequest invocation? Instead of  
doing as below (which obviously was wrong).

	MobyService templateService = new MobyService 
("MOBYSHoundGetGenBankff");
	MobyService[] validServices = worker.findService(templateService);
	MobyRequest mr = new MobyRequest(worker);
	mr.setService(validServices[0]);
	
	MobyDataObject[] input=new MobyDataObject[2];
	input[0]=new MobyDataObject("NCBI_gi", "111076");
	input[1]=new MobyDataObject("NCBI_gi", "111077");
	
	mr.setInput(input);
	mr.invokeService(this);

Cheers,

    .../Ola

On Apr 2, 2008, at 17:31 , Edward Kawas wrote:

> Hi Ola,
>
> If you do a findService on the service that you would like to  
> invoke, then
> you can see how many inputs there are.
>
> For instance (something like the following),
>
> CentralImpl central = new CentralImpl();
> MobyService service = central.findService(new
> MobyService("MOBYSHoundGetGenBankff"))[0];
> // get the input count
> int count = Service.getPrimaryInputs().length;
>
> Eddie
>
> -----Original Message-----
> From: moby-l-bounces at lists.open-bio.org
> [mailto:moby-l-bounces at lists.open-bio.org] On Behalf Of Ola Spjuth
> Sent: April-02-08 8:06 AM
> To: moby-l at lists.open-bio.org
> Subject: [MOBY-l] Services accepting multiple inputs
>
> Hi,
>
> Is there a way to see if services accept multiple inputs? I tried to
> feed the "MOBYSHoundGetGenBankff" with a MobyDataObject[] containing
> two simple objects with id and namespace. The result (as far as I can
> see) was only one 'file', and the other input object seems to have
> been omitted. Have I done something wrong or does this service only
> accept a single input? In that case, how can this be deducted from
> the service in jMoby?
>
> Cheers,
>
>     .../Ola
> _______________________________________________
> moby-l mailing list
> moby-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/moby-l
>




More information about the moby-l mailing list