Thanks, dims. You fixed it JUST as I hit the problem.
Depending on how long this site is down, perhaps we should vote to add this
test patch to the 1.0 branch so Sam can actually get a build?
Russell Butek
[EMAIL PROTECTED]
[EMAIL PROTECTED] on 10/01/2002 07:43:11 AM
Please respond to [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
cc:
Subject: cvs commit: xml-axis/java/test/wsdl/terra
TerraServiceTestCase.java
dims 2002/10/01 05:43:11
Modified: java/test/wsdl/terra TerraServiceTestCase.java
Log:
Continue gracefully even when TerraService is down.
Revision Changes Path
1.2 +12 -0
xml-axis/java/test/wsdl/terra/TerraServiceTestCase.java
Index: TerraServiceTestCase.java
===================================================================
RCS file:
/home/cvs/xml-axis/java/test/wsdl/terra/TerraServiceTestCase.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- TerraServiceTestCase.java 13 Sep 2002 13:42:22 -0000 1.1
+++ TerraServiceTestCase.java 1 Oct 2002 12:43:11 -0000 1.2
@@ -7,6 +7,10 @@
package test.wsdl.terra;
+import org.apache.axis.AxisFault;
+
+import java.net.ConnectException;
+
public class TerraServiceTestCase extends junit.framework.TestCase {
public TerraServiceTestCase(java.lang.String name) {
super(name);
@@ -39,6 +43,14 @@
}
}
catch (java.rmi.RemoteException re) {
+ if (re instanceof AxisFault) {
+ AxisFault fault = (AxisFault) re;
+ if (fault.detail instanceof ConnectException ||
+ fault.getFaultCode().getLocalPart().equals("HTTP"))
{
+ System.err.println("TerraService HTTP error: " +
fault);
+ return;
+ }
+ }
throw new junit.framework.AssertionFailedError("Remote
Exception caught: " + re);
}
}