Skip to content

REST-to-SOAP Service Mediation

Overview

This sample demonstrates how to use Neuron to provide service mediation between a RESTful client and a SOAP Web Service. The sample contains a SOAP Web Service and two clients – a RESTful client and a SOAP-based client. Both clients are able to route their service calls through Neuron to the same SOAP-based Web Service.

The ESB Configuration contains a Process named REST to SOAP that implements a pattern for routing REST requests based on the HTTP method (GET, POST, etc). This process routes POST requests to the appropriate SOAP Web services. The process then sets the message Action property appropriately and transforms the REST request into the correct SOAP request format. The message is published to the bus and the response is transformed into the correct format for the REST response.

Running the Sample

Open the Sample

To open this sample, see the topic Using the Neuron Samples and select the REST Client to SOAP Service sample.

Setup Instructions

Before running this sample, follow these instructions:

  1. In the Visual Studio project that opens, build the entire solution.
Note: This sample does not use the MessageData database. Any errors that occur in the Neuron Event Log relating to the MessageData database should not affect the running of the sample.

Run Instructions

Start the SOAP Service

  1. In Visual Studio, press F5 to start the CustomerSOAPService project.

SOAP-to-SOAP Service Call

  1. Start the CustomerSOAPClient project from Samples\Services\RESTServices\RESTtoSOAP\CustomerSOAPClient\bin\Debug\CustomerSOAPClient.exe
  1. In the CustomerSOAPClient console window, press Enter to start sending messages to Neuron.
  2. As the sample runs, the client sends a message to the service and displays the response.
  1. When the client completes, press <ENTER> in the client console to close the application.

REST-to-SOAP Service Call

  1. Start the CustomerRESTClient project from Samples\Services\RESTServices\RESTtoSOAP CustomerRESTClient\bin\Debug\CustomerRESTClient.exe
  2. In the CustomerRESTClient console window, press Enter to start sending messages to Neuron.
  3. As the sample runs, the client sends a message to the service and displays the response.
  1. When the client completes, press <ENTER> in both the client and service consoles to close the applications.
Was this article helpful?
Dislike 0
Previous: SOAP-to-REST Service Mediation
Next: REST-to-REST Service Routing