Class NewSecurityRecipient


  • public class NewSecurityRecipient
    extends Object
    This class exports a static Security Service for Verifying/Validating Security in an Inbound SOAPMessage. The policy to be applied for Verifying the Message and the SOAPMessage itself are supplied in an instance of a com.sun.xml.wss.ProcessingContext
    See Also:
    ProcessingContext
    • Constructor Detail

      • NewSecurityRecipient

        public NewSecurityRecipient()
    • Method Detail

      • validateMessage

        public static void validateMessage​(ProcessingContext context)
                                    throws XWSSecurityException
        Validate security in an Inbound SOAPMessage.

        Calling code should create com.sun.xml.wss.ProcessingContext object with runtime properties. Specifically, it should set SecurityPolicy, application CallbackHandler Or a SecurityEnvironment The SecurityPolicy instance can be of the following types:

        • A MessagePolicy
        Parameters:
        context - an instance of com.sun.xml.wss.ProcessingContext
        Throws:
        XWSSecurityException - if there was an unexpected error while verifying the message. OR if the security in the incoming message violates the Security policy that was applied to the message.
        WssSoapFaultException - when security in the incoming message is in direct violation of the OASIS WSS specification. When a WssSoapFaultException is thrown the getFaultCode() method on the WssSoapFaultException will return a QName which would correspond to the WSS defined fault.