Index: java/core/source/pkgdata/pkg_data_src.gpt
===================================================================
RCS file: /home/globdev/CVS/globus-packages/wsrf/java/core/source/pkgdata/pkg_data_src.gpt,v
retrieving revision 1.73.2.10
diff -u -r1.73.2.10 pkg_data_src.gpt
--- java/core/source/pkgdata/pkg_data_src.gpt	7 Nov 2008 20:44:41 -0000	1.73.2.10
+++ java/core/source/pkgdata/pkg_data_src.gpt	14 Nov 2008 20:55:34 -0000
@@ -3,7 +3,7 @@
 
 <gpt_package_metadata Format_Version="0.01" Name="globus_java_ws_core">
 
-    <Aging_Version Age="1" Major="3" Minor="18"/>
+    <Aging_Version Age="1" Major="3" Minor="19"/>
     <Description>
         The Java WS Core package
     </Description>
Index: java/core/source/src/org/globus/wsrf/client/CheckRemoteEnvironment.java
===================================================================
RCS file: /home/globdev/CVS/globus-packages/wsrf/java/core/source/src/org/globus/wsrf/client/CheckRemoteEnvironment.java,v
retrieving revision 1.1
diff -u -r1.1 CheckRemoteEnvironment.java
--- java/core/source/src/org/globus/wsrf/client/CheckRemoteEnvironment.java	25 Mar 2008 21:52:50 -0000	1.1
+++ java/core/source/src/org/globus/wsrf/client/CheckRemoteEnvironment.java	14 Nov 2008 20:55:34 -0000
@@ -37,13 +37,14 @@
     public static String AXIS_VERSION_SERVICE = "wsrf/services/Version";
 
     private static String OPTIONS = 
-        "globus-check-remote-environment [-help] -s endpoint -z authz\n"
+        "globus-check-remote-environment [-help] -s endpoint [-z authz] [-debug]\n"
         + "-help Returns the help string.\n"
         + "-s    Endpoint for remote version information. \n"
-        + "      It should be protocol://host:port"
+        + "      It should be protocol://host:port\n"
         + "-z    Sets authorization, can be 'self', 'host', 'hostOrSelf' or \n"
         + "      'none' or a string specifying the expected identity of the\n"
-        + "      remote party. Defaults to no authorization.";
+        + "      remote party. Defaults to no authorization.\n"
+        + "-debug Prints stack trace of any errors.";
 
     static {
         // Incase end point is https
@@ -53,6 +54,12 @@
 
     public static void displayRemoteComponentVersions(String endpoint,
                                                       Object authorization) {
+        displayRemoteComponentVersions(endpoint, authorization, false);
+    }
+
+    public static void displayRemoteComponentVersions(String endpoint,
+                                                      Object authorization,
+                                                      boolean debug) {
 
         if (endpoint == null) {
             System.out.println("Endpoint not available for remote "
@@ -83,11 +90,26 @@
             String result = (String) call.invoke("getVersion", null);
             System.out.println(result); 
         } catch (ServiceException e) {
-            System.out.println("N/A");
+            System.out.println("Error obtaining Axis version: " 
+                               + e.getMessage());
+            if (debug) {
+                e.printStackTrace();
+            }
+            System.exit(-1);
         } catch (MalformedURLException e) {
-            System.out.println("N/A");
+            System.out.println("Error obtaining Axis version: "
+                               + e.getMessage());
+            if (debug) {
+                e.printStackTrace();
+            }
+            System.exit(-1);
         } catch (AxisFault e) {
-            System.out.println("N/A");
+            System.out.println("Error obtaining Axis version: "
+                               + e.getMessage());
+            if (debug) {
+                e.printStackTrace();                
+            }
+            System.exit(-1);
         }
         System.out.println();
         
@@ -103,11 +125,26 @@
             String result = (String) call.invoke("getVersion", null);
             System.out.println(result);
         } catch (ServiceException e) {
-            System.out.println("N/A");
+            System.out.println("Error obtaining Java WS Core version: " 
+                               + e.getMessage());
+            if (debug) {
+                e.printStackTrace();
+            }
+            System.exit(-1);
         } catch (MalformedURLException e) {
-            System.out.println("N/A");
+            System.out.println("Error obtaining Java WS Core version: " 
+                               + e.getMessage());
+            if (debug) {
+                e.printStackTrace();
+            }
+            System.exit(-1);
         } catch (AxisFault e) {
-            System.out.println("N/A");
+            System.out.println("Error obtaining Java WS Core version: " 
+                               + e.getMessage());
+            if (debug) {
+                e.printStackTrace();
+            }
+            System.exit(-1);
         }
         System.out.println();
     }
@@ -116,6 +153,7 @@
 
         String endpoint = null;
         Object authorization = NoAuthorization.getInstance(); 
+        boolean debug = false;
         for (int i=0; i<args.length; i++) {
             if (args[i].equals("-help")) {
                 System.out.println(OPTIONS);
@@ -149,6 +187,9 @@
                         authorization = new IdentityAuthorization(value);
                     }
                 }
+            } else if (args[i].equals("-debug")) {
+                debug = true;
+                i = i + 1;
             } else {
                 System.out.println("Invalid paramter " + args[0]);
                 System.out.println(OPTIONS);
@@ -160,7 +201,8 @@
             System.out.println();
             System.out.println("### Remote Endpoint Version Information ###");
             CheckRemoteEnvironment
-                .displayRemoteComponentVersions(endpoint, authorization);
+                .displayRemoteComponentVersions(endpoint, authorization, 
+                                                debug);
         } else {
             System.out.println("Endpoint parameter required");
             System.out.println(OPTIONS);
