I have a webservice that, till now, can invoke several methods in the request. For example, getName, getAddress, etc. But know I wan't to just authorize one method to be requested by that service.
Where I have <getName>, a can have getAddress or other method. Which is the best way to set the Datapower to just authorize getName method to be in the request message.
I've tried use filter action in my policy, but i'm not having much luck.
Can anyone give me some guidance?
This topic has been locked.
2 replies Latest Post - 2013-03-07T12:16:32Z by nsousa
Pinned topic Limit request methods
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2013-03-07T12:16:32Z at 2013-03-07T12:16:32Z by nsousa
HermannSW 2700006U542744 PostsACCEPTED ANSWER
Re: Limit request methods2010-06-30T22:38:11Z in response to cesceWrite a stylesheet which you will use in a filter action.
Use <dp:accept/> and <dp:reject>reason text</dp:reject>, see the example under "accept" in Extension Functions catalog.
It could look like:
... <xsl:choose> ... <xsl:when test= "/*/*/getName"> <dp:accept/> </xsl:when> ... other accepts ... <xsl:otherwise> <dp:reject>not an allowed request method</dp:reject> </xsl:otherwise> </xsl:choose> ...
nsousa 270003C79022 Posts