In my previous blog I covered how to create SOAP web-service https://echarish.wordpress.com/2017/03/09/make-soap-with-mule-runtime/ , 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
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
than select the wsdl file in the web service consumer configuration definition.
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.
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.
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.
I have created a video tutorial for the above you can watch it here