You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jaxme-dev@ws.apache.org by Jochen Wiedmann <jo...@ispsoft.de> on 2004/01/08 11:51:04 UTC

Fwd: Marriage of Betwixt and Jaxme: Is it possible?

Sorry, resent due to wrong email address "jakarta-dev" rather than "jaxme-dev".


-------- Original Message --------
Subject: Marriage of Betwixt and Jaxme: Is it possible?
Date: Thu, 08 Jan 2004 11:48:25 +0100
From: Jochen Wiedmann <jo...@ispsoft.de>
To: commons-dev@jakarta.apache.org,  jakarta-dev@ws.apache.org


Hi,

as I am about to write a first version of a JaxMe schema reader taking beans
as input I am sure that I would rewrite lots of code from Betwixt. In
particular I am sure, that I would rewrite code that inspects the beans
and assigns guidelines like "this element wants its properties as
attributes" or "this property is called foo, but in XML we want it
as bar".

My question is, whether it is possible or can be made possible to make
Betwixt create an XML Schema. That would enable us to have a pipeline
Betwixt -> JaxMe which finally creates JAXB compliant Java sources using
the original beans. If so, please advice me as a Betwixt novice how to
get at least a very simple bean converted into XML Schema.


Jochen




---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org


Re: Marriage of Betwixt and Jaxme: Is it possible?

Posted by robert burrell donkin <rd...@apache.org>.
hi jochen

i've been interested in this kind of cross-fertilization for some time 
and i'd be happy to give what help i can but should probably warn folks 
that betwixt is still sadly lacking many important features. extensive 
refactoring is required before a lot of the more sophisticated (but 
missing features) are adding. another issue is that betwixt has never 
had a full release. the good news is that i now know a lot more about 
what a good start-from-java mapper needs to do.

i don't have too much time right now but i plan to work on betwixt this 
weekend and i should be able to find some time to look into this (at 
least a little) as well. i'll start out by outlining some (hopefully) 
pertinent bits and pieces about the design.

betwixt divides neatly into three sections: marshalling, unmarshalling 
and introspection. this is good because it's the introspection bit that 
should be of interest. unfortunately, at the moment the actual 
un/marshalling code is too clever and the descriptors resulting from 
the introspection too dumb and unsophisticated. hopefully this will be 
rectified in the future but it shouldn't matter too much for reasonable 
simple mappings.

there is another note of warning that i'd like to add. there are some 
use cases which arise in start-from-java which result in classes of 
document which probably can't be expressed correctly in schema. for 
example, one of the limitations of betwixt right now is that it's not 
possible to have a collective mapping containing subclasses with 
sub-graphs which are only know at run time. so, i'd suggest that 
efforts are put into supporting the subset of mappings whose class of 
documents produces can satisfy a single schema.

i'd suggest that the place to start from is from the introspection 
results. this is a (partial) object model rooted at a XMLBeanInfo 
instance. this was inspired by the BeanInfo instance associated with 
java beans. unforunately, it's badly documented.

more later...

- robert

On 8 Jan 2004, at 10:51, Jochen Wiedmann wrote:

>
> Sorry, resent due to wrong email address "jakarta-dev" rather than 
> "jaxme-dev".
>
>
> -------- Original Message --------
> Subject: Marriage of Betwixt and Jaxme: Is it possible?
> Date: Thu, 08 Jan 2004 11:48:25 +0100
> From: Jochen Wiedmann <jo...@ispsoft.de>
> To: commons-dev@jakarta.apache.org,  jakarta-dev@ws.apache.org
>
>
> Hi,
>
> as I am about to write a first version of a JaxMe schema reader taking 
> beans
> as input I am sure that I would rewrite lots of code from Betwixt. In
> particular I am sure, that I would rewrite code that inspects the beans
> and assigns guidelines like "this element wants its properties as
> attributes" or "this property is called foo, but in XML we want it
> as bar".
>
> My question is, whether it is possible or can be made possible to make
> Betwixt create an XML Schema. That would enable us to have a pipeline
> Betwixt -> JaxMe which finally creates JAXB compliant Java sources 
> using
> the original beans. If so, please advice me as a Betwixt novice how to
> get at least a very simple bean converted into XML Schema.
>
>
> Jochen
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: jaxme-dev-help@ws.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org