[MOBY-dev] creating primary inputs from scratch

Michael Gerlich mgerlich at ipb-halle.de
Fri Feb 20 10:35:25 UTC 2009


Hi all,

I want to create a simple JUnit test case that tests if all services 
we're offering (in both default and testing registry) are working. I'am 
stuck in creating primary inputs for datatypes other than Object, 
especially ArrayString, ArrayFloat and MSPeakRelList - all defined in 
both registries.

I modified this example
http://biomoby.open-bio.org/CVS_CONTENT/moby-live/Java/docs/SimpleClient.html#helloWorld

An MSPeakRelList is a list/array of MSPeakRel members. MSPeakRel has two 
children mz and relInt, defining a peak.

Here is what I do in order to create such a datatype as input for a service:

MSPeakRelList msList = new MSPeakRelList();
       
MSPeakRel ms1 = new MSPeakRel();
ms1.set_mz(153.3);
ms1.set_relInt(316);
      
MSPeakRel ms2 = new MSPeakRel();
ms2.set_mz(273.069);
ms2.set_relInt(999);
    
MSPeakRel[] peaks = new MSPeakRel[2];
for (int i = 0; i < peaks.length; i++) {
      peaks[i] = new MSPeakRel();
}
peaks[0] = ms1;
peaks[1] = ms2;
msList.set_MSPeakRel(peaks);


The simple client uses the MobyRequest function setInput(). It's 
arguments are either of type MobyContentInstance or MobyDataInstance.
Now what am I supposed to do to correctly set msList as primary input to 
a service (MassBank_QSearch_Test, testing reg).

BTW, it has gotten quiet on the mailing lists...


Kind regards,

Michael



More information about the MOBY-dev mailing list