Legacy Modernization
home
Illustrates how to automate communication between a legacy system and a web service that accepts HTTP requests. Mule "front-ends" the legacy system – which only accepts input via a file – so as to prepare data from an HTTP Web service to a format that the legacy system accepts. To demonstrate these capabilities, this example adopts the use case of a legacy fulfillment system which must adapt to accept orders via HTTP request. You can think of this example as an application that acts as a Web service proxy for a legacy, file-based system.
An older, legacy system may be limited in the form of data that it accepts. For example, an older system may only accept input as a file or via FTP. To update such a system so that it accepts more modern input formats, such as Web service calls, Mule can sit in front of a legacy system, converting HTTP requests, for example, to strings. This conversion activity effectively "modernizes" the legacy system so that it accepts HTTP requests.
Example
This example demonstrates legacy system modernization within the context of a simple use case.
An organization uses an old fulfillment system which only accepts orders in flat file format. However, the company wants to begin accepting orders via a SOAP web service and automatically submitting the orders to the legacy system for fulfillment. To process orders, the company uses Mule to convert HTTP requests into a file format that the legacy system accepts.
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 this use case-based template to create your own customized applications in Mule.
Skip ahead to the next section if you prefer to simply examine this example code snippets.
- Create, then run the Legacy Modernization example application in Anypoint Studio.
- 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 to simulate the submission of a new order in this example's use case. If you haven't already done so, download and launch soapUI.
- In soapUI, select File > Import Project. Browse to the AnypointStudio folder on your local drive to locate the sample soapUI project file: AnypointStudio > workspace > Legacy Modernization > src > main > resources > LegacyModernizationExample-soapui-project.xml. Click Open.
- In the new LegacyModernizationExample project in soapUI, expand the folders to reveal Request 1. Double-click Request 1 to open the request-response window.
- 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).
- Review the contents of the SOAP response, to examine the details of your processed request. Note, in particular, the orderReceivedStatus with the value "true".
- In the Package Explorer in Studio, navigate to
src/main/resources/Output
, then hit F5 to refresh the contents of the Output folder. The order you submitted via soapUI appears as a new ShippingOrder flat file; note the date and time stamp of the new order (see below). Double-click the flat file to open it in Studio and examine the contents.
Documentation
Read full documentation in GitHub
Examples to Try Next
If you understood this example | |
---|---|
Sending JSON to a JMS Queue - Learn how to connect to JMS Queues and Topics. | View |
If you struggled with this example | |
---|---|
Web Service Consumer - Learn how to consume an existing Web service. | View |