on 04-27-2015 10:41 AM
Hi,
The scenario we are designing includes making a webservice call to an external (non SAP) webservice using SOAMANAGER and service consumer.
On triggering a webservice request, the service providing system will send across a HTTP 400 response with the error message in the HTTP payload back to SAP (if it failes validation at their end ).
My question is, will my calling ABAP program be able to read this HTTP error payload. From what i know the exception raised will be of class type "cx_ai_system_fault" along with a short text "HTTP Code 400 : Bad Request". But will the program be able to access the actual HTTP payload containing the message sent across by the web service providing system
Thanks in Advance,
Alan
Hi Dsilva,
The constructor for CX_AI_SYSTEM_FAULT only lists TEXTID, PREVIOUS, CODECONTEXT, CODE, ERRORTEXT and LANGUAGE as its parameters. I think there is no way for you to display the actual payload. In contrast, using IF_HTTP_CLIENT you can display the HTTP Body by
IF_HTTP_CLIENT->RESPONSE->GET_CDATA( ).
Regards,
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the reply Mark.
The actual HTTP 400 Payload should be accessible from the ICM Logs (level 3). But like you mentioned, it doesn't appear to be part of the CX_AI_SYSTEM_FAULT class - which is invoked when any response other than a HTTP 200 OK is received.
In contrast if the response is of type HTTP 200 Ok, the response payload should be accessible.
Sounds about right doesn't it ?
Regards,
Alan
User | Count |
---|---|
87 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.