axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject cvs commit: xml-axis/java/samples/stock GetQuote.java
Date Thu, 31 May 2001 15:52:22 GMT
dug         01/05/31 08:52:21

  Modified:    java/samples/stock GetQuote.java
  Log:
  Make GetQuote print the symbol (AGAIN!)
  
  Revision  Changes    Path
  1.19      +5 -3      xml-axis/java/samples/stock/GetQuote.java
  
  Index: GetQuote.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/samples/stock/GetQuote.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- GetQuote.java	2001/05/31 09:22:52	1.18
  +++ GetQuote.java	2001/05/31 15:52:18	1.19
  @@ -73,6 +73,7 @@
    * @author Doug Davis (dug@us.ibm.com.com)
    */
   public class GetQuote {
  +    public  String symbol ;
       
     // helper function; does all the real work
       public float getQuote (String args[]) throws Exception {
  @@ -88,7 +89,7 @@
         }
   
         String action = "urn:xmltoday-delayed-quotes";
  -      String   symbol = args[0] ;
  +      symbol = args[0] ;
         ServiceClient call = new ServiceClient(new HTTPClient());
         call.set(HTTPClient.URL, opts.getURL());
         call.set(HTTPClient.ACTION, action);
  @@ -128,9 +129,10 @@
   
     public static void main(String args[]) {
       try {
  -        float val = new GetQuote().getQuote(args);
  +        GetQuote gq = new GetQuote();
  +        float val = gq.getQuote(args);
           // args array gets side-effected
  -        System.out.println(args[0] + ": " + val);
  +        System.out.println(gq.symbol + ": " + val);
       }
       catch( Exception e ) {
         if ( e instanceof AxisFault ) ((AxisFault)e).dump();
  
  
  

Mime
View raw message