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

Chapter 3. Viewing and editing Rest DSL components


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

Red Hat 소개

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

© 2024 Red Hat, Inc.