Return-Path: Delivered-To: apmail-xml-axis-dev-archive@xml.apache.org Received: (qmail 4538 invoked by uid 500); 20 Mar 2002 16:43:30 -0000 Mailing-List: contact axis-dev-help@xml.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@xml.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-dev@xml.apache.org Received: (qmail 4527 invoked from network); 20 Mar 2002 16:43:30 -0000 Message-ID: From: Glen Daniels To: "'axis-dev@xml.apache.org'" Subject: RE: cvs commit: xml-axis/java/src/org/apache/axis Version.java Date: Wed, 20 Mar 2002 11:42:19 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N No, I understood your point, I was just saying that because the default behavior of this client is different already (local, not remote-to-"http://localhost:8080/axis/servlet/AxisServlet"), having to type the extra "-l" to be consistent with some of the other clients in setting a remote URL didn't seem like that big a deal. In thinking about it a bit more, I could see the user/pw options being useful for doing this for a protected server too, so I'll add setting this up with Options to the TODO list. If you're psyched to do it, go for it! --G > -----Original Message----- > From: Doug Davis [mailto:dug@us.ibm.com] > Sent: Wednesday, March 20, 2002 11:28 AM > To: axis-dev@xml.apache.org > Subject: RE: cvs commit: xml-axis/java/src/org/apache/axis > Version.java > > > 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 on 03/20/2002 11:23:32 AM > > Please respond to axis-dev@xml.apache.org > > To: "'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(); > > + } > > } > > } > > > > > > > > > > > >