INT-676
This commit is contained in:
@@ -54,10 +54,10 @@
|
||||
fate of the rejected Message. By default (if configured like the example above), the rejected Messages will
|
||||
be silently dropped. If rejection should instead indicate an error condition, then set the
|
||||
'throw-exception-on-rejection' flag to <code>true</code>:
|
||||
<programlisting language="java"><![CDATA[ <filter input-channel="input" ref="selector"
|
||||
<programlisting language="xml"><![CDATA[ <filter input-channel="input" ref="selector"
|
||||
output-channel="output" throw-exception-on-rejection="true"/> ]]></programlisting>
|
||||
If you want the rejected messages to go to a specific channel, provide that reference as the 'discard-channel':
|
||||
<programlisting language="java"><![CDATA[ <filter input-channel="input" ref="selector"
|
||||
<programlisting language="xml"><![CDATA[ <filter input-channel="input" ref="selector"
|
||||
output-channel="output" discard-channel="rejectedMessages"/> ]]></programlisting>
|
||||
</para>
|
||||
<note>
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
Then, the "fooService" can be injected into other beans, and the code that invokes the methods on that
|
||||
proxied instance of the FooService interface has no awareness of the Spring Integration API. The general
|
||||
approach is similar to that of Spring Remoting (RMI, HttpInvoker, etc.). See the "Samples" Appendix for
|
||||
an example that uses this "gateway" element.
|
||||
an example that uses this "gateway" element (in the Cafe demo).
|
||||
</para>
|
||||
<para>
|
||||
The reason that the attributes on the 'gateway' element are named 'default-request-channel' and
|
||||
|
||||
@@ -28,9 +28,18 @@
|
||||
example will create a String message for a <emphasis>POST</emphasis> request where the content type starts with "text", see the Javadoc for
|
||||
full details.
|
||||
</para>
|
||||
<para>Starting with this release MultiPart File support was implemented. If the request has been wrapped as a <emphasis>MultipartHttpServletRequest</emphasis>,
|
||||
then the 'content type' can be checked. If it is known, and begins with "text", then the <emphasis>MultipartFile</emphasis> can be copied to a String in the parameter
|
||||
map. If the 'content type does not begin with "text", then the <emphasis>MultipartFile</emphasis> can be copied to a byte array within the parameter map instead.
|
||||
<para>Starting with this release MultiPart File support was implemented. If the request has been wrapped as a
|
||||
<emphasis>MultipartHttpServletRequest</emphasis>, then the 'content type' can be checked. If it is known, and
|
||||
begins with "text", then the <emphasis>MultipartFile</emphasis> will be copied to a String in the parameter
|
||||
map. If the content type does not begin with "text", then the <emphasis>MultipartFile</emphasis> will be copied
|
||||
to a byte array within the parameter map instead.
|
||||
<note>
|
||||
The HttpInboundEndpoint will locate a MultipartResolver in the context if one exists with the bean name
|
||||
"multipartResolver" (the same name expected by Spring's DispatcherServlet). If it does in fact locate that
|
||||
bean, then the support for MultipartFiles will be enabled on the inbound request mapper. Otherwise, it will
|
||||
fail when trying to map a multipart-file request to a Spring Integration Message. For more on Spring's
|
||||
support for MultipartResolvers, refer to the <ulink url="http://static.springsource.org/spring/docs/2.5.x/reference/mvc.html#mvc-multipart">Spring Reference Manual</ulink>.
|
||||
</note>
|
||||
</para>
|
||||
<para>
|
||||
In sending a response to the client there are a number of ways to customise the behaviour of the gateway. By default the gateway will
|
||||
@@ -94,11 +103,11 @@ By default the Http request will be made using an instance of <classname>SimpleH
|
||||
<para>
|
||||
To configure an inbound http channel adapter which is an instance of <classname>HttpInboundEndpoint</classname> configured
|
||||
not to expect a response.
|
||||
<programlisting language="xml"><![CDATA[<http:inbound-channel-adapter id="httpChannelAdapter " channel="requests" supported-methods="PUT, DELETE"/>]]></programlisting>
|
||||
<programlisting language="xml"><![CDATA[ <http:inbound-channel-adapter id="httpChannelAdapter" channel="requests" supported-methods="PUT, DELETE"/>]]></programlisting>
|
||||
</para>
|
||||
<para>
|
||||
To configure an inbound http gateway which expects a response.
|
||||
<programlisting language="xml"><![CDATA[<http:inbound-gateway id="inboundGateway" request-channel="requests" reply-channel="responses"/>]]></programlisting>
|
||||
<programlisting language="xml"><![CDATA[ <http:inbound-gateway id="inboundGateway" request-channel="requests" reply-channel="responses"/>]]></programlisting>
|
||||
</para>
|
||||
<para>
|
||||
To configure the outbound gateway you can use the namespace support as well. The following code snippet shows the different configuration options for an outbound Http gateway.
|
||||
|
||||
Reference in New Issue
Block a user