try {
HaContext.initFrom(packet);
//computing EPR related stuff
//get certificate from EPR or from XWSSConstants.SERVER_CERTIFICATE_PROPERTY
if (wsitContext != null) {
WSBindingProvider bpr = (WSBindingProvider) wsitContext.getWrappedContext().getBindingProvider();
WSEndpointReference epr = bpr.getWSEndpointReference();
X509Certificate x509Cert = (X509Certificate) bpr.getRequestContext().get(XWSSConstants.SERVER_CERTIFICATE_PROPERTY);
if (x509Cert == null) {
if (epr != null) {
WSEndpointReference.EPRExtension idExtn = null;
XMLStreamReader xmlReader = null;
try {