When configuring ServiceMix EIP patterns in a ServiceMix configuration file, there are some common elements that recur in many of the pattern schemas. This section provides a brief overview of these common elements and explains how they can be mapped to equivalent constructs in FUSE Mediation Router.
All of the patterns supported by ServiceMix EIP use the eip:exchange-target
element to specify JBI target endpoints. Table A.1
shows some examples of how to map some sample eip:exchange-target elements to
FUSE Mediation Router endpoint URIs, where it is assumed that the test prefix maps to
the http://progress.com/demos/test namespace.
Table A.1. Mapping the Exchange Target Element
| ServiceMix EIP Target | FUSE Mediation Router Endpoint URI |
|---|---|
<eip:exchange-target interface="HelloWorld" /> | jbi:interface:HelloWorld |
<eip:exchange-target service="test:HelloWorldService"
/> | jbi:service:http://progress.com/demos/test/HelloWorldService |
<eip:exchange-target service="test:HelloWorldService"
endpoint="secure" /> | jbi:service:http://progress.com/demos/test/HelloWorldService/secure |
<eip:exchange-target uri="service:test:HelloWorldService"
/> | jbi:service:http://progress.com/demos/test/HelloWorldService |
The ServiceMix EIP component lets you define predicate expressions in the XPath language
(for example, XPath predicates can appear in eip:xpath-predicate elements or in
eip:xpath-splitter elements, where the XPath predicate is specified using an
xpath attribute).
ServiceMix XPath predicates can easily be migrated to equivalent constructs in
FUSE Mediation Router: that is, either the xpath element (in XML configuration) or
the xpath() command (in Java DSL). For example, the message filter pattern in
FUSE Mediation Router can incorporate an XPath predicate as follows:
<route> <from uri="jbi:endpoint:http://progress.com/demos/test/messageFilter/endpoint"> <filter> <xpath>count(/test:world) = 1</xpath> <to uri="jbi:service:http://progress.com/demos/test/trace3"/> </filter> </route>
Where the xpath element specifies that only messages containing the
test:world element will pass through the filter.
![]() | Note |
|---|---|
FUSE Mediation Router also supports a wide range of other scripting languages (such as
XQuery, PHP, Python, Ruby, and so on), which can be used to define predicates. For details
of all the supported predicate languages, see Languages for Expressions and Predicates in |
When using XPath predicates in the ServiceMix EIP configuration, it is necessary to
define a namespace context using the eip:namespace-context element. The
namespace can then be referenced using a namespaceContext attribute.
When ServiceMix EIP configuration is migrated to FUSE Mediation Router, however, there is no
need to define namespace contexts, because FUSE Mediation Router allows you to define XPath
predicates without referencing a namespace context. Hence, you can simply drop the
eip:namespace-context elements when you migrate to FUSE Mediation Router.