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/transport FileReader.java
Date Wed, 06 Jun 2001 15:36:33 GMT
rubys       01/06/06 08:36:33

  Modified:    java/samples/transport FileReader.java
  Log:
  Improved formatting of exceptions
  
  Revision  Changes    Path
  1.4       +5 -2      xml-axis/java/samples/transport/FileReader.java
  
  Index: FileReader.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/samples/transport/FileReader.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- FileReader.java	2001/06/06 15:01:28	1.3
  +++ FileReader.java	2001/06/06 15:36:30	1.4
  @@ -107,11 +107,14 @@
           try {
               server.invoke( msgContext );
               msg = msgContext.getResponseMessage();
  -            buf = (byte[]) msg.getAs( "Bytes" );
  +        } catch (AxisFault af) {
  +            msg = new Message(af, "AxisFault");
           } catch (Exception e) {
  -            buf = e.toString().getBytes();
  +            msg = new Message(new AxisFault(e.toString()), "AxisFault");
           }
   
  +        buf = (byte[]) msg.getAs( "Bytes" );
  +        System.out.println("msg=" + new String(buf));
           fos.write( buf );
           fos.close();
   
  
  
  

Mime
View raw message