I have created a rest service as:
<api xmlns="http://ws.apache.org/ns/synapse" name="GetCacheDataAPI" context="/GetCacheData/GetNotifications">
<resource methods="GET" uri-template="?ID={searchValue}" inSequence="GetNotificationsIN" outSequence="GetNotificationsOUT"/>
</api>
in my InSequence GetNotificationsIN my payload is :
<payloadFactory>
<format>
<p:Cache xmlns:p="http://tempuri/Notification/">
<in xmlns="">
<xs:ID xmlns:xs="http://tempuri/Notification/">$1</xs:ID>
<xs:TagName xmlns:xs="http://tempuri/Notification/">$2</xs:TagName>
<xs:Category xmlns:xs="http://tempuri/Notification/">$3</xs:Category>
<xs:State xmlns:xs="http://tempuri/Notification/">$4</xs:State>
<xs:SourceID xmlns:xs="http://tempuri/Notification/">$5</xs:SourceID>
</in>
</p:Cache>
</format>
<args>
<arg expression="get-property('uri.var.searchValue')"/>
<arg expression="get-property('uri.var.searchValue')"/>
<arg expression="get-property('uri.var.searchValue')"/>
<arg expression="get-property('uri.var.searchValue')"/>
<arg expression="get-property('uri.var.searchValue')"/>
</args>
</payloadFactory>
Now here i have passed a single parameter i.e. ID and is working fine. But the actual service on which i have implemented the rest service accepts five parameters which are ID, Tag, Source, State and Category. In the actual service i can pass any one parameter i.e. ID, Tag, Source, State or Priority and the service gives me data based on the parameter passed.
Simillarly i want to do exactly the same in my rest service i.e. in the uri template i want to implement these five parameter thus making five uri template variable which are saperated by a logical or so that if i hit the url of rest service with any uri template it should give me the response from the actual service. How can i do this? Thanks in advance