[ 
http://issues.apache.org/jira/browse/TUSCANY-118?page=comments#action_12371115 
] 

Raymond Feng commented on TUSCANY-118:
--------------------------------------

Hi, Frank.

Thank you for looking into this. Please see my answers to your questions below.

Raymond

Question 1: These two methods simply provide StAX-based load and save support 
for XML documents (ideally they would be added to XMLHelper in a future version 
of the SDO spec). Is that right ?

<rfeng> Yes. </rfeng>

Question 2: Your new classes, DataObjectStAXWrapper, 
StAXXMLResourceImpl/StaX2SAXAdapter, could be used, under the covers, to 
implement the above SDOUtil methods. Right ?

<rfeng> Yes. </rfeng>

Question 3: Your implementation, has dependencies on and uses classes from 
axis2 and ws. Does it need to, or is this just because it's lumped together 
with other function?

<rfeng> This is really a good question. I assume ideally SDO shouldn't depend 
on Axis2 for this utility. I need some inputs from folks like Jeremy to 
understand what's the best practice here. My naive view is to check if it's 
possible that we can get approval from original author to port the code into 
our code base. Antoher way is that we implement the utlity by ourselves. We can 
post this question to the dev list to get feedback from the  open source 
veterans. </rfeng>

Question 4: Are there any other new dependencies that this adds to the SDO 
project?

<rfeng> I assume StAX API and impl should be good enough if the dependency in 
question 3 can be resovled. </rfeng>

> Adding Serializer/Deserializer for DataObject using StAX for better Axis2 
> AXIOM integration
> -------------------------------------------------------------------------------------------
>
>          Key: TUSCANY-118
>          URL: http://issues.apache.org/jira/browse/TUSCANY-118
>      Project: Tuscany
>         Type: Improvement
>   Components: Java SCA Axis Integration, Java SDO Implementation
>     Reporter: Raymond Feng
>  Attachments: rfeng_stax.diff, rfeng_stax_axis_095.diff
>
> Here are the key classes:
> 1) DataObjectStAXWrapper
> Implements "org.apache.axis2.databinding.ADBBean" interface by feeding 
> elements and attibutes to "org.apache.axis2.databinding.utils.ADBPullParser". 
> It can be used as
> a Serializer for DataObject to be serialized as OMElement. 
>  
> 2) StAXXMLResourceImpl and StAX2SAXAdapter
> StAXXMLResourceImpl extends "org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl" 
> to provide additional methods to load DataObject directly from 
> XMLStreamReader. StAX2SAXAdpter is responsible to pull StAX events from 
> XMLSreamReader and generate SAX events so that they can be consumed by 
> XMLResourceImpl.
> 3) DataObjectStAXWrapperTestCase 
> It tests the round trip for "DataObject --> OMElment --> DataObject". Both 
> static SDO model (pre-generated) and dynamic SDO model (loaded from WSDL/XSD) 
> are covered. It also test the cost of the optimized roundtrip against the old 
> "quick and dirty"  way (DataObject --> OutputStream --> InputStream --> 
> OMElement --> OutputStream --> InputStream --> DataObject).
> It shows more that 400% performance gain.
>  
> It seems that files in set 1 and 2 are more fit to be included in the SDO 
> sub-project. The following helper method is desirable.
> void SDOUtil.load(TypeHelper scope, XMLStreamReader reader, Object options)
> XMLStreamReader SDOUtil.save(TypeHelper scope, XMLDocument document, Object 
> options)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to