Created
August 13, 2017 14:29
-
-
Save Asitha/0938415a567e3c54ca72f2337e4048f8 to your computer and use it in GitHub Desktop.
Using query.param property to retrieve query parameters with WSO2 ESB. Details can be found at http://asitha.github.io/cs/programming/wso2/esb/mediators/2017/08/14/get-query-params-with-wso2-esb/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <api xmlns="http://ws.apache.org/ns/synapse" name="StoreAPI" context="/store"> | |
| <resource methods="GET" uri-template="/view*"> | |
| <inSequence> | |
| <!--Directly use in a payload factory as follows --> | |
| <payloadFactory media-type="xml"> | |
| <format> | |
| <user xmlns=""> | |
| <name>$1</name> | |
| <age>$2</age> | |
| </user> | |
| </format> | |
| <args> | |
| <arg evaluator="xml" expression="get-property('query.param.name')"/> | |
| <arg evaluator="xml" expression="get-property('query.param.age')"/> | |
| </args> | |
| </payloadFactory> | |
| <respond/> | |
| </inSequence> | |
| </resource> | |
| </api> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment