return handle(invocation);
}
catch (Exception e)
{
log.debug("Couldn't init cookie: " + e.getLocalizedMessage());
return new ErrorResponse(e);
}
}
else if (error instanceof InvalidSession)
{
// invalidate the currently held session information
log.debug("Session invalidated after InvalidSessionFault, will re-send session-stored information.");
sessionHandler.handleInvalidSessionFault(invocation, runtimeContext);
// and re-attempt invocation as we can recover from this
return handle(invocation);
}
else if (error instanceof InvalidRegistration)
{
// invalidate the registration information, we can't recover from this, the user will have to check the admin UI to see what's wrong
consumer.handleInvalidRegistrationFault();
return new ErrorResponse(error);
}
else if (error instanceof ModifyRegistrationRequired)
{
// we can't recover from this, the user will need to check the admin UI to see how to modify the current registration to make it comply with the new producer's requirements
consumer.handleModifyRegistrationRequiredFault();
return new ErrorResponse(error);
}
else
{
// other errors cannot be dealt with: we have an error condition
return new ErrorResponse(error);
}
}