[ 
https://issues.apache.org/jira/browse/WSCOMMONS-518?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andreas Veithen reopened WSCOMMONS-518:
---------------------------------------

      Assignee: Andreas Veithen  (was: Rich Scheuerle)

The org.apache.axiom.util.stax package is specified to contain "StAX utility 
classes not depending on the Axiom API" (see package Javadoc). This is broken 
by the introduction of the getOMAttachmentAccessorXMLStreamReader, which 
introduces a dependency on OMAttachmentAccessor.

Also the XMLStreamReaderContainer interface is not a utility class but an 
extension of the StAX API. Therefore it should probably go to 
org.apache.axiom.ext.stax.

I will try to clean this up for the Axiom 1.2.9 release.

> Some consumers of Axiom need direct access to the orignal 
> parser/XMLStreamReader
> --------------------------------------------------------------------------------
>
>                 Key: WSCOMMONS-518
>                 URL: https://issues.apache.org/jira/browse/WSCOMMONS-518
>             Project: WS-Commons
>          Issue Type: Bug
>          Components: AXIOM
>            Reporter: Rich Scheuerle
>            Assignee: Andreas Veithen
>             Fix For: Axiom 1.2.9
>
>   Original Estimate: 120h
>  Remaining Estimate: 120h
>
> Background:
> The dialect, "safe reader" and other improvements to Axiom allow the Axiom 
> builders and other Axiom specific code to accommodate differences between 
> different vendor XMLStreamReader.
> The Axiom implementation has been changed to add wrappers and delegates 
> around the original, system XMLStreamReader.
> Problem:
> I agree with these improvements, but there is currently no way for a consumer 
> of Axiom to access the original XMLStreamReader.  A particular consumer may 
> need to access the original XMLStreamReader due its dependency on a 
> particular vendor implementation.
> Proposal/Solution:
> Two new methods are added to the XMStreamReaderUtils class:
>    /**
>      * getOriginalXMLStreamReader
>      * Searches the wrapper and delegate classes to find the original 
> XMLStreamReader
>      * This method should only be used when a consumer of Axiom really needs 
> to 
>      * access the original stream reader.
>      * @param parser XMLStreamReader used by Axiom
>      * @return original parser 
>      */
>     public static XMLStreamReader getOriginalXMLStreamReader(XMLStreamReader 
> parser) ...
>    /**
>      * Searches the wrapper and delegate classes to find an XMLStreamReader
>      * that implements the OMAttachmentAccessor
>      * @param parser
>      * @return XMLStreamREader that implements OMAttachmentAccessor or null
>      */
>     public static XMLStreamReader 
> getOMAttachmentAccessorXMLStreamReader(XMLStreamReader parser) ...
> To facilitate these changes, a new interface is proposed: 
> XMLStreamReaderContainer.
> **
>  * Marker interface for Axiom XMLStreamReader classes that
>  * wrap or delegate to another (parent) XMLStreamReader.
>  * 
>  * The marker interface is necessary so that consumers 
>  * can access the original parser.
>  * @see XMLStreamReaderUtils
>  * 
>  * Note that the only the getParent() method is applicable.
>  * Please do not add a setParent() method since that would
>  * violate the immutable characteristic of the XMLStreamReaderWrapper
>  */
> public interface XMLStreamReaderContainer {
>     XMLStreamReader getParent();
> }
> Also:
> The ability to access the original XMLStreamReader and the 
> OMAttachmentAccessor XMLStreamReader is necessary for the Axis2 JAX-WS JAXB 
> Unmarshaling code.
> Once these two methods are added to Axiom, I will be using a different JIRA 
> for the Axis2 change.
> Current State:
> Still doing my testing.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to