You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by ff...@apache.org on 2008/08/19 08:26:17 UTC
svn commit: r686963 -
/servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiInWsdl1Interceptor.java
Author: ffang
Date: Mon Aug 18 23:26:16 2008
New Revision: 686963
URL: http://svn.apache.org/viewvc?rev=686963&view=rev
Log:
[SM-1497]cxf bc provider should handle soap fault mesage without detail element
Modified:
servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiInWsdl1Interceptor.java
Modified: servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiInWsdl1Interceptor.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiInWsdl1Interceptor.java?rev=686963&r1=686962&r2=686963&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiInWsdl1Interceptor.java (original)
+++ servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiInWsdl1Interceptor.java Mon Aug 18 23:26:16 2008
@@ -227,11 +227,23 @@
JBIConstants.NS_JBI_BINDING, JBIFault.JBI_FAULT_ROOT));
Node jbiFaultDetail = null;
if (message.getVersion() instanceof Soap11) {
- jbiFaultDetail = doc.importNode(soapFault.getElementsByTagName(
- "detail").item(0).getFirstChild(), true);
+ NodeList nodeList = soapFault.getElementsByTagName("detail");
+ if (nodeList == null) {
+ //there is no detail in the fault, which means the fault is
+ //thrown during soap header process according to soap spec,
+ //try get the mandatory elemenet faultstring
+ nodeList = soapFault.getElementsByTagName("faultstring");
+ }
+ jbiFaultDetail = doc.importNode(nodeList.item(0).getFirstChild(), true);
} else {
- jbiFaultDetail = doc.importNode(soapFault.getElementsByTagName(
- "soap:Detail").item(0).getFirstChild(), true);
+ NodeList nodeList = soapFault.getElementsByTagName("soap:Detail");
+ if (nodeList == null) {
+ //there is no detail in the fault, which means the fault is
+ //thrown during soap header process according to soap spec,
+ //try get the mandatory elemenet soap:Reason
+ nodeList = soapFault.getElementsByTagName("soap:Reason");
+ }
+ jbiFaultDetail = doc.importNode(nodeList.item(0).getFirstChild(), true);
}
SchemaInfo schemaInfo =
getOperation(message).getBinding().getService().getSchema(jbiFaultDetail.getNamespaceURI());