View Javadoc
1   /*
2    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
3    * The software in this package is published under the terms of the CPAL v1.0
4    * license, a copy of which has been included with this distribution in the
5    * LICENSE.txt file.
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