summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-1.3.1/modules
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2008-08-14 11:20:30 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2008-08-14 11:20:30 +0000
commit836523e74bbdebd0dab0e0f6a30542b9bba9ddb7 (patch)
treea6149cae6fd8401ef7b7d138d34cdf9d6d749788 /branches/sca-java-1.3.1/modules
parenta4191dc7aebdf3e31427569155a79002bf9ca672 (diff)
TUSCANY-2519 Fix so "throws exception" doesn't cause a failure in JAXB type generation
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@685854 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.3.1/modules')
-rw-r--r--branches/sca-java-1.3.1/modules/interface-java-jaxws/src/main/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSFaultExceptionMapper.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/branches/sca-java-1.3.1/modules/interface-java-jaxws/src/main/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSFaultExceptionMapper.java b/branches/sca-java-1.3.1/modules/interface-java-jaxws/src/main/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSFaultExceptionMapper.java
index a4f2facb4b..75a0aa8131 100644
--- a/branches/sca-java-1.3.1/modules/interface-java-jaxws/src/main/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSFaultExceptionMapper.java
+++ b/branches/sca-java-1.3.1/modules/interface-java-jaxws/src/main/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSFaultExceptionMapper.java
@@ -36,6 +36,7 @@ import org.apache.tuscany.sca.interfacedef.DataType;
import org.apache.tuscany.sca.interfacedef.FaultExceptionMapper;
import org.apache.tuscany.sca.interfacedef.Operation;
import org.apache.tuscany.sca.interfacedef.impl.DataTypeImpl;
+import org.apache.tuscany.sca.interfacedef.java.JavaInterface;
import org.apache.tuscany.sca.interfacedef.util.FaultException;
import org.apache.tuscany.sca.interfacedef.util.XMLType;
import org.osoa.sca.ServiceRuntimeException;
@@ -250,7 +251,7 @@ public class JAXWSFaultExceptionMapper implements FaultExceptionMapper {
}
@SuppressWarnings("unchecked")
- public boolean introspectFaultDataType(DataType<DataType> exceptionType, Operation operation, final boolean generatingFaultBean) {
+ public boolean introspectFaultDataType(DataType<DataType> exceptionType, final Operation operation, final boolean generatingFaultBean) {
QName faultName = null;
boolean result = false;
@@ -303,7 +304,10 @@ public class JAXWSFaultExceptionMapper implements FaultExceptionMapper {
} catch (ClassNotFoundException e) {
if (generatingFaultBean) {
Class<? extends Throwable> t = (Class<? extends Throwable>)cls;
- GeneratedClassLoader cl = new GeneratedClassLoader(t.getClassLoader());
+ ClassLoader parent =
+ operation == null ? t.getClassLoader() : ((JavaInterface)operation.getInterface())
+ .getJavaClass().getClassLoader();
+ GeneratedClassLoader cl = new GeneratedClassLoader(parent);
GeneratedDataTypeImpl dt = new GeneratedDataTypeImpl(xmlAdapterExtensionPoint, t, cl);
return dt;
} else {