Search in sources :

Example 6 with AddNumbersFault_Exception

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;
}
Also used : AddNumbersFault_Exception(org.apache.cxf.systest.ws.addr_feature.AddNumbersFault_Exception) AddNumbersFault(org.apache.cxf.systest.ws.addr_feature.AddNumbersFault)

Aggregations

AddNumbersFault_Exception (org.apache.cxf.systest.ws.addr_feature.AddNumbersFault_Exception)6 AddNumbersFault (org.apache.cxf.systest.ws.addr_feature.AddNumbersFault)4 ByteArrayOutputStream (java.io.ByteArrayOutputStream)2 SOAPFaultException (javax.xml.ws.soap.SOAPFaultException)2 Test (org.junit.Test)2 AddNumbersPortType (org.apache.cxf.systest.ws.addr_feature.AddNumbersPortType)1 AddNumbersPortTypeProxy (org.apache.cxf.systest.ws.addr_feature.AddNumbersService.AddNumbersPortTypeProxy)1