[MOBY] [MOBY-dev] need help with register service :)

Mark Wilkinson markw at illuminae.com
Wed May 5 14:21:31 UTC 2004


Hi Ardavan!

You are missing one layer of brackets.  Yes, I know it is arcane :-) I'm
going to add a bit of documentation to the POD showing why it has to be
this way, and how each layer of brackets should be interpreted.  I
posted a message of explanation to the list a couple of weeks ago in
response to a similar question from Catherine's group, but I notice that
you are not subscribed to this mailing list, so you wouldn't have read
it...

The correct signature for registerService inputs/outputs is detailed in
the pod docs, but it requires one more layer of array-ref brackets than
you have used.  So your message:

input => ['panelLSID', ["Object" => []] ],
output=> ['indvLSID', [["Object" => []]] ],

should be:

input => [
	['panelLSID', ["Object" => []] ]
	],
output=> [
	['indvLSID', [["Object" => []]] ]
	],

cheers!

M


On Wed, 2004-05-05 at 08:14, Ardavan Kanani wrote:
> Hello all,
> 
> I am trying to register service called getIndvsOnPanel() that takes a 
> panel lsid and returns a collection of simple objects with their id set 
> to the individual's lsid on that panel.  Here is how I am registering 
> the service:
> 
> 
> sub register_getIndvsOnPanel_service {
>    my ($C, $description) = @_;
>    my $reg = $C->registerService(
>                                  serviceName  => "getIndvsOnPanel",
>                                  authURI      => $authURI,
>                                  contactEmail => $email,
>                                  description  => $description,
>                                  URL          => $url,
>                                  input        => ['panelLSID', ["Object" 
> => []] ],
>                                  output       => ['indvLSID', [["Object" 
> => []]] ],
>                                  category     => "moby",
>                                  serviceType  => "Retrieval",
>    );
>    die "Bad return value from registerService for getIndvsOnPanel 
> service.\n" unless $reg;
>    if ($reg->success == 1){
>      print "Registration successful for getIndvsOnPanel service.\n";
>    }
>    else {
>      print "Registration failed for getIndvsOnPanel service: ", 
> $reg->message, "\n";
>    }
> }
> 
> 
> I get the following error message:
> 
> Can't use string ("indvLSID") as an ARRAY ref while "strict refs" in 
> use at /usr/local/lib/perl5/site_perl/5.8.0/MOBY/Client/Central.pm line 
> 710.
> 
> 
> 
> What am I doing wrong?
> 
> 
> 
> Thanks, Ardavan Kanani
> 
> _______________________________________________
> MOBY-dev mailing list
> MOBY-dev at biomoby.org
> http://www.biomoby.org/mailman/listinfo/moby-dev
-- 
Mark Wilkinson (mwilkinson at mrl.ubc.ca)
University of British Columbia iCAPTURE Centre



More information about the MOBY-dev mailing list