I managed to implement the soap fault, Please find the process below.
01. Write your own fault code class using WebFault annotation
@WebFault(name = "CustumFault", targetNamespace = "http://soapfault.jaxws.soap.example/")
public class CustumFault extends Exception {
private
String faultInfo;
public CustumFault(String message, String faultInfo){
super(message);
this.faultInfo = faultInfo;
}
}
02. Your service and implementation should throw the exception
@WebMethod
public String sayHello(String name) throws CustumFault;
03. Throw the exception from the implementation of service