1
2
3
4
5
6
7 package org.mule.module.cxf;
8
9 import org.mule.module.cxf.testmodels.CustomFault;
10 import org.mule.module.cxf.testmodels.CxfEnabledFaultMessage;
11
12 import javax.jws.WebService;
13
14 import org.apache.cxf.interceptor.Fault;
15
16 @WebService(endpointInterface = "org.mule.module.cxf.TestServiceFault", serviceName = "TestServiceFault")
17 public class TestServiceFaultImpl implements TestServiceFault
18 {
19 public String sayHi(String name) throws CxfEnabledFaultMessage
20 {
21 CustomFault fault = new CustomFault();
22 fault.setDescription("Custom Exception Message");
23 throw new CxfEnabledFaultMessage("Cxf Exception Message", fault);
24 }
25 }
26