<?xml version="1.0" encoding="UTF-8"?>
<!-- version="1.1.1" -->

<definitions 
	name="omds3ServicesBroker-1-1-0" 
	targetNamespace="urn:omds3ServicesBroker-1-1-0"
	xmlns:os="urn:omds3ServicesBroker-1-1-0" 
	xmlns:ost="urn:omds3ServiceTypes-1-1-0" 
	xmlns:cst="urn:omds3CommonServiceTypes-1-1-0" 
	xmlns="http://schemas.xmlsoap.org/wsdl/"
	xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" 
	xmlns:ns="http://www.w3.org/2001/XMLSchema"
	xmlns:ns1="http://schemas.xmlsoap.org/soap/encoding/" 
	xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap12/"
	xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>
	
	<types>
		<schema xmlns="http://www.w3.org/2001/XMLSchema">
			<import namespace="urn:omds3ServiceTypes-1-1-0" schemaLocation="omds3ServiceTypes.xsd" />
		</schema>
	</types>
	
	<!-- Schaden -->

	
	<message name="DeclareNewClaimStatusRequestMsg">
		<part name="parameters" element="ost:DeclareNewClaimStatusRequest"/>
	</message>
	<message name="DeclareNewClaimStatusResponseMsg">
		<part name="parameters" element="ost:DeclareNewClaimStatusResponse"/>
	</message>

	<message name="LossEventRegisteredRequestMsg">
		<part name="parameters" element="ost:LossEventRegisteredRequest"/>
	</message>
	<message name="LossEventRegisteredResponseMsg">
		<part name="parameters" element="ost:LossEventRegisteredResponse"/>
	</message>
	
	<!-- Fehler Message -->	
	<message name="BrokerServiceFaultMsg">
		<part name="parameters" element="cst:serviceFault" />
	</message>
	
	
	<portType name="omdsBrokerServicePortType">
	
		<!-- Schaden -->
		<operation name="declareNewClaimStatus">
			<input name="DeclareNewClaimStatusRequestPort" message="os:DeclareNewClaimStatusRequestMsg" />
			<output name="DeclareNewClaimStatusResponsePort" message="os:DeclareNewClaimStatusResponseMsg" />
            <fault name="DeclareNewClaimStatusFault" message="os:BrokerServiceFaultMsg" />
        </operation>

		<operation name="lossEventRegistered">
			<input name="LossEventRegisteredRequestPort" message="os:LossEventRegisteredRequestMsg" />
			<output name="LossEventRegisteredResponsePort" message="os:LossEventRegisteredResponseMsg" />
            <fault name="LossEventRegisteredFault" message="os:BrokerServiceFaultMsg" />
        </operation>
   	</portType>

	<binding name="omdsBrokerServicePortBinding" type="os:omdsBrokerServicePortType">
		<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />

		<!-- Referenz auf jeweilige Security Policy für alle Methoden, in diesem Fall eine UsernameToken-Policy -->
 		<wsp:PolicyReference URI="#OMDSUsernameTokenPolicy" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"/>

		<!-- Schaden -->
		<operation name="declareNewClaimStatus">
			<soap:operation soapAction="urn:declareNewClaimStatus" style="document" />
			<input name="DeclareNewClaimStatusRequestPort">
				<soap:body use="literal" />
			</input>
			<output name="DeclareNewClaimStatusResponsePort">
				<soap:body use="literal" />
			</output>
			<fault name="DeclareNewClaimStatusFault">
				<soap:fault name="DeclareNewClaimStatusFault" use="literal"/>
			</fault>
		</operation>

		<operation name="lossEventRegistered">
			<soap:operation soapAction="urn:lossEventRegistered" style="document" />
			<input name="LossEventRegisteredRequestPort">
				<soap:body use="literal" />
			</input>
			<output name="LossEventRegisteredResponsePort">
				<soap:body use="literal" />
			</output>
			<fault name="LossEventRegisteredFault">
				<soap:fault name="LossEventRegisteredFault" use="literal"/>
			</fault>
		</operation>
	</binding>
	
	<service name="omdsBrokerService">
		<port name="omdsBrokerServicePort" binding="os:omdsBrokerServicePortBinding">
			<soap:address location="http://localhost:80/omdsBrokerServicePort" />
		</port>
	</service>
		
	<wsp:Policy wsu:Id="OMDSUsernameTokenPolicy" xmlns:wsp="http://www.w3.org/ns/ws-policy" 
	  xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
	  xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
	  <wsp:ExactlyOne>
		  <wsp:All>
			<!-- Def HTTPS -->
			<sp:TransportBinding>
				<wsp:Policy>
					<sp:TransportToken>
						<wsp:Policy>
							<sp:HttpsToken RequireClientCertificate="false"/>
						</wsp:Policy>
					</sp:TransportToken>
				</wsp:Policy>
			</sp:TransportBinding>
			<!-- schreibe Username-Token mit Passwort-Digest (Hash) vor -->
			<sp:SupportingTokens>
			  <wsp:Policy>
				<sp:UsernameToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
				  <wsp:Policy>
					<sp:HashPassword/>
				  </wsp:Policy>
				</sp:UsernameToken>
			  </wsp:Policy>
			</sp:SupportingTokens>

		  </wsp:All>
		</wsp:ExactlyOne>
	</wsp:Policy>
  
</definitions>
