import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.encoding.XMLType;
import javax.xml.rpc.ParameterMode;
import org.apache.axis.utils.Options;

public class HelloWorldClient
{
   public static void main(String [] args) throws Exception {
   	
       Options options = new Options(args);	   
       String endpoint = options.getURL();
       String method = "sayHello";
       String serviceName = "HelloWorld";
       //
       Service  service = new Service();
       Call call = (Call) service.createCall();
	   //
       call.setTargetEndpointAddress(new java.net.URL(endpoint));
       call.setOperationName( new QName(serviceName, method) );
       call.addParameter( "op1", XMLType.XSD_STRING, ParameterMode.IN );
       call.setReturnType( XMLType.XSD_STRING );
	   //
       String ret = (String) call.invoke(new Object [] {"Ambrose Tati"} );
       //
       System.out.println("Message from Web Service: " + ret);
   }
}
