throw new XWSSecurityException(ex);
}
// for Policy verfication
TargetResolver targetResolver = new TargetResolverImpl(context);
MessagePolicyVerifier mpv = new MessagePolicyVerifier(context, targetResolver);
/*
try{
System.out.println("Inferred Security Policy");
mpv.printInferredSecurityPolicy(fpContext.getInferredSecurityPolicy());
} catch(Exception e){
throw new XWSSecurityException(e);
}
System.out.println("==================================");
try{
System.out.println("Actual SecurityPolicy");
mpv.printInferredSecurityPolicy(msgPolicy);
} catch(Exception e){
throw new XWSSecurityException(e);
}
*/
//if(!isTrust){
mpv.verifyPolicy(fpContext.getInferredSecurityPolicy(), msgPolicy);
//}
try {
fpContext.getSecurableSoapMessage().deleteSecurityHeader();