Reputation: 37
I am trying to get the value through URI params in mule. I am using
`#[message.inboundProperties.'http.uri.params'.Id]`
to get the value. When I pass a value, (for eg 16) it is returning as Id=16
. Since I am passing this value into a database stored procedure, I need the value alone. Could anyone help me out in this.
Upvotes: 0
Views: 11781
Reputation: 1
Using
#[message.inboundProperties.'http.uri.params'[0]['Id']
will retrieve only the value of the id. This will surely work.
Upvotes: 0
Reputation: 289
What about storing "id=16" as a string variable and splitting it on the =?
Upvotes: 0
Reputation: 2039
This works for me in Mule 3.7.3:
<http:listener-config name="listener2" host="0.0.0.0" port="8083"/>
<flow name="uri">
<http:listener path="uri/{param}/resource" config-ref="listener2" />
<expression-transformer expression="#[message.inboundProperties.'http.uri.params'.param]" />
</flow>
Running curl http://127.0.0.1:8083/uri/value/resource
returns value
which is the expected according to the documentation.
Upvotes: 3