Search in sources :

Example 1 with FaultDetail

use of org.apache.cxf.hello_world_corba.types.FaultDetail in project cxf by apache.

the class BaseGreeterImpl method pingMe.

public void pingMe(String faultType) throws PingMeFault {
    if ("USER".equals(faultType)) {
        FaultDetail detail = new FaultDetail();
        detail.setMajor((short) 1);
        detail.setMinor((short) 2);
        throw new PingMeFault("USER FAULT TEST", detail);
    } else if ("SYSTEM".equals(faultType)) {
        throw new Fault(new Message(EX_STRING, (ResourceBundle) null, new Object[] { "FAULT TEST" }));
    } else {
        throw new IllegalArgumentException(EX_STRING);
    }
}
Also used : PingMeFault(org.apache.cxf.hello_world_corba.PingMeFault) Message(org.apache.cxf.common.i18n.Message) FaultDetail(org.apache.cxf.hello_world_corba.types.FaultDetail) PingMeFault(org.apache.cxf.hello_world_corba.PingMeFault) Fault(org.apache.cxf.interceptor.Fault)

Aggregations

Message (org.apache.cxf.common.i18n.Message)1 PingMeFault (org.apache.cxf.hello_world_corba.PingMeFault)1 FaultDetail (org.apache.cxf.hello_world_corba.types.FaultDetail)1 Fault (org.apache.cxf.interceptor.Fault)1