Calling a SOAP web service
This recipe shows how a SOAP-based web service can be called from Talend. We will be using a very simple Talend web service that will return the weather conditions in a given city.
Getting ready...
Open the job
jo_cook_ch09_weatherService
and run it. You will see the output in the console, the last line of which will beweb service [endpoint: http://localhost:8090/services/cookbookWeatherService] published
.This means that the web service is now available to be called by our consumer job.
Now open the job
jo_cook_ch09_0060_consumeSOAP
.
How to do it...
Drag a
tESBConsumer
component to the canvas and open it.Change the WSDL to
http://localhost:8090/services/cookbookWeatherService?wsdl
.Tick the box for Populate schema to repository on finish. This will ensure the XML metadata schemas we need for the SOAP request and response are created in the repository for us to use later.
Click on the button to refresh the details, as highlighted in the following screenshot, and you will...