You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@taverna.apache.org by Stian Soiland-Reyes <st...@apache.org> on 2018/01/04 16:04:03 UTC
WADL/XSD for Taverna Server Client
I updated the package names of
https://github.com/apache/incubator-taverna-server/tree/master/taverna-server-client
which required some fixes and reindentation of the WADL file
https://github.com/apache/incubator-taverna-server/blob/master/taverna-server-client/src/main/wadl/tavserv.wadl
..which made me investigate how this all works.
This file seems to have a massive amalgamation of XML Schema definitions
with WADL service endpoint definitions. Why are they just in a single
massive file?
The XSD types correspond to the JAXB-annotated beans within
taverna-server-webapp - for instance
https://github.com/apache/incubator-taverna-server/blob/master/taverna-server-client/src/main/wadl/tavserv.wadl#L281
corresponds to
https://github.com/apache/incubator-taverna-server/blob/master/taverna-server-webapp/src/main/java/org/taverna/server/master/rest/DirectoryContents.java#L43
Are these auto-generated? How are they kept in sync?
I understand that we don't want a runtime dependency on
taverna-server-webapp from taverna-server-client
(as silly Grid client/server applications used to do)
.. but is it not better to move the "pure" beans into a separate module
and then use a Maven plugin to generate the XSD from the annotations?
I tried to use
http://www.mojohaus.org/jaxb2-maven-plugin/Documentation/v2.2/schemagen-mojo.html
but it became very upset with all the non-JAXB classes in
taverna-server-webapp (e.g. whenever it sees an abstract inner class) --
so I don't know how to extract out the current XML schema corresponding
to the various @XmlType files (except some big grep job).
I guess the XML schemas are generated as part of the WSDL interface at
runtime?
There's also all the "proto-schema" examples for the REST interface in
https://github.com/apache/incubator-taverna-server/blob/master/usage.md#resource-runsid
which would need to be in sync.
For now I assume these are "kind of OK" and that we can move forward
with the taverna-server release candidate?
Eager readers might want to publish these schemas on
https://taverna.incubator.apache.org/ns/
(which http://ns.taverna.org.uk/ redirects to)
--
Stian Soiland-Reyes
http://orcid.org/0000-0001-9842-9718
Re: WADL/XSD for Taverna Server Client
Posted by Dmitry Repchevsky <re...@list.ru.INVALID>.
Taverna WSDL parser uses a simple data model which is not JAXB based.
taverna-wsdl-generic uses ***TypeDescriptor those are either
complex/simple/attribute.
TypeDescriptors.java parses XML Schema into the Taverna's data-model,
and then _splitters_ may extract/set the data.
As far as I remember WADL implementation doesn't use this model and do
not perform XML Schema analysis.
Cheers,
Dmitry
On 1/4/2018 5:04 PM, Stian Soiland-Reyes wrote:
> I updated the package names of
> https://github.com/apache/incubator-taverna-server/tree/master/taverna-server-client
> which required some fixes and reindentation of the WADL file
> https://github.com/apache/incubator-taverna-server/blob/master/taverna-server-client/src/main/wadl/tavserv.wadl
>
> ..which made me investigate how this all works.
>
> This file seems to have a massive amalgamation of XML Schema definitions
> with WADL service endpoint definitions. Why are they just in a single
> massive file?
>
>
> The XSD types correspond to the JAXB-annotated beans within
> taverna-server-webapp - for instance
> https://github.com/apache/incubator-taverna-server/blob/master/taverna-server-client/src/main/wadl/tavserv.wadl#L281
> corresponds to
> https://github.com/apache/incubator-taverna-server/blob/master/taverna-server-webapp/src/main/java/org/taverna/server/master/rest/DirectoryContents.java#L43
>
>
> Are these auto-generated? How are they kept in sync?
>
>
> I understand that we don't want a runtime dependency on
> taverna-server-webapp from taverna-server-client
> (as silly Grid client/server applications used to do)
> .. but is it not better to move the "pure" beans into a separate module
> and then use a Maven plugin to generate the XSD from the annotations?
>
> I tried to use
> http://www.mojohaus.org/jaxb2-maven-plugin/Documentation/v2.2/schemagen-mojo.html
> but it became very upset with all the non-JAXB classes in
> taverna-server-webapp (e.g. whenever it sees an abstract inner class) --
> so I don't know how to extract out the current XML schema corresponding
> to the various @XmlType files (except some big grep job).
>
> I guess the XML schemas are generated as part of the WSDL interface at
> runtime?
>
> There's also all the "proto-schema" examples for the REST interface in
> https://github.com/apache/incubator-taverna-server/blob/master/usage.md#resource-runsid
> which would need to be in sync.
>
> For now I assume these are "kind of OK" and that we can move forward
> with the taverna-server release candidate?
>
>
> Eager readers might want to publish these schemas on
> https://taverna.incubator.apache.org/ns/
> (which http://ns.taverna.org.uk/ redirects to)
>
>