Skip to main content Skip to complementary content

Configuring the components

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.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!