[ https://issues.apache.org/jira/browse/WSCOMMONS-550?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andreas Veithen resolved WSCOMMONS-550. --------------------------------------- Resolution: Invalid For a node with binary data, OMTextImpl#getText will ultimately call DataSource#getInputStream (for every invocation of getText). In the current code this is actually done indirectly via DataHandler#writeTo. The Javadoc of DataSource#getInputStream clearly specifies that "a new InputStream object must be returned each time this method is called, and the stream must be positioned at the beginning of the data." Therefore your claim that OMTextImpl "consumes" the datahandler's inputstream is incorrect. The real root cause of this problem is that the DataSource implementation violates the contract specified by the DataSource interface. Therefore you need to identify the DataSource implementation that is used here and fix it (if it is part of your code) or report a bug (if it is provided by an existing framework). > OMTextImpl.getText() only works once with a datahandler > ------------------------------------------------------- > > Key: WSCOMMONS-550 > URL: https://issues.apache.org/jira/browse/WSCOMMONS-550 > Project: WS-Commons > Issue Type: Bug > Components: AXIOM > Affects Versions: Axiom 1.2.8 > Reporter: Myles Bunbury > Assignee: Andreas Veithen > > When OMTextImpl relies on an underlying datahandler's inputstream, a call to > getText() can be a one shot deal. Once the datahandler's inputstream is > consumed, the encapsulated data is lost and subsequent calls to getText() > return "". > I ran into this situation using Synapse with debug logging enabled. A debug > log message printed out the entire SOAP envelope to the log, thereby > consuming the binary data wrapped by OMTextImpl. When later on the SOAP > envelope was transmitted via the SendMediator, the OMTextImpl could no longer > supply the data. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.