axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject cvs commit: xml-axis/java/samples/echo TestClient.java
Date Sun, 09 Dec 2001 23:20:07 GMT
rubys       01/12/09 15:20:07

  Modified:    java/samples/echo TestClient.java
  Log:
  Distinguish between the various types of failures
  
  Revision  Changes    Path
  1.42      +11 -4     xml-axis/java/samples/echo/TestClient.java
  
  Index: TestClient.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/samples/echo/TestClient.java,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- TestClient.java	2001/12/03 22:49:22	1.41
  +++ TestClient.java	2001/12/09 23:20:07	1.42
  @@ -181,7 +181,7 @@
               verify(method, toSend, got);
   
           } catch (AxisFault af) {
  -            verify(method, toSend, af.getFaultString());
  +            verify(method, toSend, af);
           } catch (Exception e) {
               verify(method, toSend, e);
           }
  @@ -276,10 +276,17 @@
                   if (this.equals(sent, gotBack)) {
                       System.out.println(method + "\t OK");
                   } else {
  -                    System.out.println(method + "\t Fail: " + gotBack);
  -                    if (gotBack instanceof Exception)
  -                        if (!(gotBack instanceof AxisFault))
  +                    String message = "Fail: ";
  +                    if (gotBack instanceof Exception) {
  +                        if (gotBack instanceof AxisFault) {
  +                            message = "Fault: ";
  +                            gotBack = ((AxisFault)gotBack).getFaultString();
  +                        } else {
  +                            message = "Exception: ";
                               ((Exception)gotBack).printStackTrace();
  +                        }
  +                    }
  +                    System.out.println(method + "\t " + message + gotBack);
                   }
               }
           };
  
  
  

Mime
View raw message