vlc.j2c-service-interface.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 Component Interface Velocity Template.
##@author Fady
##/////////////////////////////////////////////////////////////////////
#parse("vlc/j2c-service-common-imports.vm")
## ==================================================================
## Create unique Lists of imports and Types
##
#set($importTypes = [])
#set($jaxbTypes = [])
#foreach ($cixsOperation in $model.cixsOperations)
#getImportTypes(${cixsOperation.getInput()})
#getImportTypes(${cixsOperation.getOutput()})
##
## if operations are in a different package than the service, we
## need to import the operation classes as well
##
#if($cixsOperation.packageName && $cixsOperation.packageName != $model.packageName)
#set($newType = ${helper.getQualClassName(${cixsOperation.packageName}, ${cixsOperation.faultType})})
#addUnique($importTypes $newType)
#end
#end
## ==================================================================
#parse("vlc/j2c-service-common-package.vm")
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.xml.ws.RequestWrapper;
import javax.xml.ws.ResponseWrapper;
#foreach($importType in $importTypes)
import ${importType};
#end
/**
* LegStar/Jaxws Component interface.
* Each method maps to a CICS program.
*
* This class was generated by ${generatorName}.
*/
@WebService(name = "${wsdlPortName}",
targetNamespace = "${model.namespace}")
public interface ${model.interfaceClassName} {
#foreach ($cixsOperation in $model.cixsOperations)
/**
* LegStar operation ${cixsOperation.name}.
*
#if($cixsOperation.getInput().size() > 0)
* @param request a JAXB object mapping the request
#end
* @param hostHeader an object mapping header parameters
#if($cixsOperation.getOutput().size() > 0)
* @return a JAXB object mapping the reply
#end
* @throws ${cixsOperation.faultType} if method fails
*/
@WebMethod(operationName = "${cixsOperation.name}", action = "urn:${cixsOperation.name}")
@WebResult(name = "${cixsOperation.responseHolderType}",
targetNamespace = "${cixsOperation.responseHolderNamespace}")
#if($cixsOperation.getInput().size() > 0)
@RequestWrapper(localName = "${cixsOperation.requestWrapperType}",
targetNamespace = "${cixsOperation.namespace}",
className = "${helper.getQualClassName(${cixsOperation.packageName}, ${cixsOperation.requestWrapperType})}")
#end
@ResponseWrapper(localName = "${cixsOperation.responseWrapperType}",
targetNamespace = "${cixsOperation.namespace}",
className = "${helper.getQualClassName(${cixsOperation.packageName}, ${cixsOperation.responseWrapperType})}")
#if($cixsOperation.getOutput().size() > 0)
$cixsOperation.responseHolderType ${cixsOperation.name}(
#else
void ${cixsOperation.name}(
#end
#if($cixsOperation.getInput().size() > 0)
@WebParam(name = "${cixsOperation.requestHolderType}",
targetNamespace = "${cixsOperation.requestHolderNamespace}")
$cixsOperation.requestHolderType request,
#end
@WebParam(name = "${model.headerClassName}", header = true, partName = "hostHeader",
targetNamespace = "${cixsOperation.namespace}")
${model.headerClassName} hostHeader)
throws ${cixsOperation.faultType};
#end
}