} else {
mp = _policyContainer.getMessagePolicy(false);
}
}catch(PolicyGenerationException ex){
logger.log(Level.SEVERE,LogStringsMessages.SP_0113_UNABLE_TO_DIGEST_POLICY(effectivePolicy),ex);
throw new PolicyException("Unable to digest SecurityPolicy ");
}
//try{
if(wssAssertion != null){
try{
mp.setWSSAssertion(getWssAssertion((com.sun.xml.ws.security.policy.WSSAssertion) wssAssertion));
} catch (PolicyGenerationException ex) {
logger.log(Level.SEVERE,LogStringsMessages.SP_0104_ERROR_SIGNATURE_CONFIRMATION_ELEMENT(ex.getMessage()),ex);
throw new PolicyException(LogStringsMessages.SP_0104_ERROR_SIGNATURE_CONFIRMATION_ELEMENT(ex.getMessage()));
}
}
if(policyBinding!= null && policyBinding.getAlgorithmSuite() != null){
mp.setAlgorithmSuite(getAlgoSuite(policyBinding.getAlgorithmSuite()));
}
if(policyBinding!= null && policyBinding.getLayout()!= null){
mp.setLayout(getLayout(policyBinding.getLayout()));
}
if(isIncoming && reqElements.size() > 0){
try {
com.sun.xml.ws.security.impl.policyconv.RequiredElementsProcessor rep =
new com.sun.xml.ws.security.impl.policyconv.RequiredElementsProcessor(reqElements, mp);
rep.process();
} catch (PolicyGenerationException ex) {
logger.log(Level.SEVERE,LogStringsMessages.SP_0103_ERROR_REQUIRED_ELEMENTS(ex.getMessage()),ex);
throw new PolicyException(LogStringsMessages.SP_0103_ERROR_REQUIRED_ELEMENTS(ex.getMessage()));
}
}
if(transportBinding){
mp.setSSL(transportBinding);
}