axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Veithen" <>
Subject Comments about the new UnknownContentBuilder (AXIS2-4153)
Date Fri, 28 Nov 2008 13:39:37 GMT
Hi Thilina,

I reviewed the changes you made for AXIS2-4153/WSCOMMONS-404 (revision
721338) and I would like to make the following comments:

1. The class InputStreamDataSource (the one in
org.apache.axis2.builder.unknowncontent) violates the
javax.activation.DataSource contract which says for the getInputStream
method that "a new InputStream object must be returned each time this
method is called, and [that] the stream must be positioned at the
beginning of the data." The consequence will be that the message
produced by UnknownContentBuilder can only be read once. This is a
serious flaw.

2. The AXIOM tree produced by UnknownContentBuilder has only two
nodes: an OMElement and an OMText (with a DataHandler). Using an
OMSourcedElement/OMDataSource is not justified for this and would
introduce unnecessary complexity and overhead.

3. The code in UnknownContentBuilder to a large extend duplicates the
code in org.apache.axis2.format.BinaryBuilder (in
axis2-transport-base), which doesn't have problems 1 and 2.

Could you please make a proposal how to improve this?



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message