use of org.apache.cxf.systest.ws.addr_feature.AddNumbersFault_Exception in project cxf by apache.
the class AddNumberImpl method execute.
int execute(int number1, int number2) throws AddNumbersFault_Exception {
if (number1 < 0 || number2 < 0) {
AddNumbersFault fb = new AddNumbersFault();
fb.setDetail("Negative numbers cant be added!");
fb.setMessage("Numbers: " + number1 + ", " + number2);
throw new AddNumbersFault_Exception(fb.getMessage(), fb);
}
return number1 + number2;
}
Aggregations