Below is a sample
proxy service to use dynamic alias names inside wso2:vault-lookup.
<?xml version="1.0" encoding="UTF-8"?> <proxy xmlns="http://ws.apache.org/ns/synapse" name="UsingDynamicAlias" startOnLoad="true" statistics="disable" trace="disable" transports="https,http"> <target> <inSequence> <log level="custom"> <property name="STATUS" value="------------------UsingDynamicAlias Proxy Invoked-----------------"/> </log> <property name="alias_name" value="testAlias"/> <log> <property expression="wso2:vault-lookup(get-property('alias_name'))" name="secured_password"/> </log> </inSequence> </target> <description/> </proxy>
The Result Log:
[2017-01-13 21:50:27,121] INFO - ProxyService Successfully created the Axis2 service for Proxy service : UsingDynamicAlias [2017-01-13 21:52:13,071] INFO - LogMediator STATUS = ------------------UsingDynamicAlias Proxy Invoked----------------- [2017-01-13 21:52:13,106] INFO - DependencyTracker Local entry : conf:/repository/components/secure-vault was added to the Synapse configuration successfully [2017-01-13 21:52:13,109] INFO - LogMediator To: /services/UsingDynamicAlias.UsingDynamicAliasHttpSoap11Endpoint, WSAction: urn:mediate, SOAPAction: urn:mediate, MessageID: urn:uuid:989b03ef-55e1-49ff-9942-1dab202edfe5, Direction: request, secured_password = ajanpassword
No comments:
Post a Comment