[MOBY-l] how to call a service with secondaries?
Bertrand Neron
bneron at pasteur.fr
Mon May 3 08:22:52 UTC 2004
I'd like to implement a bioMoby service with a Simple (a dnaSequence) and severals secondaries
but I have some problems.
to parse the XML input, I use the sub MOBY::CommonSubs::complexServiceInputParser($message)
and XML::DOM . I see on the API (http://biomoby.org/moby-live/Perl/MOBY/CommonSubs.html#complexserviceinputparser) that the xml input should have this structure
<queryInput queryID = '1'>
<Simple articleName='name1'>
<Object namespace=blah id=blah/>
</Simple>
<Parameter articleName='cutoff'>
<datatype>Float</datatype>
<default>10</default>
</Parameter>
</queryInput>
but the xml which my service recieve when I invoke it with the execute method had this structure
<?xml version='1.0' encoding='UTF-8'?>
<moby:MOBY xmlns:moby='http://www.biomoby.org/moby-s'>
<moby:Query>
<moby:queryInput queryID='1'>
<moby:Simple moby:articleName=''>
<dnaSequence namespace="" id="" articleName="sequence">
<Integer namespace="" id="" articleName="Length">19<\In
teger>
<String namespace="" id="" articleName="SequenceString"
>ACGGTAGCTAGGTACCCAT<\String>
</dnaSequence>
</moby:Simple>
<moby:Simple moby:articleName=''>
<Parameter namespace="" id="" articleName="hybridation_type">
<Value>dnadna</Value>
<\Parameter>
</moby:Simple>
<moby:Simple moby:articleName=''>
<Parameter namespace="" id="" articleName="nucacid_concentration">
<Value>0.005</Value>
<\Parameter>
</moby:Simple>
<moby:Simple moby:articleName=''>
<Parameter namespace="" id="" articleName="salt_concentratio">
<Value>1.5</Value>
<\Parameter>
</moby:Simple>
</moby:queryInput>
</moby:Query>
</moby:MOBY>
each Parameter is embeded in a moby:Simple and the Parameter end Markups have an \ instead of / ??
How can I invoke a service with a Simple and several secondaries?
what kind of xml I should expected?
thanks.
bertrand
ps.
this the code I used to register the service and to call the service.
#########################################################################
# Register the service
#########################################################################
sub register_service {
my $C = shift;
my $reg = $C->registerService(
serviceName => 'Melting',
serviceType => "Analysis",
authURI => $authURI,
contactEmail => $email,
description => "Melting: enthalpie, entropy and melting temperature (N. Le Novere)",
category => "moby",
URL => $url,
input => [ ["sequence",['dnaSequence' => [] ] ]],
output => [ ['', ["text-plain" => []]], ],
secondary => {
"hybridation_type" => {'dataType' => 'String' ,
'enum' => ['dnadna','dnarna','rnarna']},
"nnfile" => {'dataType'=> 'String' ,
'default' =>'default' ,
'enum' => ['default','all97a.nn','bre86a.nn','fre86a.nn','san96a.nn','sug95a.nn','sug96a.nn','xia98a.nn']},
"complement_string" =>{'dataType' => 'String' },
"salt_concentratio" =>{'data_type' => 'Float' ,
'min' => 0.0 ,
' max' => 10.0 },
"nucaid_concentration" => {'data_type' => 'Float',
min => 0.0 ,
max => 1.0 },
"correction_factor" => {'data_type' => 'Float' },
"salt_correction" => {'data_type' => 'String',
'enum' => ['wet91a','san96a','san98a']},
"approx" => {'data_type' => 'Integer',
'default' => 0,
'enum' => [ 0 , 1]},
"dandling_ends" => {'data_type' => 'Integer',
'default' => 0,
'enum' => [ 0 , 1 ]},
"mismatches" => {'da
More information about the moby-l
mailing list