Using the Address Endpoint

This sample demonstrates how you can convert a POX message to a SOAP request using an Address endpoint.

Synapse configuration

Following is a sample REST API configuration that we can used to implement this scenario. See the instructions on how to build and run this example.

<?xml version="1.0" encoding="UTF-8"?>
 <proxy name="SimpleStockQuoteProxy" startOnLoad="true" transports="http https" xmlns="">
             <!-- filtering of messages with XPath and regex matches -->
             <filter regex=".*StockQuote.*" source="get-property('To')">
                     <header name="Action" scope="default" value="urn:getQuote"/>
                             <address format="soap11" uri="http://localhost:9000/services/SimpleStockQuoteService"/>

Build and run

Create the artifacts:

  1. Set up WSO2 Integration Studio.
  2. Create an integration project with an ESB Configs module and an Composite Exporter.
  3. Create a proxy service with the configurations given above.
  4. Deploy the artifacts in your Micro Integrator.

Set up the back-end service:

  1. Download the back-end service.
  2. Extract the downloaded zip file.
  3. Open a terminal, navigate to the axis2Server/bin/ directory inside the extracted folder.
  4. Execute the following command to start the axis2server with the SimpleStockQuote back-end service:


Send the following request:

POST /services/SimpleStockQuoteProxy/StockQuote HTTP/1.1
Content-Type: application/xml; charset=UTF-8;action="urn:getQuote";
SOAPAction: urn:getQuote
User-Agent: Axis2
Transfer-Encoding: chunked

<m0:getQuote xmlns:m0="http://services.samples" xmlns:xsd="http://services.samples/xsd">

This HTTP REST request will be transformed into a SOAP request and forwarded to the stock quote service.