Author: mmusaji
Date: 2011-08-08 10:32:53 -0400 (Mon, 08 Aug 2011)
New Revision: 14786
Modified:
stack/native/branches/jbossws-native-3.1.2.SP10_JBPAPP6864/.classpath
stack/native/branches/jbossws-native-3.1.2.SP10_JBPAPP6864/modules/core/src/main/java/org/jboss/ws/core/CommonSOAPFaultException.java
stack/native/branches/jbossws-native-3.1.2.SP10_JBPAPP6864/modules/core/src/main/java/org/jboss/ws/core/client/HTTPRemotingConnection.java
stack/native/branches/jbossws-native-3.1.2.SP10_JBPAPP6864/modules/core/src/main/java/org/jboss/ws/core/soap/EnvelopeBuilderDOM.java
Log:
JBPAPP-6864 Added additional changes to to ensure the root cause and message is passed
back to the client
Modified: stack/native/branches/jbossws-native-3.1.2.SP10_JBPAPP6864/.classpath
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP10_JBPAPP6864/.classpath 2011-08-08
11:31:40 UTC (rev 14785)
+++ stack/native/branches/jbossws-native-3.1.2.SP10_JBPAPP6864/.classpath 2011-08-08
14:32:53 UTC (rev 14786)
@@ -11,5 +11,6 @@
<classpathentry kind="con"
path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentry kind="con"
path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
<classpathentry kind="con"
path="org.eclipse.jst.server.core.container/org.jboss.ide.eclipse.as.core.server.runtime.runtimeTarget/JBoss
5.1.1 npeInvalidCharWS Runtime"/>
+ <classpathentry kind="lib"
path="/NotBackedUp/JBoss_instances/JBoss5.1.1-unsigned/lib/endorsed/xercesImpl.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
Modified:
stack/native/branches/jbossws-native-3.1.2.SP10_JBPAPP6864/modules/core/src/main/java/org/jboss/ws/core/CommonSOAPFaultException.java
===================================================================
---
stack/native/branches/jbossws-native-3.1.2.SP10_JBPAPP6864/modules/core/src/main/java/org/jboss/ws/core/CommonSOAPFaultException.java 2011-08-08
11:31:40 UTC (rev 14785)
+++
stack/native/branches/jbossws-native-3.1.2.SP10_JBPAPP6864/modules/core/src/main/java/org/jboss/ws/core/CommonSOAPFaultException.java 2011-08-08
14:32:53 UTC (rev 14786)
@@ -32,6 +32,7 @@
{
private QName faultCode;
private String faultString;
+ private Throwable throwable;
public CommonSOAPFaultException(QName faultCode, String faultString)
{
@@ -40,6 +41,15 @@
this.faultCode = faultCode;
this.faultString = faultString;
}
+
+ public CommonSOAPFaultException(QName faultCode, Throwable throwable) {
+
+ super(throwable.getMessage(), throwable);
+
+ this.faultCode = faultCode;
+ this.throwable = throwable;
+
+ }
public QName getFaultCode()
{
@@ -50,4 +60,9 @@
{
return faultString;
}
+
+ public Throwable getThrowable()
+ {
+ return throwable;
+ }
}
Modified:
stack/native/branches/jbossws-native-3.1.2.SP10_JBPAPP6864/modules/core/src/main/java/org/jboss/ws/core/client/HTTPRemotingConnection.java
===================================================================
---
stack/native/branches/jbossws-native-3.1.2.SP10_JBPAPP6864/modules/core/src/main/java/org/jboss/ws/core/client/HTTPRemotingConnection.java 2011-08-08
11:31:40 UTC (rev 14785)
+++
stack/native/branches/jbossws-native-3.1.2.SP10_JBPAPP6864/modules/core/src/main/java/org/jboss/ws/core/client/HTTPRemotingConnection.java 2011-08-08
14:32:53 UTC (rev 14786)
@@ -263,8 +263,15 @@
{
throw new WSTimeoutException("Timeout after: " + timeout +
"ms", new Long(timeout.toString()));
}
+
+ IOException io = null;
- IOException io = new IOException("Could not transmit message");
+ if(th.getCause().getMessage() != null) {
+ io = new IOException(th.getCause().getMessage());
+ }else {
+ io = new IOException("Could not transmit message");
+ }
+
io.initCause(th);
throw io;
}
Modified:
stack/native/branches/jbossws-native-3.1.2.SP10_JBPAPP6864/modules/core/src/main/java/org/jboss/ws/core/soap/EnvelopeBuilderDOM.java
===================================================================
---
stack/native/branches/jbossws-native-3.1.2.SP10_JBPAPP6864/modules/core/src/main/java/org/jboss/ws/core/soap/EnvelopeBuilderDOM.java 2011-08-08
11:31:40 UTC (rev 14785)
+++
stack/native/branches/jbossws-native-3.1.2.SP10_JBPAPP6864/modules/core/src/main/java/org/jboss/ws/core/soap/EnvelopeBuilderDOM.java 2011-08-08
14:32:53 UTC (rev 14786)
@@ -91,7 +91,7 @@
return null;
}
QName faultCode = Constants.SOAP11_FAULT_CODE_CLIENT;
- throw new CommonSOAPFaultException(faultCode, ex.getMessage());
+ throw new CommonSOAPFaultException(faultCode, ex);
}
return build(soapMessage, domEnv);