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<sen...@apache.org> 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 >