In my previous blog I covered how to create SOAP web-service , in the blog I showed how mule runtime uses CXF component to expose code first soap web-service.

You can watch the video tutorial of previous blog below.

In this blog I will show how to consume SOAP service using mule SOAP web service consumer Screen Shot 2017-03-09 at 21.14.42

Web Service Consumer

This message processor in Mule uses wsdl to create and discover SOAP service. You have two ways to define wsdl of your web-service. Give the URI of wsdl or add the wsdl file to your project class path to the src/main/wsdl folder

Screen Shot 2017-03-09 at 18.06.45

than select the wsdl file in the web service consumer configuration definition.

Screen Shot 2017-03-09 at 17.44.00

With the wsdl file location or URI, the component will auto discover the Service, Port and Address of your web-service. In the next step we need to select the web-service operation in the consumer setting.

Screen Shot 2017-03-09 at 17.44.20

After setting the web service consumer, let’s place it in the flow so that we can call it using postman, we will also drag and drop dataweave message processors to set the input arguments for the web service consumer.

Screen Shot 2017-03-09 at 17.44.38

Once we are done with setting the flow and consumer setting only thing remains is to test it, I will be using postman to test the flow and see if web-service is being properly called.

Screen Shot 2017-03-09 at 21.31.51


I have created a video tutorial for the above you can watch it here