01: /**
02: * Licensed to the Apache Software Foundation (ASF) under one
03: * or more contributor license agreements. See the NOTICE file
04: * distributed with this work for additional information
05: * regarding copyright ownership. The ASF licenses this file
06: * to you under the Apache License, Version 2.0 (the
07: * "License"); you may not use this file except in compliance
08: * with the License. You may obtain a copy of the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing,
13: * software distributed under the License is distributed on an
14: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15: * KIND, either express or implied. See the License for the
16: * specific language governing permissions and limitations
17: * under the License.
18: */package org.apache.cxf.systest.jaxws;
19:
20: import org.apache.cxf.tests.inherit.Inherit;
21: import org.apache.cxf.tests.inherit.objects.BaseType;
22: import org.apache.cxf.tests.inherit.objects.SubTypeA;
23: import org.apache.cxf.tests.inherit.objects.SubTypeB;
24: import org.apache.cxf.tests.inherit.types.ObjectInfo;
25:
26: public class InheritImpl implements Inherit {
27:
28: public ObjectInfo getObject(int type) {
29: ObjectInfo info = new ObjectInfo();
30: info.setType("Type: " + type);
31: BaseType ba = null;
32: switch (type) {
33: case 0:
34: ba = new SubTypeA();
35: ba.setName("A");
36: ((SubTypeA) ba).setAvalue("A");
37: break;
38: case 1:
39: ba = new SubTypeB();
40: ba.setName("B");
41: ((SubTypeB) ba).setBvalue("B");
42: break;
43: default:
44: }
45: info.setBaseObject(ba);
46: return info;
47: }
48:
49: }
|