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: /**
18: * Main.java
19: *
20: * This file was auto-generated from WSDL
21: * by the Apache Axis Wsdl2java emitter.
22: */package samples.userguide.example6;
23:
24: public class Main {
25:
26: public static void main(String[] args) throws Exception {
27: samples.userguide.example6.WidgetPrice binding = new WidgetPriceServiceLocator()
28: .getWidgetPrice();
29: ((WidgetPriceSoapBindingStub) binding).setMaintainSession(true);
30: try {
31: ((WidgetPriceSoapBindingStub) binding).setWidgetPrice(
32: "FOO", "$1.00");
33: } catch (java.rmi.RemoteException re) {
34: throw new junit.framework.AssertionFailedError(
35: "Remote Exception caught: " + re);
36: }
37: try {
38: java.lang.String value = null;
39: value = binding.getWidgetPrice("FOO");
40: if (value == null || !value.equals("$1.00"))
41: System.out.println("Wrong Price" + value);
42: } catch (java.rmi.RemoteException re) {
43: throw new junit.framework.AssertionFailedError(
44: "Remote Exception caught: " + re);
45: }
46: }
47: }
|