INT-3793: Fix Namespace Inconsistency
JIRA: https://jira.spring.io/browse/INT-3793 Also fix several typos in the TCP/IP chapter
This commit is contained in:
committed by
Artem Bilan
parent
8273edd0ea
commit
57e2fcfbca
@@ -56,7 +56,7 @@ For this solution it is enough to put at the end of the <chain> some <outbound-c
|
||||
[source,xml]
|
||||
----
|
||||
<int:chain input-channel="input">
|
||||
<si-xml:marshalling-transformer marshaller="marshaller" result-type="StringResult" />
|
||||
<int-xml:marshalling-transformer marshaller="marshaller" result-type="StringResult" />
|
||||
<int:service-activator ref="someService" method="someMethod"/>
|
||||
<int:header-enricher>
|
||||
<int:header name="foo" value="bar"/>
|
||||
|
||||
@@ -268,11 +268,11 @@ As is noted there, such modifications are possible whether or not SSL is being u
|
||||
[[caching-cf]]
|
||||
==== TCP Caching Client Connection Factory
|
||||
|
||||
As noted above, TCP sockets cam be 'single-use' (one request/response) or shared.
|
||||
As noted above, TCP sockets can be 'single-use' (one request/response) or shared.
|
||||
Shared sockets do not perform well with outbound gateways, in high-volume environments, because the socket can only process one request/response at a time.
|
||||
|
||||
To improve performance, users could use collaborating channel adapters instead of gateways, but that requires application-level message correlation.
|
||||
See <<ip-correlation>>for more information.
|
||||
See <<ip-correlation>> for more information.
|
||||
|
||||
Spring Integration 2.2 introduced a caching client connection factory, where a pool of shared sockets is used, allowing a gateway to process multiple concurrent requests with a pool of shared connections.
|
||||
|
||||
|
||||
@@ -510,17 +510,20 @@ NOTE: In addition to experimenting with the poller's concurrency settings, you c
|
||||
[[samples-xml-messaging]]
|
||||
==== The XML Messaging Sample
|
||||
|
||||
The xml messaging sample in the `org.springframework.integration.samples.xml` illustrates how to use some of the provided components which deal with xml payloads.
|
||||
The xml messaging sample in `basic/xml` illustrates how to use some of the provided components which deal with xml payloads.
|
||||
The sample uses the idea of processing an order for books represented as xml.
|
||||
|
||||
NOTE:This sample shows that the namespace prefix can be whatever you want; while we usually use, `int-xml` for
|
||||
integration XML components, the sample uses `si-xml`.
|
||||
|
||||
First the order is split into a number of messages, each one representing a single order item using the XPath splitter component.
|
||||
[source,xml]
|
||||
----
|
||||
<int-xml:xpath-splitter id="orderItemSplitter" input-channel="ordersChannel"
|
||||
<si-xml:xpath-splitter id="orderItemSplitter" input-channel="ordersChannel"
|
||||
output-channel="stockCheckerChannel" create-documents="true">
|
||||
<int-xml:xpath-expression expression="/orderNs:order/orderNs:orderItem"
|
||||
<si-xml:xpath-expression expression="/orderNs:order/orderNs:orderItem"
|
||||
namespace-map="orderNamespaceMap" />
|
||||
</int-xml:xpath-splitter>
|
||||
</si-xml:xpath-splitter>
|
||||
----
|
||||
|
||||
A service activator is then used to pass the message into a stock checker POJO.
|
||||
@@ -540,7 +543,7 @@ In the case where the order item is in stock the message is routed to the wareho
|
||||
Where the order item is not in stock the message is transformed using xslt into a format suitable for sending to the supplier.
|
||||
[source,xml]
|
||||
----
|
||||
<int-xml:xslt-transformer input-channel="outOfStockChannel"
|
||||
<si-xml:xslt-transformer input-channel="outOfStockChannel"
|
||||
output-channel="resupplyOrderChannel"
|
||||
xsl-resource="classpath:org/springframework/integration/samples/xml/bigBooksSupplierTransformer.xsl"/>
|
||||
----
|
||||
|
||||
@@ -220,7 +220,7 @@ The following XPath Expression will match agains the XML document above:
|
||||
|
||||
[source,xml]
|
||||
----
|
||||
<si-xml:xpath-expression expression="/:order/:orderItem"
|
||||
<int-xml:xpath-expression expression="/:order/:orderItem"
|
||||
ns-prefix="" ns-uri="http://www.example.org/prodcuts"/>
|
||||
----
|
||||
|
||||
@@ -229,7 +229,7 @@ The following XPath expression using the _myorder_ namespace prefix will match a
|
||||
|
||||
[source,xml]
|
||||
----
|
||||
<si-xml:xpath-expression expression="/myorder:order/myorder:orderItem"
|
||||
<int-xml:xpath-expression expression="/myorder:order/myorder:orderItem"
|
||||
ns-prefix="myorder" ns-uri="http://www.example.org/prodcuts"/>
|
||||
----
|
||||
|
||||
@@ -720,7 +720,7 @@ Instead, one or more output channels are determined dynamically.
|
||||
[source,xml]
|
||||
----
|
||||
<int-xml:xpath-router id="orderTypeRouter" input-channel="orderChannel">
|
||||
<si-xml:xpath-expression expression="/order/type"/>
|
||||
<int-xml:xpath-expression expression="/order/type"/>
|
||||
</int-xml:xpath-router>
|
||||
----
|
||||
|
||||
|
||||
Reference in New Issue
Block a user