Author: Nisha Kshirsagar
In MuleSoft when there is a requirement to consume a SOAP Web service to acquire data from an external source, then you can use the Web Service Consumer.
This connector uses the information contained in a service’s WSDL, and allows you to configure a few details to establish the connection you need to consume a service from within your Mule application.
Use Case Description: This blog covers the Web service Consumer Demo using MuleSoft. Here we are consuming a web service using a web service consumer connector. The response will be given by web service. We are generating a report based on that response and storing this report in the local file system.
- Create the New Mule project in Anypoint studio.

- Provide the input in xml format for web service’s operation to get triggered.Â

- Configure web service consumer connector.

- When you execute the application the following result will be populated.
Input for web service is:

Response from web service is:

- Now we are supposed to store this response in the local file system as a report. So the following transformation is applied on payload:

- Convert payload to csv.

- Write it in the local file system using a file write connector. When file is written successfully then open it, it will look like below:Â
