Class WSSecBase

    • Constructor Summary

      Constructors 
      Constructor Description
      WSSecBase()
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getKeyIdentifierType()
      Gets the value of the keyIdentifyerType.
      protected java.lang.String setBodyID​(org.w3c.dom.Document doc)
      Looks up or adds a body id.
      void setKeyIdentifierType​(int keyIdType)
      Sets which key identifier to use.
      void setParts​(java.util.Vector parts)
      Set which parts of the message to encrypt/sign.
      void setUserInfo​(java.lang.String user, java.lang.String password)
      Set the user and password info.
      void setWsConfig​(WSSConfig wsConfig)  
      protected java.lang.String setWsuId​(org.w3c.dom.Element bodyElement)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • user

        protected java.lang.String user
      • password

        protected java.lang.String password
      • keyIdentifierType

        protected int keyIdentifierType
      • parts

        protected java.util.Vector parts
      • doDebug

        protected boolean doDebug
    • Constructor Detail

      • WSSecBase

        public WSSecBase()
        Constructor.
    • Method Detail

      • setParts

        public void setParts​(java.util.Vector parts)
        Set which parts of the message to encrypt/sign.

        Parameters:
        parts - The vector containing the WSEncryptionPart objects
      • setWsConfig

        public void setWsConfig​(WSSConfig wsConfig)
        Parameters:
        wsConfig - The wsConfig to set.
      • setBodyID

        protected java.lang.String setBodyID​(org.w3c.dom.Document doc)
                                      throws java.lang.Exception
        Looks up or adds a body id.

        First try to locate the wsu:Id in the SOAP body element. If one is found, the value of the wsu:Id attribute is returned. Otherwise the methode generates a new wsu:Id and an appropriate value.

        Parameters:
        doc - The SOAP envelope as Document
        Returns:
        The value of the wsu:Id attribute of the SOAP body
        Throws:
        java.lang.Exception
      • setWsuId

        protected java.lang.String setWsuId​(org.w3c.dom.Element bodyElement)
      • setUserInfo

        public void setUserInfo​(java.lang.String user,
                                java.lang.String password)
        Set the user and password info. Both information is used to get the user's private signing key.
        Parameters:
        user - This is the user's alias name in the keystore that identifies the private key to sign the document
        password - The user's password to get the private signing key from the keystore