I am pretty new to SOAP and I am trying to understand SOAP fault handling (in Java). I have done reading about this topic but there are still some concepts that remain unclear to me.
More specifically, how to handle various response codes using Eclipse WSDL editor. I have used Eclipse WSDL editor to create my WSDL but I am open to using another tool such as SoapUI to accomplish this (handling faults).
I've attached an image of a simple web service that is supposed to take UserID (request) and return information about the user such as name, age etc (response). I would like to handle warning and error codes that may be returned by the response. E.g. duplicate UserID found > code "ABC" or no UserID found > code "XYZ".
I don't really understand how/where these codes are returned and where to process them. Would the response just return "ABC" as a String?
The following question is based on the attached image. Do I need to setup displayUserInfoFault as a new class that extends the Exception class and add "throws displayUserInfoFault" to the displayUserInfo() method?
Any guidance would be much appreciated. Thanks!