axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doug Davis" <...@us.ibm.com>
Subject RE: cvs commit: xml-axis/java/src/org/apache/axis Version.java
Date Wed, 20 Mar 2002 16:27:54 GMT
You missed my point - for the no arg case use the default to get the
client version.  But the going to a server (from a usability point of
view) having the same command line args for all samples/exes
make it easier for people.   And that's what the Options class
is there for, but to each his own...
-Dug


Glen Daniels <gdaniels@macromedia.com> on 03/20/2002 11:23:32 AM

Please respond to axis-dev@xml.apache.org

To:    "'axis-dev@xml.apache.org'" <axis-dev@xml.apache.org>
cc:
Subject:    RE: cvs commit: xml-axis/java/src/org/apache/axis Version.java




Hi Doug:

I explicitly want the default behavior of this class to be getting the
*local* version (i.e. the client), not querying a remote server, so it
seemed simpler to just do that in the no-arg case, and take a URL for the
case where you want to do it remotely.  I suppose we could use options to
match the "-l" syntax, but it didn't quite seem worth it for this.

--Glen

> -----Original Message-----
> From: Doug Davis [mailto:dug@us.ibm.com]
> Sent: Wednesday, March 20, 2002 11:17 AM
> To: axis-dev@xml.apache.org
> Subject: Re: cvs commit: xml-axis/java/src/org/apache/axis
> Version.java
>
>
> Glen - if you use the Options class it will default the to
> the proper URL.
> Plus then changing it will match the other samples' cmd line options.
> -Dug
>
>
> gdaniels@apache.org on 03/20/2002 11:14:30 AM
>
> Please respond to axis-dev@xml.apache.org
>
> To:    xml-axis-cvs@apache.org
> cc:
> Subject:    cvs commit: xml-axis/java/src/org/apache/axis Version.java
>
>
>
> gdaniels    02/03/20 08:14:29
>
>   Modified:    java/src/org/apache/axis Version.java
>   Log:
>   Add the ability to query a remote Axis server for its version.
>
>   Revision  Changes    Path
>   1.3       +18 -1     xml-axis/java/src/org/apache/axis/Version.java
>
>   Index: Version.java
>   ===================================================================
>   RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/Version.java,v
>   retrieving revision 1.2
>   retrieving revision 1.3
>   diff -u -r1.2 -r1.3
>   --- Version.java      14 Feb 2002 23:01:48 -0000    1.2
>   +++ Version.java      20 Mar 2002 16:14:29 -0000    1.3
>   @@ -56,6 +56,7 @@
>    package org.apache.axis;
>
>    import org.apache.axis.utils.JavaUtils;
>   +import org.apache.axis.client.Call;
>
>    /**
>     * Little utility to get the version and build date of the
> axis.jar.
>   @@ -72,7 +73,23 @@
>                   JavaUtils.getMessage("builtOn");
>        }
>
>   +    /**
>   +     * Entry point.
>   +     *
>   +     * Calling this with no arguments returns the version of the
>   client-side
>   +     * axis.jar.  Passing a URL which points to a remote
> Axis server
>   will
>   +     * attempt to retrieve the version of the server via a
> SOAP call.
>   +     */
>        public static void main(String[] args) {
>   -        System.out.println(getVersion());
>   +        if (args.length != 1)
>   +            System.out.println(getVersion());
>   +
>   +        try {
>   +            Call call = new Call(args[0]);
>   +            String result = (String)call.invoke("Version",
> "getVersion",
>   null);
>   +            System.out.println(result);
>   +        } catch (Exception e) {
>   +            e.printStackTrace();
>   +        }
>        }
>    }
>
>
>
>
>



Mime
View raw message