01: /*
02: * Copyright 2001-2004 The Apache Software Foundation.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
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: public static void main(String[] args) {
27: try {
28: Options options = new Options(args);
29:
30: String endpointURL = options.getURL();
31:
32: Service service = new Service();
33: Call call = (Call) service.createCall();
34:
35: call
36: .setTargetEndpointAddress(new java.net.URL(
37: endpointURL));
38: call.setOperationName(new QName("LogTestService",
39: "testMethod"));
40:
41: String res = (String) call.invoke(new Object[] {});
42:
43: System.out.println(res);
44: } catch (Exception e) {
45: System.err.println(e.toString());
46: }
47: }
48: }
|