axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sanjiva Weerawarana <sanj...@opensource.lk>
Subject Re: [axis2] "simple" axis data binding architecture and approach for rpc support
Date Thu, 13 Oct 2005 02:43:52 GMT
On Thu, 2005-10-13 at 07:58 +0600, Eran Chinthaka wrote:
> Pull parsing means application is controlling the stuff. Here you are
> trying to push the stuff using pull interface which is ok but not
> nice, IMO. And the usage of these beans are that you may create OM out
> of this. 
> For example, when you invoke a method public Person
> getPersonInfo(......), 
> Person p = serivceImpl.getPersonInfo(....);
> OMElement bodyFirstChild = new
> StaxOMBuilder(p.getPullParser(QName)).getDocumentElement();
> envelope.getBody().addChild(bodyFirstChild);

Eric, this approach allows us to totally defer doing any XMLification
until the last second. That is, unless someone needs the whole SOAP body
for some reason (say to compute a signature), the "bodyFirstChild"
element created above isn't actually an element in memory .. its just a
thing that can convert the Java object to an element if needed. By
having the pull API, the transport sender which is sending the message
to the wire can pull the events and pump them out directly. That avoids
creating an in-memory representation of the XML representation of the
JavaBean. 

> Our design should fit in to that scenario.
> 
> BTW, if the method was to p.writeToXml( new QName ("myPerson"), new
> ImplOfXmlStreamWriter() ) my job would have been much easier  ;-) 

Oh come on its fun to write YAPP (yet another pull parser) :).

Sanjiva.



Mime
View raw message