Class JAXBEncryptedKey

    • Constructor Detail

      • JAXBEncryptedKey

        public JAXBEncryptedKey​(EncryptedKeyType ekt,
                                Key kk,
                                Key dk,
                                com.sun.xml.ws.api.SOAPVersion soapVersion)
                         throws com.sun.xml.wss.XWSSecurityException
        Creates a new instance of JAXBEncryptedKey
        Throws:
        com.sun.xml.wss.XWSSecurityException
    • Method Detail

      • encrypt

        public void encrypt()
      • decrypt

        public void decrypt()
      • getAttribute

        public String getAttribute​(QName name)
      • readHeader

        public XMLStreamReader readHeader()
                                   throws XMLStreamException
        Description copied from interface: SecurityElement
        Reads the header as a XMLStreamReader.

        The returned parser points at the start element of this header. (IOW, XMLStreamReader.getEventType() would return XMLStreamConstants.START_ELEMENT.

        Performance Expectation

        For some Header implementations, this operation is a non-trivial operation. Therefore, use of this method is discouraged unless the caller is interested in reading the whole header.

        Similarly, if the caller wants to use this method only to do the API conversion (such as simply firing SAX events from XMLStreamReader), then the JAX-WS team requests that you talk to us.

        Messages that come from tranport usually provides a reasonably efficient implementation of this method.

        Specified by:
        readHeader in interface SecurityElement
        Returns:
        must not null.
        Throws:
        XMLStreamException
      • readAsJAXB

        public <T> T readAsJAXB​(javax.xml.bind.Unmarshaller unmarshaller)
                         throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • readAsJAXB

        public <T> T readAsJAXB​(com.sun.xml.bind.api.Bridge<T> bridge,
                                com.sun.xml.bind.api.BridgeContext context)
                         throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • readAsJAXB

        public <T> T readAsJAXB​(com.sun.xml.bind.api.Bridge<T> bridge)
                         throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • writeTo

        public void writeTo​(javax.xml.soap.SOAPMessage saaj)
                     throws javax.xml.soap.SOAPException
        Throws:
        javax.xml.soap.SOAPException
      • isCanonicalized

        public boolean isCanonicalized()
      • hasReferenceList

        public boolean hasReferenceList()
      • refersToSecHdrWithId

        public boolean refersToSecHdrWithId​(String id)
        finds whether the this security header element refers to the element with given id
        Specified by:
        refersToSecHdrWithId in interface SecurityHeaderElement
        Parameters:
        id -
        Returns:
      • getCipherValue

        public byte[] getCipherValue()