Author: dkulp
Date: Wed Nov 4 18:20:42 2009
New Revision: 832833
URL: http://svn.apache.org/viewvc?rev=832833&view=rev
Log:
Merged revisions 832352 via svnmerge from
https://svn.apache.org/repos/asf/cxf/branches/2.2.x-fixes
........
r832352 | ffang | 2009-11-03 04:05:17 -0500 (Tue, 03 Nov 2009) | 1 line
[CXF-2517]Exception shouldn't be considered as JBI ERROR,should use JBI FAULT
instead
........
Modified:
cxf/branches/2.1.x-fixes/ (props changed)
cxf/branches/2.1.x-fixes/rt/bindings/jbi/src/main/java/org/apache/cxf/binding/jbi/interceptor/JBIFaultOutInterceptor.java
cxf/branches/2.1.x-fixes/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBIDestinationOutputStream.java
Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified:
cxf/branches/2.1.x-fixes/rt/bindings/jbi/src/main/java/org/apache/cxf/binding/jbi/interceptor/JBIFaultOutInterceptor.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/bindings/jbi/src/main/java/org/apache/cxf/binding/jbi/interceptor/JBIFaultOutInterceptor.java?rev=832833&r1=832832&r2=832833&view=diff
==============================================================================
---
cxf/branches/2.1.x-fixes/rt/bindings/jbi/src/main/java/org/apache/cxf/binding/jbi/interceptor/JBIFaultOutInterceptor.java
(original)
+++
cxf/branches/2.1.x-fixes/rt/bindings/jbi/src/main/java/org/apache/cxf/binding/jbi/interceptor/JBIFaultOutInterceptor.java
Wed Nov 4 18:20:42 2009
@@ -61,7 +61,9 @@
StaxUtils.writeStartElement(writer, prefix,
JBIFault.JBI_FAULT_ROOT,
JBIConstants.NS_JBI_BINDING);
if (!jbiFault.hasDetails()) {
- writer.writeEmptyElement("fault");
+ Element faultString =
DOMUtils.createDocument().createElement("fault");
+ faultString.setTextContent(jbiFault.getCause().getMessage());
+ StaxUtils.writeNode(faultString, writer, true);
} else {
Element detail = jbiFault.getDetail();
Element elem = DOMUtils.getFirstElement(detail);
Modified:
cxf/branches/2.1.x-fixes/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBIDestinationOutputStream.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBIDestinationOutputStream.java?rev=832833&r1=832832&r2=832833&view=diff
==============================================================================
---
cxf/branches/2.1.x-fixes/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBIDestinationOutputStream.java
(original)
+++
cxf/branches/2.1.x-fixes/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBIDestinationOutputStream.java
Wed Nov 4 18:20:42 2009
@@ -96,10 +96,13 @@
if (inMessage.getExchange().getOutFaultMessage() != null) {
org.apache.cxf.interceptor.Fault f =
(org.apache.cxf.interceptor.Fault)
inMessage.getContent(Exception.class);
- if (f.hasDetails()) {
- Fault fault = xchng.createFault();
+ if (!(f.getCause() instanceof Error)) {
+ Fault fault = xchng.createFault();
fault.setContent(new DOMSource(doc));
xchng.setFault(fault);
+ if (!f.hasDetails()) {
+ xchng.setProperty("faultstring", f.getMessage());
+ }
} else {
xchng.setError(f);
}