Advertisement
icebit

java server

Jun 15th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. package Example;
  2.  
  3. import javax.jws.WebService;
  4. import javax.jws.WebMethod;
  5. //import javax.jws.WebParam;
  6. import javax.jws.soap.SOAPBinding;
  7. import javax.jws.soap.SOAPBinding.*;
  8. import javax.xml.ws.Endpoint;
  9.  
  10. @WebService
  11. @SOAPBinding(style=Style.RPC)
  12. public class Service {
  13. public Service() {}
  14.  
  15. @WebMethod
  16. public String getTime(String data) {
  17. System.out.print(data);
  18. return data;
  19. }
  20.  
  21. public static void main(String args[]) throws Exception {
  22.  
  23. Object srv = new Service();
  24. String adr = "http://192.168.10.150/Example";
  25. Endpoint.publish(adr, srv) ;
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement