001: /**
002: * Licensed to the Apache Software Foundation (ASF) under one
003: * or more contributor license agreements. See the NOTICE file
004: * distributed with this work for additional information
005: * regarding copyright ownership. The ASF licenses this file
006: * to you under the Apache License, Version 2.0 (the
007: * "License"); you may not use this file except in compliance
008: * with the License. You may obtain a copy of the License at
009: *
010: * http://www.apache.org/licenses/LICENSE-2.0
011: *
012: * Unless required by applicable law or agreed to in writing,
013: * software distributed under the License is distributed on an
014: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015: * KIND, either express or implied. See the License for the
016: * specific language governing permissions and limitations
017: * under the License.
018: */package org.apache.cxf.systest.jaxws;
019:
020: import java.util.Arrays;
021: import java.util.List;
022: import java.util.Vector;
023:
024: import javax.jws.WebService;
025: import javax.xml.ws.Holder;
026:
027: import org.apache.cxf.systest.jaxws.DocLitWrappedCodeFirstService.Foo;
028:
029: @WebService(endpointInterface="org.apache.cxf.systest.jaxws.RpcLitCodeFirstService",serviceName="RpcLitCodeFirstService",portName="RpcLitCodeFirstServicePort",targetNamespace="http://cxf.apache.org/systest/jaxws/RpcLitCodeFirstService")
030: public class RpcLitCodeFirstServiceImpl implements
031: RpcLitCodeFirstService {
032: public static final String DATA[] = new String[] { "string1",
033: "string2", "string3" };
034:
035: public int this ShouldNotBeInTheWSDL(int i) {
036: return i;
037: }
038:
039: public String[] arrayOutput() {
040: return DATA;
041: }
042:
043: public Vector<String> listOutput() {
044: return new Vector<String>(Arrays.asList(DATA));
045: }
046:
047: public String arrayInput(String[] inputs) {
048: StringBuffer buf = new StringBuffer();
049: for (String s : inputs) {
050: buf.append(s);
051: }
052: return buf.toString();
053: }
054:
055: public String listInput(List<String> inputs) {
056: StringBuffer buf = new StringBuffer();
057: if (inputs != null) {
058: for (String s : inputs) {
059: buf.append(s);
060: }
061: }
062: return buf.toString();
063: }
064:
065: public String multiListInput(List<String> inputs1,
066: List<String> inputs2, String x, int y) {
067: StringBuffer buf = new StringBuffer();
068: for (String s : inputs1) {
069: buf.append(s);
070: }
071: for (String s : inputs2) {
072: buf.append(s);
073: }
074: if (x == null) {
075: buf.append("<null>");
076: } else {
077: buf.append(x);
078: }
079: buf.append(Integer.toString(y));
080: return buf.toString();
081: }
082:
083: public String multiInOut(Holder<String> a, Holder<String> b,
084: Holder<String> c, Holder<String> d, Holder<String> e,
085: Holder<String> f, Holder<String> g) {
086: String ret = b.value + d.value + e.value;
087: a.value = "a";
088: b.value = "b";
089: c.value = "c";
090: d.value = "d";
091: e.value = "e";
092: f.value = "f";
093: g.value = "g";
094: return ret;
095: }
096:
097: public String multiHeaderInOut(Holder<String> a, Holder<String> b,
098: Holder<String> c, Holder<String> d, Holder<String> e,
099: Holder<String> f, Holder<String> g) {
100: String ret = b.value + d.value + e.value;
101: a.value = "a";
102: b.value = "b";
103: c.value = "c";
104: d.value = "d";
105: e.value = "e";
106: f.value = "f";
107: g.value = "g";
108: return ret;
109: }
110:
111: public List<Foo> listObjectOutput() {
112: Foo a = new Foo();
113: a.setName("a");
114: Foo b = new Foo();
115: b.setName("b");
116: return Arrays.asList(a, b);
117: }
118:
119: public List<Foo[]> listObjectArrayOutput() {
120: Foo a = new Foo();
121: a.setName("a");
122: Foo b = new Foo();
123: b.setName("b");
124: Foo c = new Foo();
125: c.setName("c");
126: Foo d = new Foo();
127: d.setName("d");
128:
129: return Arrays.asList(new Foo[] { a, b }, new Foo[] { c, d });
130: }
131: }
|