if (relatesTO == null) {
throw new AxisFault("Cannot identify correct Callback object. RelatesTo is null");
}
String messageID = relatesTO.getValue();
Callback callback = (Callback) callbackStore.remove(messageID);
AsyncResult result = new AsyncResult(messageCtx);
if (callback == null) {
throw new AxisFault("The Callback realtes to MessageID " + messageID + " is not found");
}
try {
// check weather the result is a fault.
SOAPEnvelope envelope = result.getResponseEnvelope();
SOAPFault fault = envelope.getBody().getFault();
if (fault == null) {
// if there is not fault call the onComplete method
callback.onComplete(result);