Sending a message without expecting a response - Cloud - 8.0

ESB SOAP

Version
Cloud
8.0
Language
English
Product
Talend Big Data
Talend Big Data Platform
Talend Data Fabric
Talend Data Integration
Talend Data Management Platform
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Real-Time Big Data Platform
Module
Talend Studio
Content
Data Governance > Third-party systems > ESB components > ESB SOAP components
Data Quality and Preparation > Third-party systems > ESB components > ESB SOAP components
Design and Development > Third-party systems > ESB components > ESB SOAP components
Last publication date
2024-02-20

This scenario applies only to Talend ESB, Talend Data Services Platform, Talend MDM Platform, Talend Real-Time Big Data Platform, and Talend Data Fabric.

For more technologies supported by Talend, see Talend components.

In this scenario, a provider Job and a consumer Job are needed. The Jobs, which are built upon the components under the ESB/Web Services family, act as the implementations of web services defined in the Services node of the Repository.

  • On the Repository tree view, right-click the Services node and from the contextual menu, select Create Service.
  • In the pop-up wizard, enter ServiceRequest in the Name field and click Next.
  • Select the Create new WSDL option.
  • Click Finish to validate this creation. The service opens in the design workspace.
  • Right-click the port ServiceRequestPort in the WSDL skeleton and select Show properties. In the Address field, specify the address where you want the service to be published, for example, http://127.0.0.1.8088/esb/provider.
  • Click the portType ServiceRequestPortType in the WSDL skeleton. Change its name to TEST_ProviderJobSoapBinding.
  • Click the operation ServiceRequestOperation in the WSDL skeleton. Change its name to invoke(anyType):anyType.
  • Save the WSDL file.The newly defined Web service displays under the Services node of the Repository view.
  • Under the Services node, right-click ServiceRequest 0.1 and select Import WSDL Schemas.This option imports the WSDL metadata from the service into the Repository, under the Metadata > File XML, which allows you to share the operation details across services and other components.

The provider Job consists of a tESBProviderRequest, a tXMLMap, and two tLogRow components.

  • Drop the following components from the Palette onto the design workspace: a tESBProviderRequest, a tXMLMap, and two tLogRow.

  • Double-click tESBProviderRequest_1 in the design workspace to display its Component view and set its Basic settings.

  • Select Repository from the Property Type list and click the [...] button to choose the service, to the granularity of port name and operation.

  • Click OK.

  • Click the [...] button next to Edit schema to view the schema of tESBProviderRequest_1.

  • Click OK.

  • Connect tESBProviderRequest_1 to tLogRow_1.

  • Double-click tLogRow_1 in the design workspace to display its Component view and set its Basic settings.

  • Click the [...] button next to Edit schema. and define the schema as follow.

  • Connect tLogRow_1 to tXMLMap_1.

  • Connect tXMLMap_1 to tLogRow_2 and name this row as payload.

  • In the design workspace, double-click tXMLMap_1 to open the Map Editor.

  • On the lower right part of the map editor, click the plus button to add one row to the payload table and name this row as payload.

  • In the Type column of this payload row, select Document as the data type. The corresponding XML root is added automatically to the top table on the right side which represents the output flow.

  • In the payload table, right-click root to open the contextual menu.

  • From the contextual menu, select Create Sub-Element and type in response in the popup dialog box.

  • Right-click the response node and select As loop element from the contextual menu.

  • Repeat this operation to create a sub-element request of the root node in the input table and set the request node as loop element.

  • Click the request node in the input table and drop it to the Expression column in the row of the response node in the output table.

  • Click OK to validate the mapping and close the map editor.

  • Double-click tLogRow_2 in the design workspace to display its Component view and set its Basic settings.

  • Click the [...] button next to Edit Schema and define the schema as follow.

  • Save the Job.

The consumer Job consists of a tFixedFlowInput, a tXMLMap, a tESBConsumer, and two tLogRow components.

  • Drop the following components from the Palette onto the design workspace: a tFixedFlowInput, a tXMLMap, a tESBConsumer, and two tLogRow.

  • Double-click tFixedFlowInput_1 in the design workspace to display its Component view and set its Basic settings.

  • Edit the schema of the tFixedFlowInput_1 component.

  • Click the plus button to add a new line of string type and name it payloadString.

  • Click OK.

  • In the Number of rows field, set the number of rows as 1.

  • In the Mode area, select Use Single Table and input world in quotations into the Value field.

  • Connect tFixedFlowInput_1 to tXMLMap_1.

  • Connect tXMLMap_1 to tESBConsumer_1 and name this row as payload.

  • In the design workspace, double-click tXMLMap_1 to open the Map Editor.

  • In the output table, right-click the root node to open the contextual menu.

  • From the contextual menu, select Create Sub-Element and type in request in the popup dialog box.

  • Right-click the request node and select As loop element from the contextual menu.

  • Click the payloadstring node in the input table and drop it to the Expression column in the row of the request node in the output table.

  • Click OK to validate the mapping and close the Map Editor.

  • Start the Provider Job. In the executing log you can see:

    ...
    web service [endpoint: http://127.0.0.1:8088/esb/provider] published
    ...
  • In the tESBConsumer_1 Component view, set its Basic settings.

  • Click the [...] button next to the Service Configuration to open the editor.

  • In the WSDL field, type in: http://127.0.0.1:8088/esb/provider?WSDL.

  • Click the Refresh button to retrieve port name and operation name.

  • Click OK.

  • In the Basic settings of the tESBConsumer, set the Input Schema as follow:

  • Set the Response Schema as follow:

  • Set the Fault Schema as follow:

  • Connect tESBConsumer_1 to tLogRow_1 and tLogRow_2.

  • In the design workspace, double-click the tLogRow_1 component to display its Component view and set its Basic settings.

  • Click the [...] button next to Edit Schema and define the schema as follow:

  • In the Job Design, double-click tLogRow_2 to display its Component view and set its Basic settings.

  • Click the [...] button next to Edit Schema and define the schema as follow.

  • Save the Job.

  • Run the provider Job. In the execution log you will see:

    INFO: Setting the server's publish address to be http://127.0.0.1:8088/esb/provider

    2011-04-21 14:14:36.793:INFO::jetty-7.2.2.v20101205

    2011-04-21 14:14:37.856:INFO::Started

    SelectChannelConnector@127.0.0.1:8088

    web service [endpoint: http://127.0.0.1:8088/esb/provider] published

  • Run the consumer Job. In the execution log of the Job you will see:

    Starting job CallProvider at 14:15 21/04/2011.
    
    [statistics] connecting to socket on port 3942
    [statistics] connected
    TEST_ESBProvider2
    TEST_ESBProvider2SoapBingding
    |
    [tLogRow_2] payloadString: <request>world</request>
    {http://talend.org/esb/service/job}TEST_ESBProvider2
    {http://talend.org/esb/service/job}TEST_ESBProvider2SoapBinding
    invoke
    [tLogRow_1] payload: null
    [statistics] disconnected
    Job CallProvider2 ended at 14:16 21/04/2011. [exit code=0]
  • In the provider's log you will see the trace log:

    web service [endpoint: http://127.0.0.1:8088/esb/provider]
    published
    [tLogRow_1] payload: <?xml version="1.0" encoding="UTF-8"?>
    <request>world</request>
    ### world
    [tLogRow_2] content: world
    [tLogRow_3] payload: <?xml version="1.0" encoding="UTF-8"?>
    <response xmlns="http://talend.org/esb/service/job">Hello, world!</response>
    web service [endpoint: http://127.0.0.1:8088/esb/provider] unpublished
    [statistics] disconnected
    Job ESBProvider2 ended at 14:16 21/04/2011. [exit code=0]