package test;

import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import javax.xml.namespace.QName;

public class TestClient {

  public static void main(String [] args) {
      try {
        String endpoint = "http://localhost:8080/axis";

         Service  service = new Service();
         Call     call    = (Call) service.createCall();

        System.out.println(" Start constructing call .... ");
         call.setTargetEndpointAddress( new java.net.URL(endpoint) );
         call.setOperationName("get");
        System.out.println(" Call constructed!");

        System.out.println(" Start call .... ");
         String ret = (String) call.invoke( new Object[] { "What time?" } );

         System.out.println("Sent 'What time?', got '" + ret + "'");
     } catch (Exception e) {
         e.printStackTrace();
     }
  }
}
