KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > demo > hwRPCLit > server > GreeterRPCLitImpl


1 package demo.hwRPCLit.server;
2
3 import java.util.logging.Logger JavaDoc;
4 import org.objectweb.hello_world_rpclit.GreeterRPCLit;
5 import org.objectweb.hello_world_rpclit.types.MyComplexStruct;
6
7 @javax.jws.WebService(name = "GreeterRPCLit", serviceName = "SOAPServiceRPCLit",
8                       targetNamespace = "http://objectweb.org/hello_world_rpclit",
9                       wsdlLocation = "file:./wsdl/hello_world_RPCLit.wsdl")
10 public class GreeterRPCLitImpl implements GreeterRPCLit {
11
12     private static final Logger JavaDoc LOG = Logger.getLogger(GreeterRPCLitImpl.class.getPackage().getName());
13
14     public String JavaDoc greetMe(String JavaDoc me) {
15         LOG.info("Executing operation greetMe");
16         System.out.println("Executing operation greetMe");
17         System.out.println("Message received: " + me + "\n");
18         return "Hello " + me;
19     }
20
21     public String JavaDoc sayHi() {
22         LOG.info("Executing operation sayHi");
23         System.out.println("Executing operation sayHi" + "\n");
24         return "Bonjour";
25     }
26
27     public MyComplexStruct sendReceiveData(MyComplexStruct in) {
28         LOG.info("Executing operation sendReceiveData");
29         System.out.println("Executing operation sendReceiveData");
30         System.out.println("Received struct with values :\nElement-1 : " + in.getElem1() + "\nElement-2 : "
31                            + in.getElem2() + "\nElement-3 : " + in.getElem3() + "\n");
32         return in;
33     }
34 }
35
Popular Tags