Web service - How to send more detailed response in event of web service failure or timeouts
3
Hi, I have published a web service and one of our third party is using it to send us information. Now what they want is more detailed response, especially in the event of failure. For example response message as to weather a request has failed validation and on which filed. Also need to send response message on time-outs if any. I think I need to extend xml/xsd so that I can send error message or change the fault string in SOAP but not sure how to do this. Please can anyone help me with the process of how to send detailed response messages. Thanks in advance..!!
asked
Mohammed Siddiqui - 'Old Account'
4 answers
1
CommunityCommons.throwWebserviceException allows you to send custom SOAP messages (single string) back to consumers instead of "internal server error".
answered
Michel Weststrate
0
Did you have a look at the rest module? I might be wrong but I seem to remember that it also handles error handling. May be you can copy ideas from there.
Regards,
Ronald
answered
Ronald Catersels
0
You'll most likely have to create a custom Java action to validate the request. Eventually you can throw a webservice exception from there. See also: https://forum.mendix.com/questions/2268/Custom-Web-servcie-Exception
answered
Reinout van Schouwen
0
Implementing a timeout can be done using the following combination (in Java);
Core.executeAsync to execute the microflow asyncrhonous
You will get a Future<r> in return which has a .get method containing a timeout
If timeout has expired you can throw your WebserviceException