検索

このコンテンツは選択した言語では利用できません。

Chapter 3. Viewing and editing Rest DSL components

download PDF

You can view and edit Rest DSL components that are in your Camel Context file.

3.1. Viewing a graphical representation of Rest DSL components

To view the REST DSL components in your Camel Context file in graphical mode:

  1. Open the Camel Context file in the route editor.
  2. Click the REST tab to the view the Rest DSL components.

    RESTtab

    The REST Configuration section displays these configuration options:

    • Component — The Camel component to use for the REST transport.
    • Context Path — The leading context-path for the REST services. You can use this option for components, such as Servlet, where the web application is deployed using a context-path.
    • Port — The port number that exposes the REST service.
    • Binding Mode — The binding mode for JSON or XML format messages. Possible values are: off (the default), auto, json, xml, or json_xml.
    • Host — The hostname to use for exposing the REST service.
  3. Click a REST element to view its associated operations (for example, GET, POST, PUT, and DELETE) in the REST Operations section.
  4. Click a REST element or a REST operation to view its properties in the Properties view.

    RESTproperties

3.2. Editing Rest DSL components in the graphical view

You can add, edit, or delete REST elements in your project’s Camel Context file in the REST tab.

  • To add a new REST element:

    1. In the REST elements section, click the + button. A REST element is added to the list of REST elements.

      RESTAddElement1
    2. In the Properties view, edit the REST element properties.

      RESTAddElement2
  • To add a REST operation to a REST element:

    1. In the list of REST elements, select a REST element.

      RESTAddElement1
    2. In the REST operations section, click the + button.

      The Add REST Operation dialog box opens.

      RESTAddOperation
    3. Specify the ID, URI, and Operation Type. Optionally, select a Referenced Route ID.
    4. Click Finish. The new operation shows in the list of REST operations for the selected REST element.
  • To edit a REST element or operation, select it in the REST tab and then edit its property values in the Properties tab.
  • To remove a selected REST element or operation, click the x button.

3.3. Viewing and editing the Rest DSL source code

You can also view and edit Rest DSL components in the Source tab:

  1. Open the Camel Context file in the route editor.
  2. Click the route editor’s Source tab and then edit the code.

    RESTsourcetab
  3. Optionally, click the REST tab to see the changes in the graphical view.
  4. To save your changes, select File Save.

For information about the Camel Rest DSL, see the “Defining REST services” section of the Apache Camel Development Guide.

Red Hat logoGithubRedditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

© 2024 Red Hat, Inc.