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 "Myles Bunbury (JIRA)" <ji...@apache.org> on 2010/07/08 21:40:50 UTC
[jira] Commented: (WSCOMMONS-550) OMTextImpl.getText() only works
once with a datahandler
[ https://issues.apache.org/jira/browse/WSCOMMONS-550?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12886424#action_12886424 ]
Myles Bunbury commented on WSCOMMONS-550:
-----------------------------------------
Suggested fix, based on the v1.2.8 code:
In OMTextImpl.getText(), change:
return TextHelper.toString(getInputStream());
to:
this.value = TextHelper.toString(getInputStream());
return this.value;
The idea is to discountinue use of the inputstream, and store the string that's been generated for future use. Perhaps some cleanup of the original datahandler would be useful too.
> 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
>
> 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.