nikkkilll

practical5

Oct 4th, 2019
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. Practical No : 05
  2. Aim : Write a JAX-WS Web Service to perform following operations. Define Servlet/JSP that consumes web service.
  3. Input :
  4. Calculationwebservice.java:-
  5. package server;
  6.  
  7. import javax.jws.WebService;
  8. import javax.jws.WebMethod;
  9. import javax.jws.WebParam;
  10.  
  11.  
  12. @WebService(serviceName = "calculationwebservice")
  13. public class calculationwebservice {
  14.  
  15.  
  16. @WebMethod(operationName = "addition")
  17. public int addition(@WebParam(name = "a") int a,@WebParam(name = "b") int b)
  18. {
  19. int c;
  20. c=a+b;
  21. return c;
  22. }
  23. }
Add Comment
Please, Sign In to add comment