Hi Senaka, I updated the documentation of getXMLStreamReader to make it clear what are the assumptions that the caller can make about the returned reader and I added a link from OMXMLStreamReaderValidator to that documentation. See [1].
Andreas [1] http://people.apache.org/~veithen/axiom/apidocs/ On Tue, Aug 11, 2009 at 03:42, Senaka Fernando<[email protected]> wrote: > Hi Andreas, > > Yes, this is what made me more inquisitive about whether it was Axiom or > Axis2 that needed some fixing. I was unaware that this was fixed a few weeks > ago. Many thanks. > > Also, don't you think that it would be better if we could document what this > class does, or when we return an object of this type (I prefer this option), > at API level that such would be created/returned if log4j DEBUG is enabled? > So, that someone running into a similar issue in the future would perhaps > understand what caused this. There could at least be some instances where > people use older versions of Axis2 with newer versions of Axiom. WDYT? > > Thanks, > Senaka > > On Tue, Aug 11, 2009 at 12:15 AM, Andreas Veithen <[email protected] >> wrote: > >> Senaka, >> >> The purpose of OMXMLStreamReaderValidator is to validate that the >> sequence of events produced by OMStAXWrapper is correct. Note that >> code using OMElement#getXMLStreamReader should not make any >> assumptions about the implementation class returned by that method. >> There is actually no valid reason (at least with the recent XOP/MTOM >> fixes in Axiom) to cast the returned reader into an OMStAXWrapper. >> AXIS2-4363 gives some more insight into this question. >> >> Andreas >> >> On Mon, Aug 10, 2009 at 20:23, Senaka Fernando<[email protected]> wrote: >> > Hi all, >> > >> > Why do we return OMXMLStreamReaderValidator inside OMElementImpl when >> > log4j's DEBUG level is enabled and OMStAXWrapper if not? It also happens >> to >> > be that OMXMLStreamReaderValidator is not a OMStAXWrapper which makes >> some >> > code that work when log4j's DEBUG level is disabled not to work when >> log4j's >> > DEBUG level enabled. >> > >> > Thanks, >> > Senaka >> > >> >
