vlc.j2c-operation-fault.vm Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of legstar-jaxws-generator Show documentation
Show all versions of legstar-jaxws-generator Show documentation
Generates adapters and proxies for inbound and outbound mainframe integration with Web Services.
##/////////////////////////////////////////////////////////////////////
##Jaxws Operation Fault Velocity Template.
##@author Fady
##/////////////////////////////////////////////////////////////////////
#if(${cixsOperation.packageName})
package ${cixsOperation.packageName};
#end
import javax.xml.ws.WebFault;
/**
* LegStar/Jaxws Operation fault.
* Fault element used as return message when an exception occurs.
*
* This class was generated by ${generatorName}.
*/
@WebFault(name = "${cixsOperation.faultInfoType}",
targetNamespace = "${cixsOperation.namespace}")
public class ${cixsOperation.faultType}
extends Exception {
/** Default serialVersionUID. */
private static final long serialVersionUID = 1L;
/** Java type that goes as soapenv:Fault detail element. */
private ${cixsOperation.faultInfoType} faultInfo;
/**
* Constructor for Web Fault.
* @param fault error details
* @param message error summary
*/
public ${cixsOperation.faultType}(
final String message,
final ${cixsOperation.faultInfoType} fault) {
super(message);
faultInfo = fault;
}
/**
* Constructor for Web Fault with cause.
* @param fault error details
* @param message error summary
* @param cause the cause
*/
public ${cixsOperation.faultType}(
final String message,
final ${cixsOperation.faultInfoType} fault,
final Throwable cause) {
super(message, cause);
faultInfo = fault;
}
/**
*
* @return
* returns fault bean: ${cixsOperation.packageName}.${cixsOperation.faultInfoType}
*/
public ${cixsOperation.faultInfoType} getFaultInfo() {
return faultInfo;
}
}