[MOBY-dev] Registering a MOBY service

Edward Kawas edward.kawas at gmail.com
Thu Sep 28 16:59:36 UTC 2006


Okay,

I have noticed something else:

If I try to register a service in dashboard where I escape the &, dashboard does
the following:

Given-> &, dashboard shows the raw XML as-> &

Anyways, if I register a service with &, a find service (using a perl client)
returns &. If I register a service with a &, a find service returns the
&

What am I missing? Is the problem that dashboard escapes the & in both cases and
central doesn't?

Thanks,

Eddie




> -----Original Message-----
> From: moby-dev-bounces at lists.open-bio.org 
> [mailto:moby-dev-bounces at lists.open-bio.org] On Behalf Of 
> Martin Senger
> Sent: Thursday, September 28, 2006 8:32 AM
> To: Core developer announcements
> Subject: Re: [MOBY-dev] Registering a MOBY service
> 
> Eddie,
> 
> Just my thoughts on this, but because this is text content of an xml
> > element,
> > should central really be escaping ampersands? My question, 
> I guess, is 
> > should this be the job of the client or the registry?
> 
> 
> One of us does not understand the point :-)
> 
> The client sends properly escaped XML. Registry stores it. 
> Later a client
> asks "find the service". Registry retrieves it from the 
> database, converts
> it into XML and sends it back. But it converts it wrongly - it should
> conform with the XML spec - which it does not.
> 
> Cheers,
> Martin
> 
> 
> Thanks,
> >
> > Eddie
> >
> > > -----Original Message-----
> > > From: moby-dev-bounces at lists.open-bio.org
> > > [mailto:moby-dev-bounces at lists.open-bio.org] On Behalf Of
> > > Martin Senger
> > > Sent: Thursday, September 28, 2006 5:03 AM
> > > To: Core developer announcements
> > > Subject: Re: [MOBY-dev] Registering a MOBY service
> > >
> > > Mark, Eddie,
> > >    I think there is a bug (also) in Central in XML escaping.
> > >
> > >    Javier found that he was not able to register a service
> > > with a URL containing ampersand. I replied:
> > >
> > > it may be that the dashboard does not properly escape it in
> > > the registration
> > > > request
> > > >
> > >
> > > and, indeed, it is true. Today, I have fixed it in Dashboard
> > > (actually in
> > > CentralImpl.java) but found that it seems to be a
> > > double-error. Also the Central does not properly escape XML
> > > characters.
> > >
> > > This is my registration request:
> > >
> > > <registerService><Category>moby</Category><serviceName>HelloBi
> > > omobyWorld_TMP_4</serviceName><serviceType>Testing</serviceTyp
> > > e><serviceLSID></serviceLSID><authURI>
> > > samples.jmoby.net</authURI><signatureURL></signatureURL><URL>
> > > http://mobycentral.icapture.ubc.ca:8090/axis/services/HelloBio
> > > mobyWorld?abc=def&amp;yes=no
> > > </URL><contactEmail>martin.senger at gmail.com</contactEmail><aut
> > horitativeService>1</authoritativeService><Description><![CDATA[Yes,
> > > you can unregister this service anytime...]]></Description><Input>
> > > <Simple articleName="Object">
> > > <objectType>Object</objectType>
> > > </Simple>
> > > </Input>
> > > <secondaryArticles>
> > > </secondaryArticles>
> > > <Output>
> > > </Output>
> > > </registerService>
> > >
> > > (you may noticed that the URL has now a properly escaped
> > > ampersand). The service was registered successfully - but
> > > when I asked for it (findService) I got back this:
> > >
> > > <Services>
> > >         <Service authURI='samples.jmoby.net'
> > > serviceName='HelloBiomobyWorld_TMP_4' lsid='urn:lsid:
> > > biomoby.org:serviceinstance:samples.jmoby.net
> > > ,HelloBiomobyWorld_TMP_4:2006-09-28T11-52-07Z'>
> > >         <serviceType lsid='urn:lsid:
> > > biomoby.org:servicetype:Testing:2006-02-25T12-49-15Z'>Testing<
> > > /serviceType>
> > >         <authoritative>1</authoritative>
> > >         <Category>moby</Category>
> > >         <Description><![CDATA[Yes, you can unregister this
> > > service anytime...]]></Description>
> > >         <contactEmail>martin.senger at gmail.com</contactEmail>
> > >         <signatureURL></signatureURL>
> > >         <URL>
> > > http://mobycentral.icapture.ubc.ca:8090/axis/services/HelloBio
> > > mobyWorld?abc=def&yes=no
> > > </URL>
> > >         <Input>
> > >                 <Simple articleName='Object'>
> > >                         <objectType lsid='urn:lsid:
> > > biomoby.org:objectclass:Object:2001-09-21T16-00-00Z'>Object</o
> > > bjectType>
> > >                 </Simple>
> > >         </Input>
> > >         <Output>
> > >         </Output>
> > >         <secondaryArticles>
> > >                 </secondaryArticles>
> > >         </Service>
> > >
> > > </Services>
> > >
> > > (you may notice that here the URL has wrongly an un-escaped
> > > ampersand).
> > >
> > > Cheers,
> > > Martin
> > >
> > >
> > > --
> > > Martin Senger
> > >    email: martin.senger at gmail.com
> > >    skype: martinsenger
> > > _______________________________________________
> > > MOBY-dev mailing list
> > > MOBY-dev at lists.open-bio.org
> > > http://lists.open-bio.org/mailman/listinfo/moby-dev
> >
> > _______________________________________________
> > MOBY-dev mailing list
> > MOBY-dev at lists.open-bio.org
> > http://lists.open-bio.org/mailman/listinfo/moby-dev
> >
> >
> 
> 
> -- 
> Martin Senger
>    email: martin.senger at gmail.com
>    skype: martinsenger
> _______________________________________________
> MOBY-dev mailing list
> MOBY-dev at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/moby-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: findservicetest.pl_EDDIE
Type: application/octet-stream
Size: 1537 bytes
Desc: not available
URL: <http://lists.open-bio.org/pipermail/moby-dev/attachments/20060928/af13db3e/attachment-0002.obj>


More information about the MOBY-dev mailing list