Upgrade to Pro — share decks privately, control downloads, hide ads and more …

How To Consume RESTful Web Service With MuleSof...

How To Consume RESTful Web Service With MuleSoft Anypoint Studio

How To Consume RESTful Web Service With MuleSoft Anypoint Studio

Jitendra Bafna

May 25, 2017
Tweet

More Decks by Jitendra Bafna

Other Decks in Technology

Transcript

  1. 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.
  2. Consume SOAP Web Service Place a HTTP listener to the

    source section of the flow and configure it as shown below in snapshot.
  3. 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.
  4. 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.
  5. 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.
  6. 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.
  7. 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.
  8. 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.