WSO2 ESB Dynamic End Point Resolution

From WSO2 ESB 4.7.0 onwards, support dynamic end point resolutions.

If you have multiple deployment environments (DEV, QA, Production), then you may end up having many endpoints and will have to change them once you migrate your synapse configs to other environment. As a simple solution for this time consuming problem (for Call out mediator and send mediator only), you can initialize end points as jvm parameters at the server start up.

Ex:

  1. SEND Mediator

    <send>
                <endpoint name="MyEp"
                          template="endPointTemplete"
                          uri="http://{system.prop.bpm.stock.host}:{system.prop.bpm.stock.port}/services/SimpleStockQuoteService"/>
             </send>

    You have to create a endpoint template in order to use this feature for send mediator. When you start the ESB, you can initialize the {system.prop.bpm.stock.host} and {system.prop.bpm.stock.port} by using JVM parameters as follows. And then those end points will be initialized correctly.

    -Dbpm.stock.host=.............    - Dbpm.stock.port=..................

  2. CALLOUT Mediator
Callout mediator will be same as send mediator. you can initialize the parameters with jvm parameters

   <callout serviceURL="http://{system.prop.bpm.stock.host}:{system.prop.bpm.stock.port}/services/SimpleStockQuoteService"
                  action="urn:getQuote">
            <source xmlns:s12="http://www.w3.org/2003/05/soap-envelope"
                    xmlns:s11="http://schemas.xmlsoap.org/soap/envelope/"
                    xpath="s11:Body/child::*[fn:position()=1] | s12:Body/child::*[fn:position()=1]"/>
            <target xmlns:s12="http://www.w3.org/2003/05/soap-envelope"
                    xmlns:s11="http://schemas.xmlsoap.org/soap/envelope/"
                    xpath="s11:Body/child::*[fn:position()=1] | s12:Body/child::*[fn:position()=1]"/>
         </callout>



Comments

Popular posts from this blog

Getting started with WSO2 Device Cloud APIs

WSO2 ESB Removing full soap header using enrich mediator.

Running a Standalone WSO2 IoT Server.