#set( $package = $generated.packageName) #set( $namespace = $generated.namespace) package $package; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.ws.resource.i18n.MessagesImpl; import org.apache.ws.util.XmlBeanUtils; import org.apache.ws.util.i18n.Messages; import org.apache.xmlbeans.XmlException; import org.apache.xmlbeans.XmlObject; import org.apache.ws.resource.faults.FaultException; import javax.xml.namespace.QName; /** * An exception representing a $faultName fault.

* ***** WARNING ***** * This class is generated by Wsdl2Java and is NOT meant to be modified. * It will be overwritten by subsequent runs of Wsdl2Java. */ public class $faultName extends FaultException { private static final Messages MSG = MessagesImpl.getInstance(); private static final Log LOG = LogFactory.getLog( ${faultName}.class ); /** * Element "local" name for the fault which is added as an element under the Detail. */ private static final String FAULT_LOCAL_NAME = "$faultName"; /** * Creates a new {@link $faultName} object. * * @param faultCode The fault code for this fault. {@see org.apache.ws.Soap1_1Constants#FAULT_CLIENT for examples} * @param faultString The fault message */ public $faultName( QName faultCode, String faultString ) { super( faultCode, faultString ); try { XmlObject xBean = XmlObject.Factory.parse( "<" + FAULT_LOCAL_NAME + " xmlns=\"" + "$namespace" + "\" />" ); XmlBeanUtils.setValue( xBean, "YOUR_DETAIL_MESSAGE_HERE" ); addDetailEntry( xBean ); } catch ( XmlException xe ) { LOG.error( xe ); } } }