1 package org.objectweb.celtix.systest.basic; 2 3 4 import java.util.concurrent.Future ; 5 6 import javax.jws.WebService; 7 import javax.xml.ws.AsyncHandler; 8 import javax.xml.ws.Response; 9 10 import org.objectweb.hello_world_soap_http.BadRecordLitFault; 11 import org.objectweb.hello_world_soap_http.Greeter; 12 import org.objectweb.hello_world_soap_http.NoSuchCodeLitFault; 13 import org.objectweb.hello_world_soap_http.types.BareDocumentResponse; 14 import org.objectweb.hello_world_soap_http.types.ErrorCode; 15 import org.objectweb.hello_world_soap_http.types.GreetMeResponse; 16 import org.objectweb.hello_world_soap_http.types.GreetMeSometimeResponse; 17 import org.objectweb.hello_world_soap_http.types.NoSuchCodeLit; 18 import org.objectweb.hello_world_soap_http.types.SayHiResponse; 19 import org.objectweb.hello_world_soap_http.types.TestDocLitFaultResponse; 20 21 @WebService(serviceName = "SOAPService", 22 portName = "SoapPort", 23 endpointInterface = "org.objectweb.hello_world_soap_http.Greeter", 24 targetNamespace = "http://objectweb.org/hello_world_soap_http") 25 public class GreeterImpl implements Greeter { 26 27 public String greetMe(String me) { 28 return "Hello " + me; 29 } 30 31 public String sayHi() { 32 return "Bonjour"; 33 } 34 35 public void testDocLitFault(String faultType) throws BadRecordLitFault, NoSuchCodeLitFault { 36 if (faultType.equals(BadRecordLitFault.class.getSimpleName())) { 37 throw new BadRecordLitFault("TestBadRecordLit", "BadRecordLitFault"); 38 } 39 if (faultType.equals(NoSuchCodeLitFault.class.getSimpleName())) { 40 ErrorCode ec = new ErrorCode(); 41 ec.setMajor((short)1); 42 ec.setMinor((short)1); 43 NoSuchCodeLit nscl = new NoSuchCodeLit(); 44 nscl.setCode(ec); 45 throw new NoSuchCodeLitFault("TestNoSuchCodeLit", nscl); 46 } 47 } 48 49 public void greetMeOneWay(String requestType) { 50 System.out.println("********* greetMeOneWay: " + requestType); 51 52 } 53 54 public String greetMeSometime(String me) { 55 return "How are you " + me; 57 } 58 59 public BareDocumentResponse testDocLitBare(String in) { 60 BareDocumentResponse res = new BareDocumentResponse(); 61 res.setCompany("Celtix"); 62 res.setId(1); 63 return res; 64 } 65 66 public Future <?> greetMeSometimeAsync(String requestType, 67 AsyncHandler<GreetMeSometimeResponse> asyncHandler) { 68 System.err.println("In greetMeSometimeAsync 1"); 69 return null; 70 71 } 72 73 public Response<GreetMeSometimeResponse> greetMeSometimeAsync(String requestType) { 74 System.err.println("In greetMeSometimeAsync 2"); 75 return null; 76 77 } 78 79 public Response<TestDocLitFaultResponse> testDocLitFaultAsync(String faultType) { 80 System.err.println("In testDocLitFaultAsync 1"); 81 return null; 82 83 } 84 85 public Future <?> testDocLitFaultAsync(String faultType, AsyncHandler ah) { 86 System.err.println("In testDocLitFaultAsync 2"); 87 return null; 88 89 } 90 91 public Future <?> testDocLitBareAsync(String bare, AsyncHandler ah) { 92 return null; 93 94 } 95 96 public Response<BareDocumentResponse> testDocLitBareAsync(String bare) { 97 return null; 98 99 } 100 101 public Future <?> greetMeAsync(String requestType, AsyncHandler<GreetMeResponse> asyncHandler) { 102 return null; 103 104 } 105 106 public Response<GreetMeResponse> greetMeAsync(String requestType) { 107 return null; 108 109 } 110 111 public Future <?> sayHiAsync(AsyncHandler<SayHiResponse> asyncHandler) { 112 return null; 113 114 } 115 116 public Response<SayHiResponse> sayHiAsync() { 117 return null; 118 119 } 120 121 } 122 | Popular Tags |