on 07-02-2015 10:09 AM
Moin,
we have a web service provider generated from a function module. It works, It's synchronous. There is no XI/PI, just the 740 application server.
If the provider is called with a bad request, e.g. a date field is not filled correctly, the system throws CX_SY_CONVERSION_NO_DATE_TIME. So far, so good.
But the response of the web service has
a) http/500 internal server error. I would expect http/400 bad request
b) SRT_UTIL shows a correct error text: "Value ? is not a valid date in accord with the XML format for ABAP". But the response says only "Web service processing error; more details in the web service error log on provider side". Very useless for the consumer to create a correct request.
Is there any way to extend the response with the helpfull error text?
Thanks, Dirk
Hi Dirk,
Pass value below mentioned format in web service
yyyy-MM-ddTHH:mm:ss.fffffffzzzzzz is the expected format.
e.g. 2014-02-01T00:00:00.0 or
2014-02-01
Regards
Naresh.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dirk,
You can catch the exception:
DATA: exc TYPE REF TO cx_ai_system_fault.
TRY.
CALL METHOD proxy->myproxy
EXPORTING
output = ..
IMPORTING
input = ...
CATCH cx_ai_system_fault INTO exc.
error_text = exc->get_text( ).
CATCH cx_ai_application_fault.
error_text = exc->get_text( ).
ENDTRY.
However the information is not clear for a final user.
Like ABAP developer you should try to do some validations before the call to avoid this errors and to inform to the client with a clear information.
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.