You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by gd...@apache.org on 2001/08/06 22:21:21 UTC

cvs commit: xml-axis/java/samples/userguide/example1 TestClient.java

gdaniels    01/08/06 13:21:21

  Modified:    java/samples/userguide/example1 TestClient.java
  Log:
  Point to Nagoya, don't print stack trace on error.
  
  Revision  Changes    Path
  1.3       +12 -9     xml-axis/java/samples/userguide/example1/TestClient.java
  
  Index: TestClient.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/samples/userguide/example1/TestClient.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestClient.java	2001/08/03 21:13:39	1.2
  +++ TestClient.java	2001/08/06 20:21:21	1.3
  @@ -4,15 +4,18 @@
   
   public class TestClient
   {
  -   public static void main(String [] args) throws Exception {
  -       String endpoint = "http://localhost:8080/axis/servlet/AxisServlet";
  -                //"http://nagoya.apache.org:5049/axis/servlet/AxisServlet";
  +   public static void main(String [] args) {
  +       try {
  +           String endpoint = "http://nagoya.apache.org:5049/axis/servlet/AxisServlet";
        
  -     ServiceClient client = new ServiceClient(endpoint);
  -     String ret = (String)client.invoke("http://soapinterop.org/",
  -                                        "echoString",
  -                                        new Object [] { "Hello!" });
  -  
  -     System.out.println("Sent 'Hello!', got '" + ret + "'");
  +           ServiceClient client = new ServiceClient(endpoint);
  +           String ret = (String)client.invoke("http://soapinterop.org/",
  +                                              "echoString",
  +                                              new Object [] { "Hello!" });
  +           
  +           System.out.println("Sent 'Hello!', got '" + ret + "'");
  +       } catch (Exception e) {
  +           System.err.println(e.toString());
  +       }
      }
   }