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?
HermannSW 2700006U545227 Posts
Re: Limit request methods2010-06-30T22:38:11ZThis is the accepted answer. This is the accepted answer.Write 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> ...Updated on 2014-03-25T03:42:48Z at 2014-03-25T03:42:48Z by iron-man
nsousa 270003C79022 Posts
Re: Limit request methods2013-03-07T12:16:32ZThis is the accepted answer. This is the accepted answer.
- HermannSW 2700006U54
Thanks for the help, it works just fine!
I just have to set test="/*/*/*", because it just don't do the match because of the namespace used.
Once again, thanks a lot!