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: @WebService(endpointInterface="org.apache.cxf.systest.jaxws.DocLitWrappedCodeFirstService",serviceName="DocLitWrappedCodeFirstService",portName="DocLitWrappedCodeFirstServicePort",targetNamespace="http://cxf.apache.org/systest/jaxws/DocLitWrappedCodeFirstService")
028: public class DocLitWrappedCodeFirstServiceImpl implements
029: DocLitWrappedCodeFirstService {
030: public static final String DATA[] = new String[] { "string1",
031: "string2", "string3" };
032:
033: public int this ShouldNotBeInTheWSDL(int i) {
034: return i;
035: }
036:
037: public String[] arrayOutput() {
038: return DATA;
039: }
040:
041: public Vector<String> listOutput() {
042: return new Vector<String>(Arrays.asList(DATA));
043: }
044:
045: public String arrayInput(String[] inputs) {
046: StringBuffer buf = new StringBuffer();
047: for (String s : inputs) {
048: buf.append(s);
049: }
050: return buf.toString();
051: }
052:
053: public String listInput(List<String> inputs) {
054: StringBuffer buf = new StringBuffer();
055: if (inputs != null) {
056: for (String s : inputs) {
057: buf.append(s);
058: }
059: }
060: return buf.toString();
061: }
062:
063: public String multiListInput(List<String> inputs1,
064: List<String> inputs2, String x, int y) {
065: StringBuffer buf = new StringBuffer();
066: for (String s : inputs1) {
067: buf.append(s);
068: }
069: for (String s : inputs2) {
070: buf.append(s);
071: }
072: if (x == null) {
073: buf.append("<null>");
074: } else {
075: buf.append(x);
076: }
077: buf.append(Integer.toString(y));
078: return buf.toString();
079: }
080:
081: public String multiInOut(Holder<String> a, Holder<String> b,
082: Holder<String> c, Holder<String> d, Holder<String> e,
083: Holder<String> f, Holder<String> g) {
084: String ret = b.value + d.value + e.value;
085: a.value = "a";
086: b.value = "b";
087: c.value = "c";
088: d.value = "d";
089: e.value = "e";
090: f.value = "f";
091: g.value = "g";
092: return ret;
093: }
094:
095: public List<Foo> listObjectOutput() {
096: Foo a = new Foo();
097: a.setName("a");
098: Foo b = new Foo();
099: b.setName("b");
100: return Arrays.asList(a, b);
101: }
102:
103: public List<Foo[]> listObjectArrayOutput() {
104: Foo a = new Foo();
105: a.setName("a");
106: Foo b = new Foo();
107: b.setName("b");
108: Foo c = new Foo();
109: c.setName("c");
110: Foo d = new Foo();
111: d.setName("d");
112:
113: return Arrays.asList(new Foo[] { a, b }, new Foo[] { c, d });
114: }
115:
116: }
|