Property Transformer in Mule | Read Key-Value Pair in Mule

Property Transformer in Mule | Read Key-Value Pair in Mule

Use a property transformer to set, remove, or copy properties on the outbound scope of a message. This transformer transforms only outbound properties. Note that you cannot manipulate inbound scope properties, as those are automatically generated by the message source. 

Property Transformer is used to store key-value pair in Mule.

flow of Property Transformer :

Property Transformer configuration :

URL : http://localhost:8085/api/property
Method : GET

Output :

XML project code : 

<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns:context="" xmlns:http="" xmlns="" xmlns:doc=""
    <http:listener-config name="HTTP_Listener_Configuration" host="" port="8085" basePath="/api" doc:name="HTTP Listener Configuration"/>
    <context:property-placeholder location=""/>
    <flow name="test_propertytransformerFlow">
        <http:listener config-ref="HTTP_Listener_Configuration" path="/property" doc:name="HTTP"/>
        <set-property propertyName="name" value="Himanshu" doc:name="Property"/>
        <set-payload value="#[]" doc:name="Set Payload"/>