Upload
jitendra-bafna
View
69
Download
6
Embed Size (px)
Citation preview
How To Consume SOAP Based Web
Service With MuleSoft Anypoint Studio
Consume SOAP Web Service
CXF is a Java web services framework used for SOAP (Simple Object Access Protocol)
messaging. It handles all serialization and deserialization as well as SOAP envelope and
namespace processing.
Consume SOAP Web Service
Place a HTTP listener to the source section of the flow and configure it as shown below in
snapshot.
Consume SOAP Web Service
Now place the Web Service Consumer components to the message processor in flow and
configure the components. Click on the Add Connector Configuration and it will open another
window. You can provide your WSDL Location (it can web service url or any physical WSDL
location) and click on Reload WSDL. So it will automatically fill the Service, Port and Address for
you. Press OK.
Consume SOAP Web Service
Now, you need to select one Operation that you need to perform on Web Service. In my case I
will use findFlights. This operation is expecting one argument that is destination.
Consume SOAP Web Service
We are expecting the destination as a query parameter in input request via HTTP listener and will
store query parameter in flow variable.
Consume SOAP Web Service
Place TransformMessage between FlowVariable and Web Service Consumer and you can see
that output metadata in DataWeave generated automatically and input data with flow variable
we have defined in previous steps. So we will map destination from FlowVariable to destination
argument required by Web Service.
Consume SOAP Web Service
Now we will place the one more TransformMessage after Web Service Consumer to map XML
result from Web Service to Json format. So you can see input metadata in DataWeave is
generated automatically and you can define output metadata as per your requirements and
perform mapping.
Testing The Application
You can use Postman to test the application. First deploy the application with Anypoint Studio.
Now we will use http GET method in Postman to send request to HTTP listening on url
http://localhost:8081/soap?destination=CLE.
Thank You