Skip to content

SOAP-to-REST Service Mediation

Overview

This sample demonstrates how to use Neuron to provide service mediation between a SOAP-based client and a RESTful service. The sample contains a REST 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 REST-based Web Service.

The ESB Configuration contains a Process named SOAP to REST that implements a pattern for converting SOAP requests to the appropriate REST requests. This process routes requests based on the SOAP Action and sets the message property MessageProperty_HttpRequest.Method to the appropriate method. The process then transforms the SOAP request into the REST request. The message is published to the bus and the response is transformed into the correct format for the SOAP response.

Running the Sample

Open the Sample

To open this sample, see the topic Using the Neuron Samples and select the SOAP Client to REST 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 REST Service

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

REST-to-REST Service Call

  1. Start the CustomerRESTClient project from Samples\Services\RESTServices\SOAPtoREST\CustomerRESTClient\bin\Debug\CustomerRESTClient.exe
  2. In the CustomerRESTClient console window, press Enter to start sending messages to Neuron.
  1. 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.

SOAP-to-REST Service Call

  1. Start the CustomerSOAPClient project from Samples\Services\RESTServices\SOAPtoREST\CustomerSOAPClient\bin\Debug\CustomerSOAPClient.exe
  2. In the CustomerSOAPClient console window, press Enter to start sending messages to Neuron.
  1. 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: Exposing an Adapter via RESTful Services
Next: REST-to-SOAP Service Mediation