You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2014/07/11 20:30:29 UTC
[3/5] git commit: [CXF-5873] Fix a problem of a ton of logs if the
client pre-maturely closes a connection.
[CXF-5873] Fix a problem of a ton of logs if the client pre-maturely closes a connection.
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/f4fbe420
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/f4fbe420
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/f4fbe420
Branch: refs/heads/master
Commit: f4fbe4206eba213d60698e89bba47b1baff8dfd7
Parents: 1b3b938
Author: Daniel Kulp <dk...@apache.org>
Authored: Fri Jul 11 12:47:45 2014 -0400
Committer: Daniel Kulp <dk...@apache.org>
Committed: Fri Jul 11 14:29:31 2014 -0400
----------------------------------------------------------------------
.../binding/soap/interceptor/SoapOutInterceptor.java | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/f4fbe420/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapOutInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapOutInterceptor.java b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapOutInterceptor.java
index 4fde027..df17631 100644
--- a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapOutInterceptor.java
+++ b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapOutInterceptor.java
@@ -20,6 +20,7 @@
package org.apache.cxf.binding.soap.interceptor;
+import java.io.EOFException;
import java.io.OutputStream;
import java.util.List;
import java.util.Map;
@@ -296,6 +297,7 @@ public class SoapOutInterceptor extends AbstractSoapInterceptor {
try {
XMLStreamWriter xtw = message.getContent(XMLStreamWriter.class);
if (xtw != null) {
+ // Write body end
xtw.writeEndElement();
// Write Envelope end element
xtw.writeEndElement();
@@ -304,9 +306,14 @@ public class SoapOutInterceptor extends AbstractSoapInterceptor {
xtw.flush();
}
} catch (XMLStreamException e) {
- SoapVersion soapVersion = message.getVersion();
- throw new SoapFault(new org.apache.cxf.common.i18n.Message("XML_WRITE_EXC", BUNDLE), e,
- soapVersion.getSender());
+ if (e.getCause() instanceof EOFException) {
+ //Nothing we can do about this, some clients will close the connection early if
+ //they fully parse everything they need
+ } else {
+ SoapVersion soapVersion = message.getVersion();
+ throw new SoapFault(new org.apache.cxf.common.i18n.Message("XML_WRITE_EXC", BUNDLE), e,
+ soapVersion.getSender());
+ }
}
}
}