axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robert burrell donkin <robertburrelldon...@gmail.com>
Subject Re: Any tools for converting java class to xml schema ?
Date Tue, 20 Sep 2005 19:18:44 GMT
On 9/19/05, Kr <babloosony@gmail.com> wrote:
> Hi Robert,
> 
> Your site is very interesting. I have packaged class and how do I feed
> it to your tool at http://people.apache.org/~rdonkin/tool.html ? since
> even if I keep my class in classpath your tool is not able to
> recognize it . 

the code is just intended to work as a design aid (we were talking
about various approaches to developing mappings visually) rather than
as functional software.

the applets are part of an import phase where basic reusable mappings
would be created for objects and then saved into a library. a second
mapping phase would allow advanced mappings to be developed against
given schema and is described in other design documents.

the problem with the prototype is that it uses betwixt (which - as a
dynamic binder - is well suited to fast prototyping) and has no output
facility so it's just a toy. i am keen to try to create a proper
application along the lines discussed but there's quite a bit of work
that's needed. if it happens, it'll be open sourced somewhere (though
not sure exactly where). be a while before it'd be ready for users.
(be a bit different if you were interested in helping to develop it.)

> Also how the tool take care of java collections like
> java.util.Hashtable's 

i call these collective mappings. a key question is how (and whether)
they are typed.

betwixt is bean-centric. it extends the concept of properties to
collective properties. adders are guessing using plural stemming
(getItems/addItem). this allows a type to be guessed.

jibx does less guessing (since it is field-centric) so you specify
everything. see
http://jibx.sourceforge.net/tutorial/binding-collects.html.

more thought is needed for collections with arbitrary contents. not
very easy to support (need a dynamic binder) and quite probably not
really worth the effort. polymorphic collections (multiple specified
sub-types) are more reasonable.

> and java.util.HashMap' etc.? 

jibx takes the very reasonable approach that there is not natural
mapping.  betwixt guesses a reasonable mapping and tries to match a
putter to a getter.

this is the area where a good tool would be invaluable: it's a lot of
work to have to specify in detail (ala jibx) but there isn't a single
natural strategy. the problem with betwixt's introspection is that
though the strategies make it flexible, they are too complex to learn
easily. a visual tool could show the likely results and improve the
speed at which mappings could be created (whether through jibx or
betwixt).

> Please execuse me
> if my knowledge is trivial.

it's not trivial: start from java has more than a few wrinkles and
there are not very people who know much about it.

- robert

Mime
View raw message