KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > example > MathServiceImpl


1 package example;
2
3 import javax.jws.*;
4
5 @WebService
6 public class MathServiceImpl implements MathService {
7   /**
8    * Adds two integers.
9    */

10   public int add(int a, int b)
11   {
12     return a + b;
13   }
14   
15   /**
16    * Subtracts two integers.
17    */

18   public int sub(int a, int b)
19   {
20     return a - b;
21   }
22   
23   /**
24    * Multiplies two integers.
25    */

26   public int mul(int a, int b)
27   {
28     return a * b;
29   }
30   
31   /**
32    * Divides two integers.
33    */

34   public int div(int a, int b)
35   {
36     return a / b;
37   }
38 }
39
Popular Tags