You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by "Lakshmi Chaparala (JIRA)" <ji...@apache.org> on 2006/06/12 16:34:31 UTC

[jira] Updated: (WSCOMMONS-32) Call to OMSourcedElementImpl.getXMLStreamReaderWithoutCaching() returns an XMLStreamReader WITH caching

     [ http://issues.apache.org/jira/browse/WSCOMMONS-32?page=all ]

Lakshmi Chaparala updated WSCOMMONS-32:
---------------------------------------

    Attachment: DataObjectOMDataSource.java

Our implementation is based off the OMDataSourceTest.java code from Axiom.  Our custom OMDataSource simply serializes a Byte array.  The source code is attached.  Our DataObjectOMDataSource is used in our code as follows:

    private OMElement getQueryResults(SNLModel snlModel, Vector requiredAttrs , IDataObjectProcessor processor) {
       //This populates the member ByteArrayOutputStream os with xml 
        getDataObjectxml(snlModel, requiredAttrs, processor);  

        //***** OMDataSource implementation **********
        String dataObjectSetNamespaceURI = "http://www.issinc.com/gateway/domain";
        OMFactory omFactory = OMAbstractFactory.getOMFactory();
        OMNamespace omNamespace = omFactory.createOMNamespace(dataObjectSetNamespaceURI, "");
        OMElement dataObjectSetElement = new OMSourcedElementImpl("DataObjectSet",
                                                                  omNamespace,
                                                                  new OMLinkedListImplFactory(),
                                                                  new DataObjectOMDataSource(os.toByteArray()));

        return dataObjectSetElement;
    }

If there is something incorrect with this implementation, please let us know.  The only way we could get it to work was to eliminate the OMSourcedElementImpl derived getXMLStreamReaderWithoutCaching() method.


> Call to OMSourcedElementImpl.getXMLStreamReaderWithoutCaching() returns an XMLStreamReader WITH caching
> -------------------------------------------------------------------------------------------------------
>
>          Key: WSCOMMONS-32
>          URL: http://issues.apache.org/jira/browse/WSCOMMONS-32
>      Project: WS-Commons
>         Type: Bug

>   Components: AXIOM
>  Environment: Windows XP, JBOSS4.0.3 SP1
>     Reporter: Lakshmi Chaparala
>     Assignee: Dennis Sosnoski
>  Attachments: DataObjectOMDataSource.java
>
> I used Axis2's OMSourcedElementTest.java as an example of how to use a  custom OMDataSource.  In this case you construct an  OMSourcedElementImpl class and give it your custom OMDataSource.  When  the service implementation class the constructed OMSourcedElementImpl  and Axiom streams it out, the OMSerializerUtil class makes a call to OMSourcedElementImpl.getXMLStreamReaderWithoutCaching(), which returns an XMLStreamReader WITH caching.  This sends the code  down an execution path that fails to stream the OMSourcedElementImpl  because it looks for OMElement objects that aren't there.

-- 
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


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org