summaryrefslogtreecommitdiffstats
path: root/branches
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--branches/sca-java-1.x/modules/interface-java-jaxws/src/main/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSFaultExceptionMapper.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/branches/sca-java-1.x/modules/interface-java-jaxws/src/main/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSFaultExceptionMapper.java b/branches/sca-java-1.x/modules/interface-java-jaxws/src/main/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSFaultExceptionMapper.java
index 75a0aa8131..5b7485e3c2 100644
--- a/branches/sca-java-1.x/modules/interface-java-jaxws/src/main/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSFaultExceptionMapper.java
+++ b/branches/sca-java-1.x/modules/interface-java-jaxws/src/main/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSFaultExceptionMapper.java
@@ -126,8 +126,13 @@ public class JAXWSFaultExceptionMapper implements FaultExceptionMapper {
ex = ctor.newInstance(message, faultInfo, cause);
} catch (NoSuchMethodException e1) {
try {
- ctor = exceptionClass.getConstructor(String.class, faultInfo.getClass());
- ex = ctor.newInstance(message, faultInfo);
+ if (faultInfo != null) {
+ ctor = exceptionClass.getConstructor(String.class, faultInfo.getClass());
+ ex = ctor.newInstance(message, faultInfo);
+ } else {
+ ctor = exceptionClass.getConstructor(String.class);
+ ex = ctor.newInstance(message);
+ }
} catch (NoSuchMethodException e2) {
try {
ctor = exceptionClass.getConstructor(String.class, Throwable.class);