이 콘텐츠는 선택한 언어로 제공되지 않습니다.

A.2. Common Elements


Overview

When configuring ServiceMix EIP patterns in a ServiceMix configuration file, there are some common elements that occur 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 Apache Camel.

Exchange target

All of the patterns supported by ServiceMix EIP use the eip:exchange-target element to specify JBI target endpoints. Table A.1, “Mapping the Exchange Target Element” shows examples of how to map sample eip:exchange-target elements to Apache Camel endpoint URIs, where it is assumed that the test prefix maps to the http://progress.com/demos/test namespace.
Expand
Table A.1. Mapping the Exchange Target Element
ServiceMix EIP TargetApache Camel 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

Predicates

The ServiceMix EIP component allows you to 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 Apache Camel: that is, either the xpath element (in XML configuration) or the xpath() command (in Java DSL). For example, the message filter pattern in Apache Camel 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>
Copy to Clipboard Toggle word wrap
Where the xpath element specifies that only messages containing the test:world element will pass through the filter.
Note
Apache Camel also supports a wide range of other scripting languages including XQuery, PHP, Python, and Ruby, which can be used to define predicates. For details of all the supported predicate languages, see Expression and Predicate Languages.

Namespace contexts

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 is then referenced using a namespaceContext attribute.
When ServiceMix EIP configuration is migrated to Apache Camel, there is no need to define namespace contexts, because Apache Camel allows you to define XPath predicates without referencing a namespace context. You can simply drop the eip:namespace-context elements when you migrate to Apache Camel.
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat