sessionHandler.initCookieIfNeeded(invocation);
}
catch (Exception e)
{
log.debug("Couldn't init cookie: " + e.getLocalizedMessage());
return new ErrorResponse(e);
}
}
else if (error instanceof InvalidSession)
{
log.debug("Session invalidated after InvalidSessionFault, will re-send session-stored information.");
sessionHandler.handleInvalidSessionFault(invocation, runtimeContext);
}
else if (error instanceof InvalidRegistration)
{
log.debug("Invalid registration");
consumer.handleInvalidRegistrationFault();
}
else if (error instanceof ModifyRegistrationRequired)
{
ProducerInfo producerInfo = consumer.getProducerInfo();
log.debug("Producer " + producerInfo.getId() + " indicated that modifyRegistration should be called.");
producerInfo.setModifyRegistrationRequired(true);
producerInfo.setActiveAndSave(false);
return new ErrorResponse(error);
}
else
{
// other errors cannot be dealt with: we have an error condition
return new ErrorResponse(error);
}
return null;
}