XML Only SOAP Web Service icon

XML Only SOAP Web Service

(0 reviews)

home

This application illustrates how you can use Mule to expose a SOAP Web service.


Screenshot of the main flow in Anypoint Studio, view full image here

Description

This application illustrates how you can use Mule to expose a SOAP Web service. In particular, it illustrates how a Mule application can accept SOAP requests, then orchestrate several Web services to meets the needs of a particular business process. Further, this example performs all of these actions using only XML – no Java. To demonstrate these capabilities, this example is based on the use case of patient admission into a hospital.

Example Use Case

This example demonstrates service orchestration and content-based routing within the context of a simple use case: in order to facilitate patient pre-admission into a hospital, the hospital has exposed a SOAP Web service called AdmissionService. Using this Web service, a patient's family doctor can perform two tasks:

  • For a new patient, she can create a new patient record (EHR) and episode on an EHR to initiate a patient's admission into the hospital.
  • For an existing patient, she can locate an existing EHR and create a new Episode.

EHR (Electronic Health Record) is the electronic patient record that tracks and updates all patient data, such as name, patient ID, billing address, etc.
An Episode is the occurrence of an event related to a specific patient. For example, a patient's pre-admission into a hospital counts as an "episode" on the EHR."

For example, if a family doctor wishes to schedule a surgical procedure for an existing patient at the hospital, she uses her desktop software to record all the relevant data for the existing patient's upcoming surgery. The software then submits a SOAP request to the hospital's AdmissionService, which processes the request – task 2 above – locating the existing EHR for the patient then scheduling the surgical procedure.

Set Up and run the Example

Complete the following procedure to create, then run this example in your own instance of Anypoint Studio. You can create template applications straight out of the box in Anypoint Studio and tweak the configurations of the use case-based templates to create your own customized applications in Mule.

  1. Create, then run the example application in Anypoint Studio.

  2. To simulate a request submission to the Mule application, use the soapUI interface available for free download at www.soapui.org. This tool enables you to submit a request as though you were a family doctor in this example's use case. If you haven't already done so, download and launch soapUI.

  3. In soapUI, select File > Import Project. Browse to the AnypointStudio folder on your local drive to locate the sample request file: AnypointStudio > workspace > XML-only SOAP Web Service > src > main > resources > Hospital-Admission-Example-soapui-project.xml. Click Open.

  4. In the new Hospital Admission Example project in soapUI, expand the folders to reveal Request 3. Double-click Request 3 to open the request-response window.

  5. Click the submit request icon (green "play" button at upper left) to submit the request to the Mule application (see below, left). soapUI displays the response from the Mule application in the response pane (see below, right).

  6. Review the contents of the SOAP response, to examine the details of your processed request. Note the response contains information about the patient's new episode and details about billing.

Documentation

Read full documentation in GitHub


Reviews

TypeExample
OrganizationMuleSoft
Published by
MuleSoft Organization
Published onJun 22, 2017
Asset overview

Asset versions for 1.1.x

Asset versions
VersionActions
1.1.0

Tags