You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2015/07/13 17:52:19 UTC
cxf git commit: Fixing MTOM error
Repository: cxf
Updated Branches:
refs/heads/3.0.x-fixes b6da59447 -> 1645e0e7e
Fixing MTOM error
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/1645e0e7
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/1645e0e7
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/1645e0e7
Branch: refs/heads/3.0.x-fixes
Commit: 1645e0e7edf81287a2b6d6f47d18a4619c4949d2
Parents: b6da594
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Mon Jul 13 16:52:10 2015 +0100
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Mon Jul 13 16:52:10 2015 +0100
----------------------------------------------------------------------
.../main/java/org/apache/cxf/ws/security/SecurityConstants.java | 5 ++---
.../security/wss4j/policyhandlers/AbstractBindingBuilder.java | 2 +-
.../test/resources/org/apache/cxf/systest/ws/mtom/client.xml | 2 ++
.../test/resources/org/apache/cxf/systest/ws/mtom/server.xml | 2 ++
4 files changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/1645e0e7/rt/ws/security/src/main/java/org/apache/cxf/ws/security/SecurityConstants.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/SecurityConstants.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/SecurityConstants.java
index fd4c090..72d8f55 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/SecurityConstants.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/SecurityConstants.java
@@ -248,9 +248,8 @@ public final class SecurityConstants {
/**
* Whether to store bytes (CipherData or BinarySecurityToken) in an attachment. The default is
- * true if MTOM is enabled. Set it to false to BASE-64 encode the bytes and "inlined" them in
- * the message instead. Setting this to true is more efficient, as it means that the BASE-64
- * encoding step can be skipped. This only applies to the DOM WS-Security stack.
+ * false. Setting this to true is more efficient, as it means that the BASE-64 encoding step can be
+ * skipped. MTOM must be enabled for this to work. This only applies to the DOM WS-Security stack.
*/
public static final String STORE_BYTES_IN_ATTACHMENT = "ws-security.store.bytes.in.attachment";
http://git-wip-us.apache.org/repos/asf/cxf/blob/1645e0e7/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
index e0245e3..072b2ae 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
@@ -196,7 +196,7 @@ public abstract class AbstractBindingBuilder extends AbstractCommonBindingHandle
boolean storeBytes =
MessageUtils.getContextualBoolean(
- message, SecurityConstants.STORE_BYTES_IN_ATTACHMENT, true
+ message, SecurityConstants.STORE_BYTES_IN_ATTACHMENT, false
);
if (storeBytes && AttachmentUtil.isMtomEnabled(message)) {
storeBytesInAttachment = true;
http://git-wip-us.apache.org/repos/asf/cxf/blob/1645e0e7/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/mtom/client.xml
----------------------------------------------------------------------
diff --git a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/mtom/client.xml b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/mtom/client.xml
index ab70a28..4a2530c 100644
--- a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/mtom/client.xml
+++ b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/mtom/client.xml
@@ -90,6 +90,7 @@
<entry key="ws-security.signature.properties" value="alice.properties"/>
<entry key="ws-security.signature.username" value="alice"/>
<entry key="ws-security.callback-handler" value="org.apache.cxf.systest.ws.common.KeystorePasswordCallback"/>
+ <entry key="ws-security.store.bytes.in.attachment" value="true"/>
<entry key="mtom-enabled" value="true"/>
</jaxws:properties>
</jaxws:client>
@@ -98,6 +99,7 @@
<jaxws:properties>
<entry key="ws-security.encryption.properties" value="bob.properties"/>
<entry key="ws-security.encryption.username" value="bob"/>
+ <entry key="ws-security.store.bytes.in.attachment" value="true"/>
<entry key="mtom-enabled" value="true"/>
</jaxws:properties>
</jaxws:client>
http://git-wip-us.apache.org/repos/asf/cxf/blob/1645e0e7/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/mtom/server.xml
----------------------------------------------------------------------
diff --git a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/mtom/server.xml b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/mtom/server.xml
index 77f9361..505b5c0 100644
--- a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/mtom/server.xml
+++ b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/mtom/server.xml
@@ -99,6 +99,7 @@
<entry key="ws-security.signature.properties" value="bob.properties"/>
<entry key="ws-security.encryption.properties" value="alice.properties"/>
<entry key="ws-security.encryption.username" value="alice"/>
+ <entry key="ws-security.store.bytes.in.attachment" value="true"/>
<entry key="mtom-enabled" value="true"/>
</jaxws:properties>
</jaxws:endpoint>
@@ -107,6 +108,7 @@
<jaxws:properties>
<entry key="ws-security.callback-handler" value="org.apache.cxf.systest.ws.common.KeystorePasswordCallback"/>
<entry key="ws-security.signature.properties" value="bob.properties"/>
+ <entry key="ws-security.store.bytes.in.attachment" value="true"/>
<entry key="mtom-enabled" value="true"/>
</jaxws:properties>
</jaxws:endpoint>