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 12:29:15 UTC
[cxf] branch master 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 master
in repository https://gitbox.apache.org/repos/asf/cxf.git
The following commit(s) were added to refs/heads/master by this push:
new 3b5d850 CXF-7691 - Improving error message for multiple WSS4JStaxOutInterceptor instances
3b5d850 is described below
commit 3b5d850d00e7dc1bbc3f44e58e289a5e937faf4c
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
---
.../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 0d6d513..df7972e 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
@@ -133,6 +133,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.