001: package org.objectweb.celtix.systest.basic;
002:
003: import java.util.concurrent.Future;
004:
005: import javax.jws.WebService;
006: import javax.xml.ws.AsyncHandler;
007: import javax.xml.ws.Response;
008:
009: import org.objectweb.hello_world_soap_http.BadRecordLitFault;
010: import org.objectweb.hello_world_soap_http.Greeter;
011: import org.objectweb.hello_world_soap_http.NoSuchCodeLitFault;
012: import org.objectweb.hello_world_soap_http.types.BareDocumentResponse;
013: import org.objectweb.hello_world_soap_http.types.ErrorCode;
014: import org.objectweb.hello_world_soap_http.types.GreetMeResponse;
015: import org.objectweb.hello_world_soap_http.types.GreetMeSometimeResponse;
016: import org.objectweb.hello_world_soap_http.types.NoSuchCodeLit;
017: import org.objectweb.hello_world_soap_http.types.SayHiResponse;
018: import org.objectweb.hello_world_soap_http.types.TestDocLitFaultResponse;
019:
020: @WebService(serviceName="SOAPService",portName="SoapPort",endpointInterface="org.objectweb.hello_world_soap_http.Greeter",targetNamespace="http://objectweb.org/hello_world_soap_http")
021: public class GreeterImpl implements Greeter {
022:
023: public String greetMe(String me) {
024: return "Hello " + me;
025: }
026:
027: public String sayHi() {
028: return "Bonjour";
029: }
030:
031: public void testDocLitFault(String faultType)
032: throws BadRecordLitFault, NoSuchCodeLitFault {
033: if (faultType.equals(BadRecordLitFault.class.getSimpleName())) {
034: throw new BadRecordLitFault("TestBadRecordLit",
035: "BadRecordLitFault");
036: }
037: if (faultType.equals(NoSuchCodeLitFault.class.getSimpleName())) {
038: ErrorCode ec = new ErrorCode();
039: ec.setMajor((short) 1);
040: ec.setMinor((short) 1);
041: NoSuchCodeLit nscl = new NoSuchCodeLit();
042: nscl.setCode(ec);
043: throw new NoSuchCodeLitFault("TestNoSuchCodeLit", nscl);
044: }
045: }
046:
047: public void greetMeOneWay(String requestType) {
048: System.out.println("********* greetMeOneWay: " + requestType);
049:
050: }
051:
052: public String greetMeSometime(String me) {
053: //System.err.println("In greetMeSometime: " + me);
054: return "How are you " + me;
055: }
056:
057: public BareDocumentResponse testDocLitBare(String in) {
058: BareDocumentResponse res = new BareDocumentResponse();
059: res.setCompany("Celtix");
060: res.setId(1);
061: return res;
062: }
063:
064: public Future<?> greetMeSometimeAsync(String requestType,
065: AsyncHandler<GreetMeSometimeResponse> asyncHandler) {
066: System.err.println("In greetMeSometimeAsync 1");
067: return null;
068: /*not called */
069: }
070:
071: public Response<GreetMeSometimeResponse> greetMeSometimeAsync(
072: String requestType) {
073: System.err.println("In greetMeSometimeAsync 2");
074: return null;
075: /*not called */
076: }
077:
078: public Response<TestDocLitFaultResponse> testDocLitFaultAsync(
079: String faultType) {
080: System.err.println("In testDocLitFaultAsync 1");
081: return null;
082: /*not called */
083: }
084:
085: public Future<?> testDocLitFaultAsync(String faultType,
086: AsyncHandler ah) {
087: System.err.println("In testDocLitFaultAsync 2");
088: return null;
089: /*not called */
090: }
091:
092: public Future<?> testDocLitBareAsync(String bare, AsyncHandler ah) {
093: return null;
094: /* not called */
095: }
096:
097: public Response<BareDocumentResponse> testDocLitBareAsync(
098: String bare) {
099: return null;
100: /* not called */
101: }
102:
103: public Future<?> greetMeAsync(String requestType,
104: AsyncHandler<GreetMeResponse> asyncHandler) {
105: return null;
106: /*not called */
107: }
108:
109: public Response<GreetMeResponse> greetMeAsync(String requestType) {
110: return null;
111: /*not called */
112: }
113:
114: public Future<?> sayHiAsync(AsyncHandler<SayHiResponse> asyncHandler) {
115: return null;
116: /*not called */
117: }
118:
119: public Response<SayHiResponse> sayHiAsync() {
120: return null;
121: /*not called */
122: }
123:
124: }
|