<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns="http://www.springframework.org/schema/integration/ws"
			xmlns:xsd="http://www.w3.org/2001/XMLSchema"
			xmlns:tool="http://www.springframework.org/schema/tool"
			xmlns:integration="http://www.springframework.org/schema/integration"
			targetNamespace="http://www.springframework.org/schema/integration/ws"
			elementFormDefault="qualified">

	<xsd:import namespace="http://www.springframework.org/schema/beans"/>
	<xsd:import namespace="http://www.springframework.org/schema/tool"/>
	<xsd:import namespace="http://www.springframework.org/schema/integration"
				schemaLocation="https://www.springframework.org/schema/integration/spring-integration.xsd"/>

	<xsd:annotation>
		<xsd:documentation><![CDATA[
	Defines the configuration elements for Spring Integration's Web Service adapters.
		]]></xsd:documentation>
	</xsd:annotation>

	<xsd:element name="outbound-gateway">
		<xsd:complexType>
			<xsd:annotation>
				<xsd:documentation>
					Configures a Consumer Endpoint for the
					'org.springframework.integration.ws.AbstractWebServiceOutboundGateway' implementation that
					sends SOAP requests and expects responses.
				</xsd:documentation>
			</xsd:annotation>
			<xsd:sequence>
				<xsd:element ref="integration:poller" minOccurs="0" maxOccurs="1"/>
				<xsd:element name="uri-variable" type="uriVariableType" minOccurs="0" maxOccurs="unbounded"/>
				<xsd:element name="transactional" type="integration:transactionalType" minOccurs="0" maxOccurs="1"/>
				<xsd:element name="request-handler-advice-chain" type="integration:handlerAdviceChainType" minOccurs="0"
							 maxOccurs="1"/>
			</xsd:sequence>
			<xsd:attribute name="id" type="xsd:string">
				<xsd:annotation>
					<xsd:documentation>
						A unique identifier for this Gateway.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="request-channel" type="xsd:string">
				<xsd:annotation>
					<xsd:documentation>
						The channel where Messages should be sent to invoke the Web Service.
					</xsd:documentation>
					<xsd:appinfo>
						<tool:annotation kind="ref">
							<tool:expected-type type="org.springframework.messaging.MessageChannel"/>
						</tool:annotation>
					</xsd:appinfo>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="reply-channel" type="xsd:string">
				<xsd:annotation>
					<xsd:documentation>
						The channel where Messages created from the Web Service responses will be sent.
						This is optional. However, if non-empty responses are expected and this is not set,
						then the request Messages must contain a REPLY_CHANNEL header.
					</xsd:documentation>
					<xsd:appinfo>
						<tool:annotation kind="ref">
							<tool:expected-type type="org.springframework.messaging.MessageChannel"/>
						</tool:annotation>
					</xsd:appinfo>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="reply-timeout" type="xsd:string" default="30000">
				<xsd:annotation>
					<xsd:documentation><![CDATA[
						Allows you to specify how long this gateway will wait for
						the reply message to be sent successfully to the reply channel
						before throwing an exception. This attribute only applies when the
						channel might block, for example when using a bounded queue channel that
						is currently full.

						Also, keep in mind that when sending to a DirectChannel, the
						invocation will occur in the sender's thread. Therefore,
						the failing of the send operation may be caused by other
						components further downstream.

						The "reply-timeout" attribute maps to the "sendTimeout" property of the
						underlying 'MessagingTemplate' instance (org.springframework.integration.core.MessagingTemplate).

						The value is specified in milliseconds.
					]]></xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="requires-reply" type="xsd:string" default="false">
				<xsd:annotation>
					<xsd:documentation>
						Specify whether this outbound gateway must return a non-null value. This value is
						'false' by default, otherwise a ReplyRequiredException will be thrown when
						the underlying service returns a null value, or an empty String (if
						'ignore-empty-responses' is 'true').
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="web-service-template" type="xsd:string">
				<xsd:annotation>
					<xsd:documentation>
						Reference to a WebServiceTemplate instance.
						The WebServiceTemplate-specific options like 'message-sender(s)', 'interceptor(s)',
						'fault-message-resolver' and 'message-factory' must be declared on that instance.
					</xsd:documentation>
					<xsd:appinfo>
						<tool:annotation kind="ref">
							<tool:expected-type type="org.springframework.ws.client.core.WebServiceTemplate"/>
						</tool:annotation>
					</xsd:appinfo>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="uri" type="xsd:string">
				<xsd:annotation>
					<xsd:documentation><![CDATA[
	The Destination URI for this Web Service Gateway. If the URI should be determined at runtime
	(e.g. registry lookup), then configure a 'destination-provider' reference instead. Alternatively,
	this URI may include {placeholders} whose values are determined by evaluating SpEL expressions
	provided via 'uri-variable' sub-elements. The root object for those evaluations is the actual
	request Message at runtime, i.e. you can access its payload or headers in the expression.
					]]></xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="encoding-mode" default="TEMPLATE_AND_VALUES">
				<xsd:annotation>
					<xsd:documentation>
						Set the encoding mode during URI building.
					</xsd:documentation>
				</xsd:annotation>
				<xsd:simpleType>
					<xsd:union memberTypes="encodingModeEnumeration xsd:string"/>
				</xsd:simpleType>
			</xsd:attribute>
			<xsd:attribute name="destination-provider" type="xsd:string">
				<xsd:annotation>
					<xsd:documentation>
						Reference to a DestinationProvider implementation. Either provide this or a 'uri', never both.
						See org.springframework.ws.client.support.destination.DestinationProvider for more detail.
					</xsd:documentation>
					<xsd:appinfo>
						<tool:annotation kind="ref">
							<tool:expected-type
									type="org.springframework.ws.client.support.destination.DestinationProvider"/>
						</tool:annotation>
					</xsd:appinfo>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="marshaller" type="xsd:string">
				<xsd:annotation>
					<xsd:documentation>
						Reference to a Spring OXM Marshaller. If the Marshaller instance also implements
						the Unmarshaller interface, then the 'unmarshaller' attribute is not required.
					</xsd:documentation>
					<xsd:appinfo>
						<tool:annotation kind="ref">
							<tool:expected-type type="org.springframework.oxm.Marshaller"/>
						</tool:annotation>
					</xsd:appinfo>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="unmarshaller" type="xsd:string">
				<xsd:annotation>
					<xsd:documentation>
						Reference to a Spring OXM Unmarshaller.
					</xsd:documentation>
					<xsd:appinfo>
						<tool:annotation kind="ref">
							<tool:expected-type type="org.springframework.oxm.Unmarshaller"/>
						</tool:annotation>
					</xsd:appinfo>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="ignore-empty-responses" type="xsd:string">
				<xsd:annotation>
					<xsd:documentation><![CDATA[
	Indicates whether empty String response payloads should be considered as null. The default is TRUE.
	See also 'requires-reply'. Note that when 'requires-reply' is 'true' the response is not actually 'ignored',
	because it will cause a ReplyRequiredException to be thrown.
	Set this to FALSE if you want to send empty String responses in reply Messages.
					]]></xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="source-extractor" type="xsd:string">
				<xsd:annotation>
					<xsd:documentation>
						Reference to a Spring Web Services SourceExtractor.
					</xsd:documentation>
					<xsd:appinfo>
						<tool:annotation kind="ref">
							<tool:expected-type type="org.springframework.ws.client.core.SourceExtractor"/>
						</tool:annotation>
					</xsd:appinfo>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="request-callback" type="xsd:string">
				<xsd:annotation>
					<xsd:documentation>
						Reference to a Spring Web Services WebServiceMessageCallback. This enables changing
						the Web Service request message after the payload has been written to it but prior
						to invocation of the actual Web Service.
					</xsd:documentation>
					<xsd:appinfo>
						<tool:annotation kind="ref">
							<tool:expected-type type="org.springframework.ws.client.core.WebServiceMessageCallback"/>
						</tool:annotation>
					</xsd:appinfo>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="message-factory" type="xsd:string">
				<xsd:annotation>
					<xsd:appinfo>
						<tool:annotation kind="ref">
							<tool:expected-type type="org.springframework.ws.WebServiceMessageFactory"/>
						</tool:annotation>
					</xsd:appinfo>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="fault-message-resolver" type="xsd:string">
				<xsd:annotation>
					<xsd:appinfo>
						<tool:annotation kind="ref">
							<tool:expected-type type="org.springframework.ws.client.core.FaultMessageResolver"/>
						</tool:annotation>
					</xsd:appinfo>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="message-senders" type="xsd:string">
				<xsd:annotation>
					<xsd:documentation>
						Reference to the bean definition for a list or array of WebServiceMessageSenders.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="interceptor" type="xsd:string">
				<xsd:annotation>
					<xsd:documentation>
						Reference to the bean definition of a ClientInterceptor.
					</xsd:documentation>
					<xsd:appinfo>
						<tool:annotation kind="ref">
							<tool:expected-type
									type="org.springframework.ws.client.support.interceptor.ClientInterceptor"/>
						</tool:annotation>
					</xsd:appinfo>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="interceptors" type="xsd:string">
				<xsd:annotation>
					<xsd:documentation>
						Reference to the bean definition for a list or array of ClientInterceptors.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="order" type="xsd:string"/>
			<xsd:attribute name="header-mapper">
				<xsd:annotation>
					<xsd:documentation>
						Reference to a SoapHeaderMapper implementation
						that this gateway will use to map between Spring Integration
						MessageHeaders and the SoapHeader.
					</xsd:documentation>
					<xsd:appinfo>
						<tool:annotation kind="ref">
							<tool:expected-type type="org.springframework.integration.ws.SoapHeaderMapper"/>
						</tool:annotation>
					</xsd:appinfo>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="mapped-request-headers" type="xsd:string">
				<xsd:annotation>
					<xsd:documentation><![CDATA[
	Comma-separated list of names of SOAP Headers to be mapped from the SOAP request into the MessageHeaders.
	This can only be provided if the 'header-mapper' reference is not being set directly. The values in
	this list can also be simple patterns to be matched against the header names (e.g. "foo*" or "*foo").
							]]></xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="mapped-reply-headers" type="xsd:string">
				<xsd:annotation>
					<xsd:documentation><![CDATA[
Comma-separated list of names of MessageHeaders to be mapped into the SOAP Headers of the SOAP reply.
This can only be provided if the 'header-mapper' reference is not being set directly. The values in
this list can also be simple patterns to be matched against the header names (e.g. "foo*" or "*foo").
						]]></xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="extract-payload">
				<xsd:annotation>
					<xsd:documentation>
						Set to 'true' to extract the WebServiceMessage payload.
						Otherwise the whole WebServiceMessage is used as the integration message payload.
						This option is only applied for the simple gateway.
					</xsd:documentation>
				</xsd:annotation>
				<xsd:simpleType>
					<xsd:union memberTypes="xsd:boolean xsd:string"/>
				</xsd:simpleType>
			</xsd:attribute>
			<xsd:attributeGroup ref="integration:smartLifeCycleAttributeGroup"/>
		</xsd:complexType>
	</xsd:element>

	<xsd:complexType name="uriVariableType">
		<xsd:annotation>
			<xsd:documentation><![CDATA[
				Expression to be evaluated against the Message to replace a URI {placeholder} with the evaluation result.
			]]></xsd:documentation>
		</xsd:annotation>
		<xsd:attribute name="name" use="required">
			<xsd:annotation>
				<xsd:documentation><![CDATA[
					Name of the placeholder to be replaced.
				]]></xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="expression" use="required">
			<xsd:annotation>
				<xsd:documentation><![CDATA[
					Expression to be evaluated to determine the replacement value.
					The Message is the root object of the expression, therefore
					the 'payload' and 'headers' are available directly. Any bean
					may be resolved if the bean name is preceded with '@'.
				]]></xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
	</xsd:complexType>

	<xsd:element name="inbound-gateway">
		<xsd:complexType>
			<xsd:annotation>
				<xsd:documentation>
					Configures a Messaging Gateway Endpoint for the
					'org.springframework.integration.ws.AbstractWebServiceInboundGateway' implementation that
					receives SOAP requests and produce responses.
				</xsd:documentation>
			</xsd:annotation>
			<xsd:attribute name="id" type="xsd:string"/>
			<xsd:attribute name="request-channel" type="xsd:string">
				<xsd:annotation>
					<xsd:appinfo>
						<tool:annotation kind="ref">
							<tool:expected-type type="org.springframework.messaging.MessageChannel"/>
						</tool:annotation>
					</xsd:appinfo>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="reply-channel" type="xsd:string">
				<xsd:annotation>
					<xsd:appinfo>
						<tool:annotation kind="ref">
							<tool:expected-type type="org.springframework.messaging.MessageChannel"/>
						</tool:annotation>
					</xsd:appinfo>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="reply-timeout" type="xsd:string">
				<xsd:annotation>
					<xsd:documentation>
						Maximum time in milliseconds to wait for a reply from the downstream message flow initiated by
						this gateway.
						This attribute is only relevant if at least some part of the downstream flow is asynchronous.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="error-channel" type="xsd:string">
				<xsd:annotation>
					<xsd:appinfo>
						<tool:annotation kind="ref">
							<tool:expected-type type="org.springframework.messaging.MessageChannel"/>
						</tool:annotation>
					</xsd:appinfo>
					<xsd:documentation>
						If a (synchronous) downstream exception is thrown and an error-channel is specified,
						the MessagingException will be sent to this channel.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="marshaller" type="xsd:string">
				<xsd:annotation>
					<xsd:appinfo>
						<tool:annotation kind="ref">
							<tool:expected-type type="org.springframework.oxm.Marshaller"/>
						</tool:annotation>
					</xsd:appinfo>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="unmarshaller" type="xsd:string">
				<xsd:annotation>
					<xsd:appinfo>
						<tool:annotation kind="ref">
							<tool:expected-type type="org.springframework.oxm.Unmarshaller"/>
						</tool:annotation>
					</xsd:appinfo>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="extract-payload">
				<xsd:annotation>
					<xsd:documentation>
						Set to 'true' to extract the WebServiceMessage payload.
						Otherwise the whole WebServiceMessage is used as the integration message payload.
						This option is only applied for the simple gateway.
					</xsd:documentation>
				</xsd:annotation>
				<xsd:simpleType>
					<xsd:union memberTypes="xsd:boolean xsd:string"/>
				</xsd:simpleType>
			</xsd:attribute>
			<xsd:attribute name="header-mapper">
				<xsd:annotation>
					<xsd:documentation>
						Reference to a SoapHeaderMapper implementation
						that this gateway will use to map between Spring Integration
						MessageHeaders and the SoapHeader.
					</xsd:documentation>
					<xsd:appinfo>
						<tool:annotation kind="ref">
							<tool:expected-type type="org.springframework.integration.ws.SoapHeaderMapper"/>
						</tool:annotation>
					</xsd:appinfo>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="mapped-request-headers" type="xsd:string">
				<xsd:annotation>
					<xsd:documentation><![CDATA[
	Comma-separated list of names of SOAP Headers to be mapped from the SOAP request into the MessageHeaders.
	This can only be provided if the 'header-mapper' reference is not being set directly. The values in
	this list can also be simple patterns to be matched against the header names (e.g. "foo*" or "*foo").
							]]></xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="mapped-reply-headers" type="xsd:string">
				<xsd:annotation>
					<xsd:documentation><![CDATA[
Comma-separated list of names of MessageHeaders to be mapped into the SOAP Headers of the SOAP reply.
This can only be provided if the 'header-mapper' reference is not being set directly. The values in
this list can also be simple patterns to be matched against the header names (e.g. "foo*" or "*foo").
						]]></xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attributeGroup ref="integration:smartLifeCycleAttributeGroup"/>
		</xsd:complexType>
	</xsd:element>

	<xsd:element name="header-enricher">
		<xsd:complexType>
			<xsd:annotation>
				<xsd:documentation>
					Defines a 'org.springframework.integration.transformer.HeaderEnricher' for adding a SOAP Action
					value.
				</xsd:documentation>
			</xsd:annotation>
			<xsd:complexContent>
				<xsd:extension base="transformerType">
					<xsd:choice maxOccurs="2">
						<xsd:element name="soap-action" type="headerType"/>
						<xsd:element ref="integration:poller" minOccurs="0"/>
					</xsd:choice>
					<xsd:attribute name="default-overwrite">
						<xsd:annotation>
							<xsd:documentation>
								Specify the default boolean value for whether to overwrite existing header values. This
								will only take effect for
								sub-elements that do not provide their own 'overwrite' attribute. If the
								'default-overwrite' attribute is not
								provided, then the specified header values will NOT overwrite any existing ones with the
								same header names.
							</xsd:documentation>
						</xsd:annotation>
						<xsd:simpleType>
							<xsd:union memberTypes="xsd:boolean xsd:string"/>
						</xsd:simpleType>
					</xsd:attribute>
				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>

	<xsd:complexType name="headerType">
		<xsd:attribute name="value" type="xsd:string"/>
		<xsd:attribute name="ref" type="xsd:string"/>
		<xsd:attribute name="expression" type="xsd:string"/>
		<xsd:attribute name="overwrite">
			<xsd:annotation>
				<xsd:documentation>
					Boolean value to indicate whether this header value should overwrite an existing header value for
					the same name.
				</xsd:documentation>
			</xsd:annotation>
			<xsd:simpleType>
				<xsd:union memberTypes="xsd:boolean xsd:string"/>
			</xsd:simpleType>
		</xsd:attribute>
	</xsd:complexType>

	<xsd:complexType name="transformerType">
		<xsd:attribute name="id" type="xsd:string"/>
		<xsd:attributeGroup ref="integration:inputOutputChannelGroup"/>
	</xsd:complexType>

	<xsd:simpleType name="encodingModeEnumeration">
		<xsd:restriction base="xsd:token">
			<xsd:enumeration value="TEMPLATE_AND_VALUES"/>
			<xsd:enumeration value="VALUES_ONLY"/>
			<xsd:enumeration value="URI_COMPONENT"/>
			<xsd:enumeration value="NONE"/>
		</xsd:restriction>
	</xsd:simpleType>

</xsd:schema>
