<#--
   ******************************************************
   *
   *                       NOTICE
   *
   *  THIS SOFTWARE IS THE PROPERTY OF AND CONTAINS
   *  CONFIDENTIAL INFORMATION OF SSA GLOBAL 
   *  TECHNOLOGIES, INC., AND SHALL NOT BE COPIED,
   *  USED, NOR DISCLOSED WITHOUT EXPRESS WRITTEN
   *  AUTHORIZATION.  ALTHOUGH PUBLICATION IS NOT
   *  INTENDED, IN THE EVENT OF PUBLICATION, THE
   *  FOLLOWING NOTICE IS APPLICABLE:
   *
   *  (c) COPYRIGHT 2005 SSA GLOBAL TECHNOLOGIES, INC.
   *
   *           SSA GLOBAL TECHNOLOGIES, INC.
   *
   ******************************************************
 -->
<#import "wsdl.common.ftl" as common/>
<#import "wsdl.macros.ftl" as macro/>
<#assign businessInterfaceName=object.name>
<#assign namespace="http://www.infor.com/businessinterface/"+businessInterfaceName>
<@macro.copyright/>

<wsdl:definitions 
	xmlns:bo="${namespace}" 
	xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
	xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
	xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
	targetNamespace="${namespace}" 
	name="${businessInterfaceName}">

	<wsdl:types>
		<xsd:schema targetNamespace="${namespace}">
<#-- generate types -->
<#list common.listPublicMethods() as method>	
			<xsd:complexType name="${method.name}RequestType">
				<xsd:sequence>
					<@macro.generateControlArea iMethod=method iInput=true/>
					<@macro.generateDataArea iMethod=method iInput=true/>
				</xsd:sequence>
			</xsd:complexType>
			<xsd:complexType name="${method.name}ResponseType">
				<xsd:sequence>
					<@macro.generateControlArea iMethod=method iInput=false/>
					<@macro.generateDataArea iMethod=method iInput=false/>
					<xsd:element name="InformationArea" type="bo:InformationArea" minOccurs="0"/>					
				</xsd:sequence>
			</xsd:complexType>
</#list>
			<xsd:element name="Result" type="bo:Message"/>	
			<@macro.generateInformationArea/>
			<@macro.generateMessageTypes/>			
			<@macro.generateFilterType/>
			<@macro.generateSelectionType/>
			<@macro.generateTypes/>
		</xsd:schema>	
	</wsdl:types>
	
<#-- generate messages -->
<#list common.listPublicMethods() as method>	
	<wsdl:message name="${method.name}Request">
		<wsdl:part name="${method.name}Request" type="bo:${method.name}RequestType"/>
	</wsdl:message>
	<wsdl:message name="${method.name}Response">
		<wsdl:part name="${method.name}Response" type="bo:${method.name}ResponseType"/>
	</wsdl:message>
</#list>
	<wsdl:message name="Result">
		<wsdl:part name="Result" element="bo:Result"/>
	</wsdl:message>
	
<#-- generate portType and operations -->
	<wsdl:portType name="${businessInterfaceName}">
<#list common.listPublicMethods() as method>	
		<wsdl:operation name="${method.name}">
			<wsdl:input message="bo:${method.name}Request"/>
			<wsdl:output message="bo:${method.name}Response"/>
			<wsdl:fault name="FaultName" message="bo:Result"/>
		</wsdl:operation>
</#list>
	</wsdl:portType>
	
<#-- generate bindings -->
	<wsdl:binding name="${businessInterfaceName}SoapBinding" type="bo:${businessInterfaceName}">
		<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<#list common.listPublicMethods() as method>	
		<wsdl:operation name="${method.name}">
			<soap:operation soapAction=""/>						
			<wsdl:input>
				<soap:body use="literal" namespace="${namespace}"/>
			</wsdl:input>
			<wsdl:output>
				<soap:body use="literal" namespace="${namespace}"/>
			</wsdl:output>
			<wsdl:fault name="FaultName">
				<soap:fault name="FaultName" use="literal"/>
			</wsdl:fault>
		</wsdl:operation>
</#list>
	</wsdl:binding>

<#-- generate services -->
	<wsdl:service name="${businessInterfaceName}Service">
		<wsdl:port name="${businessInterfaceName}SoapPort" binding="bo:${businessInterfaceName}SoapBinding">
			<soap:address location="http://localhost:8080/wstk/services/BusComponentName"/>
		</wsdl:port>
	</wsdl:service>
</wsdl:definitions>