[MOBY-dev] [moby] Problems using serviceInputParser method whenthe mobyservice receives multiple Simple inputs

Edward Kawas edward.kawas at gmail.com
Thu Mar 22 16:35:33 UTC 2007


To get an attribute regardless of the prefix, use:

	getAttributeNS("", "articleName")

This seems to work on my machine. Does it work for you Jose?

Eddie

> -----Original Message-----
> From: moby-dev-bounces at lists.open-bio.org [mailto:moby-dev-
> bounces at lists.open-bio.org] On Behalf Of Mark Wilkinson
> Sent: Thursday, March 22, 2007 8:53 AM
> To: Core developer announcements
> Subject: Re: [MOBY-dev] [moby] Problems using serviceInputParser method
> whenthe mobyservice receives multiple Simple inputs
> 
> Hi Jose,
> 
> please go ahead and fix this in the CVS.
> 
> It's interesting that there is no attribute-equivalent to
> getElementsByLocalName, where "local" means whatever namespace you are
> currently in...
> 
> M
> 
> 
> 
> 
> 
> On Thu, 2007-03-22 at 10:32 +0100, Jose Manuel Rodriguez wrote:
> > Hi everyone,
> >
> > I am executing a MOBY services in Perl which needs multiple Simple
> inputs.
> > To extract the MOBY messages, when the service are called, I am using
> > the "serviceInputParser" but I have seen that the returned hashref which
> > contains the Simple inputs is wrong. I mean, the hashref
> >
> > ,whose structure is "$inputs->{$queryID}->{articleName}",
> >
> > has always empty articleName value. That means the articleName of Simple
> > Object is not obtained correctly. (if we have multiple simple inputs in
> > one mobyData, the hashref returned by "serviceInputParser" will contain
> > the last MOBY Object).
> >
> >
> >
> > I have been checking the code and I have seen in the method
> > "createFromDOM" from "MOBY::Client::SimpleArticle" file that the
> > 'articleNames' attribute is not extracted when this belongs to the
> > namespace of "moby".
> >
> >
> > my $attr = $dom->getAttributeNode( 'articleName' );
> > my $articleName = $attr ? $attr->getValue : "";
> >
> >
> > Here you are one solution in this particular problem:
> >
> > my $attr = $dom->getAttributeNodeNS( 'http://www.biomoby.org/moby',
> > 'articleName' );
> > $attr = $dom->getAttributeNode( 'articleName' ) unless defined $attr;
> > my $articleName = $attr ? $attr->getValue : "";
> >
> >
> >
> > (but I think this is one of more problems regarding MOBY namespaces)
> >
> > Best Regards,
> > José.
> >
> 
> 
> _______________________________________________
> MOBY-dev mailing list
> MOBY-dev at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/moby-dev





More information about the MOBY-dev mailing list