[MOBY-dev] Bug in MobyRequest ?

Andreas Groscurth groscurt at mpiz-koeln.mpg.de
Tue Jan 8 09:37:55 UTC 2008


Hi Paul,

thanks for the update... Although I aggree with you on the primary data issue, 
I wouldnt call it 'being lazy'... why are then default values at all if one 
is forced to send the secondaries at all ? If I'm ok with the defined default 
values, why should I send secondaries ? I understood the secondaries as 
optional parameters for which I could just use the default values.

but what surprises me is, when actually does the secondaries are set to the 
request data ?
When I see the code correctly, you fill the secondaryParams - but I cant find 
anything where this information is then set ?

MobyDataUtils.toXMLDocument( mobyRequest, data );

seems to be where you create the xml request with the data... but where is the 
link between data and the parameters ?

Thanks
andreas

On Monday 07 January 2008 23:47, Paul Gordon wrote:
> Hi Andreas,
>
> I wouldn't really call it a bug, MobyRequest just didn't expect you to
> be lazy :-)
>
> For example, it doesn't check that you're sending primary parameters of
> the right data types either.  This was primarily because I wanted to be
> able to create data envelopes and send them without consulting the
> ontologies if I so desired.  On the other hand, I already have the
> secondary data, so it doesn't hurt to add those that aren't already
> specified in the request.  I've done this now (do a cvs update), and
> have documented that the MobyContentInstance you pass in may be modified
> in this way.
>
> Regards,
>
> Paul
>
> Andreas Groscurth wrote:
> > Hi,
> >
> > I'm not sure, but I think there is something wrong in the MobyRequest -
> > or I (again) miss something...
> >
> > The situation is the following:
> >
> > I want to call a service which has secondaries. I dont give any
> > secondaries in the call, because I want to use the default ones the
> > service was registered with
> >
> > In the method convertMOBYDataToMOBYRequest the secondaried from the
> > service are fetched correctly
> >
> > MobyData[] secondaries = mobyService.getSecondaryInputs();
> >
> > but then the secondaryParameters from the call are fetched and the
> > following comparison makes me wonder
> >
> > if(secondaries != null && secondaries.length != secondaryParams.size()){
> > 		throw new MobyException("Service " + mobyService.getName() + " was
> > provided " +  secondaryParams.size() + " secondary input parameter(s),
> > but takes " + secondaries.length +	" (query " + queryName + ")");
> > }
> >
> > This means - if i dont provide any secondaries in my call, the method
> > will always throw an exception, although i want that the defaults to be
> > taken.
> >
> > In my opinion, it should check whether any secondaries from the call are
> > present and if not, then use the default ones from the service.
> >
> > So, am I right or what did I miss ?
> >
> > Thanks
> > Andreas
>
> _______________________________________________
> MOBY-dev mailing list
> MOBY-dev at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/moby-dev

-- 
Andreas Groscurth
Bioinformatics Developer
Max Planck Institute for Plant Breeding Research
Carl-von-Linné-Weg 10
50829 Cologne
Germany
E-mail:    groscurt at mpiz-koeln.mpg.de
Phone:    +49(0)221-5062-449




More information about the MOBY-dev mailing list