FileDocCategorySizeDatePackage
AddNumbersImpl.javaAPI DocExample3040Tue May 29 17:13:50 BST 2007fromwsdl.server

AddNumbersImpl

public class AddNumbersImpl extends Object

Fields Summary
Constructors Summary
Methods Summary
public intaddNumbers(int number1, int number2)

param
number1
param
number2
return
The sum
throws
AddNumbersException if any of the numbers to be added is negative.

        if (number1 < 0 || number2 < 0) {
            String message = "Negative number cant be added!";
            String detail = "Numbers: " + number1 + ", " + number2;
            AddNumbersFault fault = new AddNumbersFault ();
            fault.setMessage (message);
            fault.setFaultInfo (detail);
            throw new AddNumbersFault_Exception (message, fault);
        }
        return number1 + number2;
    
public voidoneWayInt(int number)

        System.out.println("Service received: " + number);