Web Service Consumer

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.

  1. Create the New Mule project in Anypoint studio.
  1. Provide the input in xml format for web service’s operation to get  triggered. 
  1. Configure web service consumer connector. 
  1. When you execute the application the following result will be populated.

Input for web service is:

Response from web service is:

  1. Now we are supposed to store this response in the local file system as a report. So the following transformation is applied on payload:
  1. Convert payload to csv.
  1. 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: 

We use cookies on this site to enhance your user experience. For a complete overview of how we use cookies, please see our privacy policy.