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 2018/04/03 13:06:16 UTC
[cxf] branch 3.1.x-fixes updated: CXF-7691 - Improving error
message for multiple WSS4JStaxOutInterceptor instances
This is an automated email from the ASF dual-hosted git repository.
coheigea pushed a commit to branch 3.1.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git
The following commit(s) were added to refs/heads/3.1.x-fixes by this push:
new 8365549 CXF-7691 - Improving error message for multiple WSS4JStaxOutInterceptor instances
8365549 is described below
commit 8365549838433bb962ab4072ee451ad2dc31cbf2
Author: Colm O hEigeartaigh <co...@apache.org>
AuthorDate: Tue Apr 3 11:17:18 2018 +0100
CXF-7691 - Improving error message for multiple WSS4JStaxOutInterceptor instances
(cherry picked from commit 3b5d850d00e7dc1bbc3f44e58e289a5e937faf4c)
---
.../apache/cxf/ws/security/wss4j/WSS4JStaxOutInterceptor.java | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JStaxOutInterceptor.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JStaxOutInterceptor.java
index 9910a6b..bca6bb3 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JStaxOutInterceptor.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JStaxOutInterceptor.java
@@ -132,6 +132,16 @@ public class WSS4JStaxOutInterceptor extends AbstractWSS4JStaxInterceptor {
public void handleMessage(SoapMessage mc) throws Fault {
OutputStream os = mc.getContent(OutputStream.class);
+ if (os == null) {
+ String error =
+ "The message outputstream is null - Multiple WSS4JStaxOutInterceptor instances are not supported";
+ WSSecurityException exception = new WSSecurityException(WSSecurityException.ErrorCode.FAILURE,
+ "empty",
+ new Object[] {error});
+ LOG.warning(error);
+ throw new Fault(exception);
+ }
+
String encoding = getEncoding(mc);
XMLStreamWriter newXMLStreamWriter;
--
To stop receiving notification emails like this one, please contact
coheigea@apache.org.