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

19.21. Apache Camel


19.21.1. Apache Camel

Camel is an open source rules-based router developed by the Apache Project.

19.21.2. Using Apache Camel

To learn how to use Apache Camel, refer to the Red Hat JBoss Fuse Web Services and Routing with Camel CXF Guide.

19.21.3. Using Camel Routes Directly

You can deploy Camel routes directly in your user application, without needing to use SwitchYard. For example, you can deploy the Camel routes as a WAR file, fronted by a servlet or CXF.

19.21.4. Supported Camel Components

The following Apache Camel components are supported by JBoss Fuse:
  • camel-amqp
  • camel-atom
  • camel-atom
  • camel-bindy
  • camel-cdi
  • camel-cxf
  • camel-dozer
  • camel-file
  • camel-ftp
  • camel-hl7
  • camel-http
  • camel-jaxb
  • camel-jms
  • camel-jpa
  • camel-mail
  • camel-mqtt
  • camel-netty
  • camel-quartz
  • camel-rss
  • camel-sap
  • camel-saxon
  • camel-sql

19.21.5. Running Camel Examples

The Camel CXF (code first) example uses code-first to expose a web service in Camel running on JBoss EAP. It can be run using Maven.

Procedure 19.1. Task

  1. To build the example, navigate to its directory and run the following command:
    mvn clean install
    Copy to Clipboard Toggle word wrap
  2. To run the example, deploy it in JBoss EAP by copying the camel-example-cxf-tomcat.war located in the target directory to the standalone/deployments/ folder.
    The webservice is available in http://localhost:8080/camel-example-cxf-tomcat/webservices/incident?wsdl.

19.21.6. Sample Client With Camel CXF

This is what a sample client made with Camel CXF looks like:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
        <ns1:reportIncident xmlns:ns1="http://incident.cxf.example.camel.apache.org/">
            <arg0>
                <details>Accounting Department</details>
                <email>johncitizen@acompany.com</email>
                <familyName>Citizen</familyName>
                <givenName>John</givenName>
                <incidentId>12345</incidentId>
                <summary>Incident</summary>
            </arg0>
        </ns1:reportIncident>
    </soap:Body>
</soap:Envelope>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
        <ns1:statusIncident xmlns:ns1="http://incident.cxf.example.camel.apache.org/">
            <arg0>
                <incidentId>12345</incidentId>
            </arg0>
        </ns1:statusIncident>
    </soap:Body>
</soap:Envelope>

Copy to Clipboard Toggle word wrap

19.21.7. Camel Servlet Without Spring Example

Procedure 19.2. Task

  1. To build the example, navigate to the Apache Tomcat directory and enter the following command:
    mvn package
    Copy to Clipboard Toggle word wrap
  2. To deploy the example, copy the resulting .war file into Apache Tomcat's Deploy folder.
  3. To access the example, open your browser and navigate to http://localhost:8080/camel-example-servlet-tomcat-no-spring-2.10.0
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

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

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

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

Red Hat 소개

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

Theme

© 2025 Red Hat