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/769010bf5583ae2ae49bbdb39593a9aca6ffc401

Removing the OM traversing to look for optimisable objects as suggest… · apache/axis-axis2-java-core@769010b · GitHub
Skip to content

Commit 769010b

Browse files
author
Nanayakkara Kuruppuge Thilina Gunarathne
committed
Removing the OM traversing to look for optimisable objects as suggested by my proposal in the mailing list
1 parent dc2d55d commit 769010b

File tree

7 files changed

+5
-105
lines changed

7 files changed

+5
-105
lines changed

modules/codegen/test-resources/xmls/axis2.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!-- ================================================= -->
33
<!-- Parameters -->
44
<!-- ================================================= -->
5-
<parameter name="enableMTOM" locked="false">true</parameter>
5+
<parameter name="enableMTOM" locked="false">false</parameter>
66

77
<parameter name="userName" locked="false">admin</parameter>
88
<parameter name="password" locked="false">axis2</parameter>

modules/core/conf/axis2.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<!-- ================================================= -->
55
<parameter name="hotdeployment" locked="false">true</parameter>
66
<parameter name="hotupdate" locked="false">false</parameter>
7-
<parameter name="enableMTOM" locked="false">true</parameter>
7+
<parameter name="enableMTOM" locked="false">false</parameter>
88
<parameter name="sendStacktraceDetailsWithFaults" locked="false">true</parameter>
99

1010
<!-- Uncomment this to enable REST support -->

modules/core/src/org/apache/axis2/Constants.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,6 @@ public static interface Configuration {
196196
public static final String HTTP_METHOD = "HTTP_METHOD";
197197
public static final String HTTP_METHOD_POST = "POST";
198198

199-
// we need to some times send the message as multipart/related, even if there is no MTOM stuff in the envelope.
200-
public static final String FORCE_MIME = "ForceMimeBoundary";
201199
public static final String CONTENT_TYPE = "ContentType";
202200
public static final String IS_USING_SEPARATE_LISTENER = "IsUsingSeparateListener";
203201

modules/core/src/org/apache/axis2/transport/http/HTTPTransportUtils.java

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,6 @@
5656

5757
public class HTTPTransportUtils {
5858

59-
public static boolean checkEnvelopeForOptimise(SOAPEnvelope envelope) {
60-
return isOptimised(envelope);
61-
}
6259

6360
public static SOAPEnvelope createEnvelopeFromGetRequest(String requestUrl, Map map ,
6461
ConfigurationContext configurationContext) throws AxisFault {
@@ -115,20 +112,7 @@ public static boolean doWriteMTOM(MessageContext msgContext) {
115112
enableMTOM = Constants.VALUE_TRUE.equals(
116113
msgContext.getProperty(Constants.Configuration.ENABLE_MTOM));
117114
}
118-
119-
boolean forceMIME =
120-
Constants.VALUE_TRUE.equals(msgContext.getProperty(Constants.Configuration.FORCE_MIME));
121-
122-
if (forceMIME) {
123-
return true;
124-
}
125-
126-
// If MTOM is explicitly disabled, no need to check the envelope
127-
if (!enableMTOM) {
128-
return false;
129-
}
130-
131-
return HTTPTransportUtils.checkEnvelopeForOptimise(msgContext.getEnvelope());
115+
return enableMTOM;
132116
}
133117

134118
public static boolean processHTTPGetRequest(MessageContext msgContext, InputStream in,
@@ -344,21 +328,4 @@ public static boolean isDoingREST(MessageContext msgContext) {
344328

345329
return enableREST;
346330
}
347-
348-
private static boolean isOptimised(OMElement element) {
349-
Iterator childrenIter = element.getChildren();
350-
boolean isOptimized = false;
351-
352-
while (childrenIter.hasNext() && !isOptimized) {
353-
OMNode node = (OMNode) childrenIter.next();
354-
355-
if ((OMNode.TEXT_NODE == node.getType()) && ((OMText) node).isOptimized()) {
356-
isOptimized = true;
357-
} else if (OMNode.ELEMENT_NODE == node.getType()) {
358-
isOptimized = isOptimised((OMElement) node);
359-
}
360-
}
361-
362-
return isOptimized;
363-
}
364331
}

modules/core/test/org/apache/axis2/transport/http/HTTPTransportUtilTest.java

Lines changed: 0 additions & 65 deletions
This file was deleted.

modules/integration/test/org/apache/axis2/engine/chunking-disabled-axis2.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<!-- ================================================= -->
55
<parameter name="hotdeployment" locked="false">true</parameter>
66
<parameter name="hotupdate" locked="false">false</parameter>
7-
<parameter name="enableMTOM" locked="false">true</parameter>
7+
<parameter name="enableMTOM" locked="false">false</parameter>
88
<!-- Uncomment this to enable REST support -->
99
<!-- <parameter name="enableREST" locked="false">true</parameter>-->
1010

modules/integration/test/org/apache/axis2/integration/UtilServer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public static synchronized void start(String repository) throws Exception {
7070
if (count == 0) {
7171
ConfigurationContext er = getNewConfigurationContext(repository);
7272

73-
receiver = new SimpleHTTPServer(er, Constants.TESTING_PORT);
73+
receiver = new SimpleHTTPServer(er, 5555);
7474

7575
try {
7676
receiver.start();

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