Skip to content

Switching from UDP to HTTP/S

This example demonstrates how WSO2 Micro Integrator receives SOAP messages over UDP and forwards them over HTTP.

Synapse configuration

Following are the integration artifacts (proxy service) 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="StockQuoteProxy" startOnLoad="true" transports="udp" xmlns="">
            <log level="full"/>
            <property name="OUT_ONLY" value="true"/>
                    <address uri="http://localhost:9000/services/SimpleStockQuoteService"/>
    <publishWSDL key="conf:UDP_WSDL/sample_proxy_1.wsdl" preservePolicy="true"/>
    <parameter name="transport.udp.port">9999</parameter>
    <parameter name="transport.udp.contentType">text/xml</parameter>

Build and Run

Create the artifacts:

  1. Set up WSO2 Integration Studio.
  2. Create an ESB Solution project.
  3. Add sample_proxy_1.wsdl as a registry resource (change the registry path of the proxy accordingly).
  4. Create the proxy service with the configurations given above.
  5. Deploy the artifacts in your Micro Integrator.

Set up the back-end service:

  • Download the stockquote_service.jar

  • Run the mock service using the following command

    java -jar stockquote_service.jar

Enable the UDP transport and start the Micro-Integrator.

Send the following message via UDP to the UDP listener port (9999).

<soapenv:Envelope xmlns:soapenv="">
    <soapenv:Header xmlns:wsa="">
        <m0:placeOrder xmlns:m0="http://services.samples">
In linux, we can save the above request in a request.xml file and use netcat to send the UDP request.

nc -u localhost 9999 < request.xml