[MOBY-l] Paramter structure

Paul Gordon gordonp at cbr.nrc.ca
Tue Apr 27 13:33:34 UTC 2004


Hi Bertrand,

We are implementing the same thing, and I think the first form, with 
Parameter/value is the correct one since it is in the API, and because 
the second declaration is redundant or potentially in conflict with the 
datatype declared in the service registration.  i.e. you could say it's 
a float, but the service asked for a string.

Bertrand Neron wrote:

>I 'd like to build a service which take in input a Simple and several
>Secondaries.
>
>which structure should have the xml input ?
>
>On the page http://www.biomoby.org/twiki/bin//view/Moby/MobySAPI, I found an
>example of xml where the Parameters have the following structure:
> 
><Parameter articleName=''>
> <Value>34</Value>
></Parameter>
>
>The complete example from
>http://www.biomoby.org/twiki/bin/view/Moby/MobySAPI:
>
>... 
>A message to a service that requires Secondary Articles is invoked as in the following example:
>
>       <?xml version="1.0" encoding="UTF-8"?>
>       <moby:MOBY xmlns:moby="http://www.biomoby.org/moby">
>          <moby:Query>
>              <moby:queryInput queryID='a1'>
>                   <Simple articleName=''>
>                      <Object namespace="Genbank/gi" id="163483"/>
>                   </Simple>
>
>                   <Parameter articleName='cutoff'>
>                                <Value>34</Value>
>                   </Parameter>
>
>              </moby:queryInput>
>          </moby:Query>
>       </moby:MOBY>
>
>...
>
>
>But on the page of the api of Moby.CommonSubs (
>http://www.biomoby.org/moby-live/Perl/MOBY/CommonSubs.htm). I found an
>other example of xml input. Where the parameter have this structure
>
><Parameter articleName=''>
>  <datatype>dataType</datatype>
>  <default></default>
></Parameter>
>
>The complete example from complexServiceInputParser at
>http://www.biomoby.org/moby-live/Perl/MOBY/CommonSubs.htm :
>
>...            
>            for example, the input message:
>            
>                <queryInput queryID = '1'>
>                    <Simple articleName='name1'>
>                       <Object namespace=blah id=blah/>
>                    </Simple>
>                    <Parameter articleName='cutoff'>
>                       <datatype>Float</datatype>
>                       <default>10</default>
>                    </Parameter>
>                </queryInput>
>
>            will become:
>            (note that SIMPLE, COLLECTION, and SECONDARY are exported constants from this module)
>            
>            $inputs->{1} = [ [SIMPLE, $DOM_name1],
>                             [SECONDARY, $DOM_cutoff]
>                           ]
>
>...
>
>
>Thanks,
>
>Bertrand
>
>--
>Bertrand Neron
>Pasteur Institute Computing Center.
>
>_______________________________________________
>moby-l mailing list
>moby-l at biomoby.org
>http://biomoby.org/mailman/listinfo/moby-l
>
>  
>





More information about the moby-l mailing list