Repository: cxf Updated Branches: refs/heads/2.6.x-fixes 47d6022fb -> 1a620fa29
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/1a620fa2 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/1a620fa2 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/1a620fa2 Branch: refs/heads/2.6.x-fixes Commit: 1a620fa29da342e9d0bd5ba7166f3f73d56e3b0e Parents: 47d6022 Author: xldai <[email protected]> Authored: Wed May 7 17:51:13 2014 +0800 Committer: xldai <[email protected]> Committed: Wed May 7 17:51:13 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/1a620fa2/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 466d0be..2a2249d 100644 --- a/api/src/main/java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java +++ b/api/src/main/java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java @@ -209,8 +209,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; }
