Debian Codegraph @

samples/userguide/example6/Main.java

raw
1 /*
2 * Copyright 2001-2004 The Apache Software Foundation.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
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 */
23
24 package samples.userguide.example6;
25
26 public class Main {
27
28 public static void main (String[] args) throws Exception {
29 samples.userguide.example6.WidgetPrice binding = new WidgetPriceServiceLocator().getWidgetPrice();
30 ((WidgetPriceSoapBindingStub)binding).setMaintainSession(true);
31 try {
32 ((WidgetPriceSoapBindingStub) binding).setWidgetPrice("FOO", "$1.00");
33 } catch (java.rmi.RemoteException re) {
34 throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re );
35 }
36 try {
37 java.lang.String value = null;
38 value = binding.getWidgetPrice("FOO");
39 if (value == null ||
40 !value.equals("$1.00"))
41 System.out.println("Wrong Price" + value);
42 } catch (java.rmi.RemoteException re) {
43 throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re );
44 }
45 }
46 }
47