Configuring the components - 6.5

Internet - Mediation

author
Talend Documentation Team
EnrichVersion
6.5
EnrichProdName
Talend Data Fabric
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for ESB
Talend Real-Time Big Data Platform
task
Data Governance > Third-party systems > Internet components (Mediation)
Data Quality and Preparation > Third-party systems > Internet components (Mediation)
Design and Development > Third-party systems > Internet components (Mediation)
EnrichPlatform
Talend Studio

Procedure

  1. Double-click cMessagingEndpoint to open its Basic settings view in the Component tab.
  2. In the URI field, enter timer:go?repeatCount=1 to define a timer for starting message exchanges. In this example, only one message exchange will be carried out due to the setting of repeatCount=1.
  3. Double-click cSetBody to open its Basic settings view in the Component tab.
  4. In the Language field, select Constant.
  5. In the Expression field, enter the following as the body of the request message:
    <soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:weat=\"http://ws.cdyne.com
    /WeatherWS/\"><soapenv:Header/><soapenv:Body><weat:GetWeatherDefinitionInformation/></soapenv:Body></soapenv:Envelope>
  6. Double-click cHttp to open its Basic settings view in the Component tab.
  7. In the Uri field, enter the location of the file to fetch, http://wsf.cdyne.com/WeatherWS/Weather.asmx in this example.
  8. Click the Client radio button to use this cHttp component as a client.
  9. Select POST in the Method list and then the Use Message Body radio button. Select text/xml in the Content-Type list.
  10. Click Advanced settings for further setup.
  11. Click the [+] button to add a line in the Headers table.
    Type in SOAPAction and http://ws.cdyne.com/WeatherWS/GetWeatherInformation for the Key and Value fields.
  12. Double-click cProcessor to open its Basic settings view in the Component tab.
  13. In the Code area, enter the following to print the response from the remote website, the body of the desired file:
    System.out.println("--------------------RESPONSE--------------------");
    System.out.println(exchange.getIn().getBody(String.class));
    System.out.println("--------------------END--------------------");
  14. Press Ctrl+S to save your Route.