I am trying to get the HTTP status code from a backend server in a WS-Proxy.
For example: My WS-Proxy policy ran and now got to the backend server which returned an error (for example 500 service unavailable)
I cannot see the HTTP status code (i.e 500) in any dp variable or any header whatsoever.
Is there any way to get that status code of the result from the backend server?
Thanks in advance,
This topic has been locked.
3 replies Latest Post - 2013-01-22T15:41:13Z by swlinn
Pinned topic Getting the HTTPS Status Code from WS-Proxy
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2013-01-22T15:41:13Z at 2013-01-22T15:41:13Z by swlinn
HermannSW 2700006U544149 PostsACCEPTED ANSWER
Re: Getting the HTTPS Status Code from WS-Proxy2013-01-19T15:45:12Z in response to SystemAdminFrom dp:response-header() In Infocenter:
... The x-dp-response-code special code is a protocol response code that is returned to the DataPower® server. This special code is not a field that is included in the response header. This special code contains the protocol-specific response code. ...
Hermann <myXsltBlog/> <myXsltTweets/>Updated on 2014-03-25T02:41:42Z at 2014-03-25T02:41:42Z by iron-man
SystemAdmin 110000D4XK6772 PostsACCEPTED ANSWER
Re: Getting the HTTPS Status Code from WS-Proxy2013-01-20T18:53:02Z in response to SystemAdminThanks, I have tried this one but it didn't get me anything the variable was empty.
Eventually I used this, which gives me more info but also the http status code:
<xsl:variable name="http_status" select="dp:variable('var://service/error-headers')" />
swlinn 100000E7QE1344 PostsACCEPTED ANSWER
Re: Getting the HTTPS Status Code from WS-Proxy2013-01-22T15:41:13Z in response to SystemAdminx-dp-response-code is only available in the request and response rules. If you are in an error rule, then the service variables would provide you a "500 Internal Server Error" or something to that effect. I'm assuming you are doing your processing in an error rule.