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.hello_world_soap_http;
019:
020: import java.util.concurrent.Future;
021: import java.util.logging.Logger;
022:
023: import javax.xml.ws.AsyncHandler;
024: import javax.xml.ws.Response;
025:
026: import org.apache.hello_world_soap_http.types.BareDocumentResponse;
027: import org.apache.hello_world_soap_http.types.ErrorCode;
028: import org.apache.hello_world_soap_http.types.GreetMeLaterResponse;
029: import org.apache.hello_world_soap_http.types.GreetMeResponse;
030: import org.apache.hello_world_soap_http.types.GreetMeSometimeResponse;
031: import org.apache.hello_world_soap_http.types.NoSuchCodeLit;
032: import org.apache.hello_world_soap_http.types.SayHiResponse;
033: import org.apache.hello_world_soap_http.types.TestDocLitFaultResponse;
034: import org.apache.hello_world_soap_http.types.TestNillableResponse;
035:
036: public class NotAnnotatedGreeterImpl implements Greeter {
037:
038: private static final Logger LOG = Logger
039: .getLogger(NotAnnotatedGreeterImpl.class.getName());
040:
041: public String greetMe(String me) {
042: LOG.info("Executing operation greetMe");
043: return me;
044: }
045:
046: public String greetMeLater(long delay) {
047: LOG.info("Executing operation greetMeLater");
048: if (delay > 0) {
049: try {
050: Thread.sleep(delay);
051: } catch (InterruptedException ex) {
052: /// ignore
053: }
054: }
055: return "Hello, finally!";
056: }
057:
058: public String greetMeSometime(String me) {
059: LOG.info("Executing operation greetMeSometime");
060: return me;
061: }
062:
063: public Future<?> greetMeSometimeAsync(String requestType,
064: AsyncHandler<GreetMeSometimeResponse> asyncHandler) {
065: return null;
066: /* to be implemented */
067: }
068:
069: public Response<GreetMeSometimeResponse> greetMeSometimeAsync(
070: String requestType) {
071: return null;
072: /* to be implemented" */
073: }
074:
075: public Future<?> greetMeAsync(String requestType,
076: AsyncHandler<GreetMeResponse> asyncHandler) {
077: return null;
078: /*not called */
079: }
080:
081: public Response<GreetMeResponse> greetMeAsync(String requestType) {
082: return null;
083: /*not called */
084: }
085:
086: public Future<?> greetMeLaterAsync(long requestType,
087: AsyncHandler<GreetMeLaterResponse> asyncHandler) {
088: return null;
089: /*not called */
090: }
091:
092: public Response<GreetMeLaterResponse> greetMeLaterAsync(
093: long requestType) {
094: return null;
095: /*not called */
096: }
097:
098: public Future<?> sayHiAsync(AsyncHandler<SayHiResponse> asyncHandler) {
099: return null;
100: /*not called */
101: }
102:
103: public Response<SayHiResponse> sayHiAsync() {
104: return null;
105: /*not called */
106: }
107:
108: public String sayHi() {
109: LOG.info("Executing operation sayHi");
110: return "Bonjour";
111: }
112:
113: public void greetMeOneWay(String me) {
114: LOG.info("Executing operation greetMeOneWay");
115: }
116:
117: public Response<TestDocLitFaultResponse> testDocLitFaultAsync(
118: String faultType) {
119: return null;
120: /*not called */
121: }
122:
123: public Future<?> testDocLitFaultAsync(String faultType,
124: AsyncHandler<TestDocLitFaultResponse> ah) {
125: return null;
126: /*not called */
127: }
128:
129: public Future<?> testDocLitBareAsync(String bare,
130: AsyncHandler<BareDocumentResponse> ah) {
131: return null;
132: /* not called */
133: }
134:
135: public Response<BareDocumentResponse> testDocLitBareAsync(
136: String bare) {
137: return null;
138: /* not called */
139: }
140:
141: public void testDocLitFault(String faultType)
142: throws BadRecordLitFault, NoSuchCodeLitFault {
143: ErrorCode ec = new ErrorCode();
144: ec.setMajor((short) 1);
145: ec.setMinor((short) 1);
146: NoSuchCodeLit nscl = new NoSuchCodeLit();
147: nscl.setCode(ec);
148:
149: throw new NoSuchCodeLitFault("TestException", nscl);
150: }
151:
152: public BareDocumentResponse testDocLitBare(String in) {
153: LOG.info("Executin operation testDocLitBare");
154: BareDocumentResponse res = new BareDocumentResponse();
155: res.setCompany("CXF");
156: res.setId(1);
157: return res;
158: }
159:
160: public String testNillable(String nillElem, int intElem) {
161: // TODO Auto-generated method stub
162: return null;
163: }
164:
165: public Response<TestNillableResponse> testNillableAsync(
166: String nillElem, int intElem) {
167: return null;
168: }
169:
170: public Future<?> testNillableAsync(String nillElem, int intElem,
171: AsyncHandler<TestNillableResponse> asyncHandler) {
172: return null;
173: }
174:
175: }
|