axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dasarath Weeratunge <dasarathweeratu...@yahoo.com>
Subject Re: [Axis2] DataBinding for Axis2
Date Mon, 16 May 2005 07:35:39 GMT

--- jayachandra <jayachandra@gmail.com> wrote:
> Hi Dasarath,
> If my understanding is right, convertion of objects
> to OMelement
> essentially should happen as
> (i) Coming up with an XML instance of the object
> representation
> (ii) Passing this XML instance to (StAX /
> SAX)OMBuilder and get the
> respective OMElement out of it.

This is correct but unfortunately things are not as
seemless as they sound. Last time I tried this with
XMLBeans and our StAXOMBuilder there were lot of
mismatches with the generated/expected StAX event
sequences, especially in the
(OMElement).getXMLStreamReader() &
(OMElement).getXMLStreamReaderWithoutCach(). I donít
know whether these have been fixed since then. Further
OM at present does not allow you to register a content
hander with an OMElement so that SAX events can be
taken out of an element-ó not a major problem but
something to be fixed.




> 
> In our Axis framework we should have the TypeMapping
> information
> registered (something like TypeMappingRegistry of
> Axis1.x), where will
> that go. We no more have the concept of a one
> monolithic
> server-config.wsdd for SystemContext to hold this
> registry, since each
> service is going to be deployed as a jar with it's
> own service.xml,
> will this registry be part of ServiceContext? (I'm
> presuming
> service.xml will be the place to hold service
> specific typemappings).
> Finalizing on this registry, I feel is necessary
> before we set out
> next on to coding the implementation OMXBContext,
> isn't it?
> 

The issue of type mappings is now a bit more
complicated since part of this would be generated by
the data binding framework used and another part will
be required by the glue code (OMXBContext) that we
shall be writing to integrate the particular framework
into OM.

Iím not familiar with the context hierarchy of Axis2,
but Iím sure we can find somewhere to put the mappings
;-) IMO, as long as we put them at the correct level
so that no duplication is required while being visible
to the required scope, everything should be OK.

thanks

--dasarath



> Thank you
> Jayachandra
> 
> On 5/12/05, Dasarath Weeratunge
> <dasarathweeratunge@yahoo.com> wrote:
> > Two things:
> > 1.  Data binding needs to be layered on top of OM
> >     and not incorporated into it.
> > 2.  External data-binding tools should be
> pluggable
> >     into our data binding framework.
> > 
> > So I propose that we go for the following:
> > 
> > package org.apache.axis.om.xmlbinding.*
> > 
> > interface OMXBContext {
> >    Object getObjectValue(OMElement e);
> >    OMElement getOMElement(Object e);
> >    String getTypeMapping(QName qname);
> > }
> > 
> > OMXBContextFactory {
> >    OMXBContext createContext(Properties prop);
> > }
> > 
> > There will be different implementations of
> OMXBContext
> > interface for different data-binding tools
> including
> > our own. The interface encapsulates the particular
> > marshalling/un-marshalling mechanisms specific to
> the
> > framework. For instance in the case of JAXB, for
> > converting objects to OM, one needs to use the
> > SAXOMBuilder. In the case of XMLBeans we have the
> > option of using either StAX builder or the SAX
> > builder. In our own data-binding tool we can
> optimize
> > this and create OM directly if need be without
> going
> > through XML APIs.
> > 
> > At the moment I'm working on a code generation
> tool.
> > The tool uses the schema model of XMLBeans.
> However,
> > the XMLBeans jar is ~1.8MB! So we will either have
> to
> > separate out the schema model into a smaller jar
> file
> > or write our own thing.
> > 
> > So if you guys can shoot questions/proposals we
> can
> > discuss those and move ahead.
> > 
> > Thanks
> > --dasarath
> > 
> > --- jayachandra <jayachandra@gmail.com> wrote:
> > > Dasarath et al,
> > > Can you think loud what you are finalizing in
> the
> > > databinding in
> > > Axis2.0. May be we can input our views and help
> in
> > > the implementation
> > > as well.
> > >
> > > Bye
> > > Jayachandra
> > > --
> > > -- Jaya
> > >
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> protection around
> > http://mail.yahoo.com
> > 
> 
> 
> -- 
> -- Jaya
> 


		
__________________________________ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

Mime
View raw message