Lets see to define Environment specific URL using system variables- WSO2 API Manager and ESB
Define your endpoint as follows.
uri="http://{system.prop.env}.wso2.com" xmlns="http://ws.apache.org/ns/synapse"/>
Define your endpoint as follows.
<endpoint name="EP1" template="endPointTemplete"
uri="http://{system.prop.env}.wso2.com" xmlns="http://ws.apache.org/ns/synapse"/>
it would refer to an endpoint template named as 'endPointTemplate'. The config for it is given below
<template name="endPointTemplete" xmlns="http://ws.apache.org/ns/synapse">
<endpoint name="$name">
<address uri="$uri">
<suspendOnFailure>
<progressionFactor>1.0</progressionFactor>
</suspendOnFailure>
<markForSuspension>
<retriesBeforeSuspension>0</retriesBeforeSuspension>
<retryDelay>0</retryDelay>
</markForSuspension>
</address>
</endpoint>
</template>
Proxy service will refer the EP1 endpoint.
Environment name would be set as a param at server startup
wso2server.sh -Denv=QA
No comments:
Post a Comment