Currently, when a CustomCallingConvention fails to convert a request or a response, the only options for generating an exception is to produce an IOException. This is the only (checked) exception thrown by the convertRequestImpl(...) and convertResultImpl(...) methods.
However, I have seen several situations where the cause for the failure is not at all related to an I/O error. In such cases I would rather just throw a specific exception instead, like a ConvertRequestException and a ConvertResultException, respectively.
I will attach a proposed implementation.
ConvertRequestException.java
ConvertResultException.java
Note that the current code already contains the following comment in CallingConvention.java, version 1.107:
// XXX: Replace IOException with more appropriate exception?
Modified CallingConvention.java file, based on v1.107. Backwards compatible.
Note that the proposed implementation also implements RFEs 2984100 and 2984092.
@Anthony: Can you review the RFEs and the proposed implementation?
Note that this RFE breaks compatibility but still in consideration for XINS 3.0.