pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/apache/axis-axis2-java-core/commit/ca1bde77e9d0c11438d78e370c2aba8555ef4fbe

Avoid direct instantiation of Axiom implementation class (MTOMXMLStre… · apache/axis-axis2-java-core@ca1bde7 · GitHub
Skip to content

Commit ca1bde7

Browse files
committed
Avoid direct instantiation of Axiom implementation class (MTOMXMLStreamWriter).
1 parent edf128a commit ca1bde7

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

modules/jaxws/src/org/apache/axis2/jaxws/api/MessageAccessor.java

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,6 @@
1818
*/
1919
package 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;
2621
import org.apache.axis2.jaxws.core.MessageContext;
2722
import org.apache.axis2.jaxws.message.Message;
2823
import 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);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy