[MOBY-dev] JAX-WS BioMoby API (2nd round).
Dmitry Repchevsky
dmitry.repchevski at bsc.es
Wed Jan 16 19:23:05 UTC 2008
>
> Sorry, I meant something implementing org.biomoby.shared.Central, since
> things are much easier to be adopted if they use the existing jMoby
> interface definitions. There's no one class bringing all the operations
> together from org.biomoby.shared.jaxb.registry is there, or am I missing
> something obvious?
Yeah! I understand. You have the point.
In MobyRegistry I have
es.inb.biomoby.registry.model.CentralDigestFactory with the comment:
* Utility class which is not in the main package because it's not clear
yet the entire
* architecture of the registry package...
The problem is that Moby Central contains many objects that are _almost_
identical.
Since I am using JAXB classes I had to choose between having several
copies or having (if possible) one class shared between operations
(messages).
The latter is not always possible so to be coherent I encapsulated such
objects inside operations (but there are obvious cases like
RetrieveResourceURLs.class which is shared).
I thought to implement some upper layer API to manage it all (something
I done in CentralDigestFactory which is definitely shouldn't be in this
jar...) but the question is:
Should it be based on JAXB based classes? If yes, which one I have to
select (in case I have different for different operations)?
If no (which I do not like), I'll finish having even more duplications
between JAXB (for XML) and API versions...
I think the first way is better - select the JAXB classes (like
org.biomoby.shared.jaxb.registry.FindServiceOperation.Services.Service).
put it outside the FindServiceOperation in some model package.
Next question is the functionality itself... most of the functionality
is implemented inside xxxOperation itself. Just look:
FindServiceOperation endpoint = new
FindServiceOperation("http://moby-dev.inab.org/cgi-bin/MOBY-Central.pl");
FindService request = new FindService("getEntryFromPDB", "inb.bsc.es");
Services response = endpoint.call(request);
for (Service service : response.getServices())
{
...
I understand in JMoby there is a cache... I always prefer cache +
background cache update...
In two words I'm open to here your suggestions and ready to implement it.
Regards,
Dmitry
More information about the MOBY-dev
mailing list