File tree Expand file tree Collapse file tree 1 file changed +1
-14
lines changed
modules/jaxws/src/org/apache/axis2/jaxws/api Expand file tree Collapse file tree 1 file changed +1
-14
lines changed Original file line number Diff line number Diff line change 1818 */
1919package org .apache .axis2 .jaxws .api ;
2020
21- import java .io .ByteArrayOutputStream ;
22-
23- import org .apache .axiom .om .OMOutputFormat ;
24- import org .apache .axiom .om .impl .MTOMXMLStreamWriter ;
25- import org .apache .axis2 .Constants ;
2621import org .apache .axis2 .jaxws .core .MessageContext ;
2722import org .apache .axis2 .jaxws .message .Message ;
2823import org .apache .commons .logging .Log ;
@@ -58,15 +53,7 @@ public String getMessageAsString() {
5853
5954 if (msg != null ) {
6055 try {
61- ByteArrayOutputStream baos = new ByteArrayOutputStream ();
62- OMOutputFormat format = new OMOutputFormat ();
63- String charSetEncoding = (String ) mc .getProperty (Constants .Configuration .CHARACTER_SET_ENCODING );
64- charSetEncoding = (charSetEncoding == null ) ? "UTF-8" : charSetEncoding ;
65- format .setCharSetEncoding (charSetEncoding );
66- MTOMXMLStreamWriter writer = new MTOMXMLStreamWriter (baos , format );
67- msg .outputTo (writer , false );
68- writer .flush ();
69- text = baos .toString (charSetEncoding );
56+ text = msg .getAsOMElement ().toString ();
7057 } catch (Throwable t ) {
7158 if (log .isDebugEnabled ()) {
7259 log .debug ("Cannot access message as string" , t );
You can’t perform that action at this time.
0 commit comments