xml-soap-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject cvs commit: xml-soap/java/samples/interop EchoTestClient.java
Date Thu, 12 Jul 2001 15:59:11 GMT
rubys       01/07/12 08:59:11

  Modified:    java/samples/interop EchoTestClient.java
  Log:
  Make clear that faults and exceptions are not "OK"
  
  Revision  Changes    Path
  1.9       +5 -8      xml-soap/java/samples/interop/EchoTestClient.java
  
  Index: EchoTestClient.java
  ===================================================================
  RCS file: /home/cvs/xml-soap/java/samples/interop/EchoTestClient.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- EchoTestClient.java	2001/07/10 13:06:57	1.8
  +++ EchoTestClient.java	2001/07/12 15:59:08	1.9
  @@ -233,7 +233,10 @@
         Response resp = call.invoke(url, soapAction);
         
         // check response 
  -      if (!resp.generatedFault()) {
  +      if (resp.generatedFault()) {
  +        Fault fault = resp.getFault ();
  +        System.out.println(methodName + "\t FAIL: " + fault.getFaultString());
  +      } else {
           Parameter ret = resp.getReturnValue();
           Object output = (ret==null) ? null : ret.getValue();
           Object input = (param==null) ? null : param.getValue();
  @@ -244,15 +247,9 @@
             System.out.println(methodName + "\t FAIL: " + output);
           }
         }
  -      else {
  -        Fault fault = resp.getFault ();
  -        System.out.println (methodName + " generated fault: ");
  -        System.out.println ("  Fault Code   = " + fault.getFaultCode());  
  -        System.out.println ("  Fault String = " + fault.getFaultString());
  -      }
         
       } catch (Exception e) {
  -      e.printStackTrace();
  +      System.out.println(methodName + "\t FAIL: " + e);
       }
     }
   }
  
  
  

Mime
View raw message