July 30, 2023

cExchangePattern – Docs for ESB ESB 7.x


Sets the message exchange mode in a Route.

cExchangePattern Standard properties

These properties are used to configure cExchangePattern running in the Standard Job framework.

The Standard
cExchangePattern component belongs to the Core family.

Basic settings

Exchange Patterns

Select the message exchange mode from InOnly or InOptionalOut, InOut, OutIn,
OutOptionalIn, RobustInOnly, RobustOutOnly.


Usage rule

As a middle component in a Route, cExchangePattern allows you to set the message
exchange mode.



Enabling the InOut exchange pattern to get replies

This scenario applies only to Talend Open Studio for ESB, Talend Data Services Platform and Talend Data Fabric.

In this scenario, a cExchangePattern component is
used to enable the request/reply exchange pattern in the Route, so that the client can
get a reply from the server.


To send requests to the server side, a soapUI is needed and its configuration will be
briefed in the following contents.

To build the Route, do the following.

Dropping and linking the components

  1. From the Palette, drag and
    drop a cSOAP, a cExchangePattern and a cProcessor onto the workspace, and label them WebService_producer, Set_exchange_mode and Build_reply_message respectively to better identify their
    roles in the Route.
  2. Link cSOAP to cExchangePattern using a Row > Route
  3. Link cExchangePattern to cProcessor using a Row > Route

Configuring the components

  1. Double-click cSOAP to open
    its Basic settings view in the Component tab.


  2. In the Address field, leave
    the default setting unchanged.
  3. In the Type list, select
  4. In the WSDL File field,
    enter the URL of the wsdl file. You can also click the three-dot button to
    browse for it.
  5. Click […] next to Service
    to open the service configuration wizard. The
    WSDL field has been filled in with the selected WSDL
    file. Click cExchangePattern_3.png to show the available port in the Port
    box. Select the airportSoap port and click
    Finish to close the wizard. The Service
    and Port Name fields in the
    Basic settings view are filled in


  6. In the Dataformat list,
    select PAYLOAD.
  7. Double-click cExchangePattern to open its Basic
    view in the Component tab.


  8. In the Exchange Patterns
    list, select InOut to enable the
    request/reply message exchange mode.
  9. Double-click cProcessor to
    open its Basic settings view in the
    Component tab.


  10. In the Code box, enter the
    code below.

    As shown above, a string is built here and is used as a reply
    message of the route. It is in line with the message definition of the above
    wsdl file.
  11. Press Ctrl+S to save your

Viewing code and executing the Route

  1. Click the Code tab at the bottom of the
    design workspace to check the generated code.


    As shown above, the route has its message exchange pattern set as
    InOut using the method
    In the meantime, a string is created using StringBuilder sb = new
    at cProcessor_1 and is used as the
    reply message via the method exchange.getOut().setBody(
  2. Press F6 to execute the Route.

    The server Route gets started.

Creating and sending a request to the server Route and getting a reply

  1. In the soapUI, create a Test project and edit a request, as illustrated


    Note that the wsdl file must be same as that configured for
    cSOAP, so that the request can be in line
    with the definition of the web service.
  2. Send the request to the server Route and you can get the reply, as
    illustrated below:


Document get from Talend https://help.talend.com
Thank you for watching.
Notify of
Inline Feedbacks
View all comments
Would love your thoughts, please comment.x