INT-2695 WS Support URI Schemes Other than http(s)

Previously, only http: or https: URI schemes were supported
by the uri attribute. To use other schemes (such as jms:),
you had to provide a DestinationProvider.

Add support for schemes other than http and https by
creating a DestinationProvider internally when such a
URI is detected.

Note: <uri-variable/>s are NOT supported except when
a URI with an http(s) scheme is provided. An exception
is thrown if variables are provided with an incompatible
URI, or if a DestinationProvider is supplied.

This could break existing applications that provide an
external DestinationProvider and have configured
<uri-variable/>s. Previously, these variables were
simply ignored.
This commit is contained in:
Gary Russell
2012-09-07 13:08:38 -04:00
committed by Oleg Zhurakousky
parent e337521958
commit 40ce2ab793
4 changed files with 58 additions and 6 deletions

View File

@@ -130,5 +130,20 @@ as per standard Spring Web Services configuration.
when a custom Transformer works against the <interfacename>WebServiceMessage</interfacename> directly.
</para>
</section>
<section id="outbound-uri">
<title>Outbound URI Configuration</title>
<para>
For URIs with an <emphasis>http:</emphasis> (or <emphasis>https:</emphasis>) scheme,
&lt;uri-variable/&gt; substitution is supported:
</para>
<programlisting><![CDATA[<ws:outbound-gateway id="gateway" request-channel="input" uri="http://springsource.org/{foo}-{bar}">
<ws:uri-variable name="foo" expression="payload.substring(1,7)"/>
<ws:uri-variable name="bar" expression="headers.x"/>
</ws:outbound-gateway>]]></programlisting>
<para>
For other schemes, such as <emphasis>jms:</emphasis>, or if a <classname>DestinationProvider</classname>
is supplied, variable substitution is not supported and a configuration error will result if variables
are provided.
</para>
</section>
</chapter>