Exception
when defining method-specific exceptions. For example:
@WebMethod(operationName = "GetMember", action = "GetMember") public void getMember(@WebParam(name = "MemberID") Long memberID, @WebParam(name = "Member", mode = Mode.OUT) Holdermember) throws InvalidMemberID { if (! isValid(memberID)) { throw new InvalidMemberID(memberID); } ... }
I originally named the exception InvalidMemberIDException
, but this results in a SOAP fault with the same name in the WSDL, rather than just InvalidMemberID
. The client tool wsimport
will then use this WSDL to generate an exception named InvalidMemberIDException_Exception
.