1 16 17 package samples.userguide.example4; 18 19 import org.apache.axis.client.Call; 20 import org.apache.axis.client.Service; 21 import org.apache.axis.utils.Options; 22 23 import javax.xml.namespace.QName ; 24 25 public class Client 26 { 27 public static void main(String [] args) 28 { 29 try { 30 Options options = new Options(args); 31 32 String endpointURL = options.getURL(); 33 34 Service service = new Service(); 35 Call call = (Call) service.createCall(); 36 37 call.setTargetEndpointAddress( new java.net.URL (endpointURL) ); 38 call.setOperationName( new QName ("LogTestService", "testMethod") ); 39 40 String res = (String ) call.invoke( new Object [] {} ); 41 42 System.out.println( res ); 43 } catch (Exception e) { 44 System.err.println(e.toString()); 45 } 46 } 47 } 48 | Popular Tags |