Reputation: 177
Is there any way to get resource uri-template value from MessageContext to be used in custom Handler?
For example, if the api synapse config is
...
<api xmlns="http://ws.apache.org/ns/synapse"
name="something"
context="something"
version="something"
version-type="context">
<resource methods="GET" uri-template="/?test={test2}" faultSequence="fault">
...
how can i get the '/?test={test2}
' string into my custom handler.
Upvotes: 0
Views: 349
Reputation: 3758
you could use following inside your handler
String resourceString = (String) synCtx.getProperty("API_ELECTED_RESOURCE");
where synCtx is the MessageContext
Upvotes: 1