Repository: cxf
Updated Branches:
  refs/heads/2.7.x-fixes b819dbbb2 -> 58fd0937f


fix CXF-5732 Wrong faultcode in case failed schema validation on server side


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/58fd0937
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/58fd0937
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/58fd0937

Branch: refs/heads/2.7.x-fixes
Commit: 58fd0937f4abcf291089f6719f5230be8d383b54
Parents: b819dbb
Author: xldai <[email protected]>
Authored: Wed May 7 16:36:28 2014 +0800
Committer: xldai <[email protected]>
Committed: Wed May 7 16:36:28 2014 +0800

----------------------------------------------------------------------
 .../java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/58fd0937/api/src/main/java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java
----------------------------------------------------------------------
diff --git 
a/api/src/main/java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java 
b/api/src/main/java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java
index c548916..225ccdc 100644
--- a/api/src/main/java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java
+++ b/api/src/main/java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java
@@ -207,8 +207,10 @@ public class DocLiteralInInterceptor extends 
AbstractInDatabindingInterceptor {
     
             message.setContent(List.class, parameters);
         } catch (Fault f) {
-            if (!isRequestor(message)) {
+            if (isRequestor(message)) {
                 f.setFaultCode(Fault.FAULT_CODE_CLIENT);
+            } else {
+                f.setFaultCode(Fault.FAULT_CODE_SERVER);
             }
             throw f;
         }

Reply via email to