
org.codehaus.enunciate.modules.xfire_client.client-web-fault.fmt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of enunciate-xfire-client
Show all versions of enunciate-xfire-client
The Enunciate XFire Client module generates the client-side artifacts for invoking a remove web service endpoint via XFire.
The newest version!
[#ftl]
[#--template for the client-side web fault.--]
[@file name=(fault.simpleName + ".java") package=packageFor(fault) charset="utf-8"]
// Generated by Enunciate
package ${packageFor(fault)};
/**
* ${fault.docComment?default("(no documentation provided)")?chop_linebreak?replace("\n", "\n * ")}
*/
public class ${fault.simpleName} extends [#if superFault?exists]${classnameFor(superFault, true)}[#else]Exception[/#if] {
[#if !fault.implicitSchemaElement]
[#assign beanfqn=classnameFor(fault.explicitFaultBeanType)/]
private ${beanfqn} faultInfo;
public ${fault.simpleName}(${beanfqn} faultInfo) {
this.faultInfo = faultInfo;
}
public ${fault.simpleName}(String message, ${beanfqn} faultInfo) {
super(message);
this.faultInfo = faultInfo;
}
/**
* The fault info for this exception.
*/
public ${beanfqn} getFaultInfo() {
return this.faultInfo;
}
[#else]
[#assign beanfqn=fault.implicitFaultBeanQualifiedName/]
[#assign beanPackage=packageFor(beanfqn[0..(beanfqn?last_index_of(".") - 1)])/]
[#assign simpleBeanName=beanfqn[(beanfqn?last_index_of(".") + 1)..]/]
[#assign beanfqn=(beanPackage + "." + simpleBeanName)/]
protected ${fault.simpleName}() {
super();
}
protected ${fault.simpleName}(String message) {
super(message);
[#list fault.childElements as childElement]
[#if childElement.property.simpleName = "message"]
this.message = message;
[/#if]
[/#list]
}
public ${fault.simpleName}(${beanfqn} faultInfo) {
super();
init(faultInfo);
}
public ${fault.simpleName}(String message, ${beanfqn} faultInfo) {
super(message);
init(faultInfo);
[#list fault.childElements as childElement]
[#if childElement.property.simpleName = "message"]
if (message != null) {
this.message = message;
}
[/#if]
[/#list]
}
protected void init(${beanfqn} faultInfo) {
[#list fault.childElements as childElement]
[#assign element=childElement.property/]
set${element.simpleName?cap_first}(faultInfo.get${element.simpleName?cap_first}());
[/#list]
}
[#list fault.childElements as childElement]
[#assign element=childElement.property/]
private ${classnameFor(childElement)} ${element.simpleName};
/**
* ${element.javaDoc.return?default(element.docValue?default("(no documentation provided)"))?chop_linebreak?replace("\n", "\n * ")}
*/
public ${classnameFor(childElement)} get${element.simpleName?cap_first}() {
return this.${element.simpleName};
}
/**
* ${element.javaDoc.return?default(element.docValue?default("(no documentation provided)"))?chop_linebreak?replace("\n", "\n * ")}
*/
public void set${element.simpleName?cap_first}(${classnameFor(childElement)} ${element.simpleName}) {
this.${element.simpleName} = ${element.simpleName};
}
[/#list]
[/#if]
}
[/@file]
© 2015 - 2025 Weber Informatics LLC | Privacy Policy