Class SecurityConfigurationXmlReader

java.lang.Object
com.sun.xml.wss.impl.config.SecurityConfigurationXmlReader
All Implemented Interfaces:
ConfigurationConstants

public class SecurityConfigurationXmlReader extends Object implements ConfigurationConstants
Represents a Parser for reading an XWS-Security configuration and creating an appropriate XWS-Security configuration object. The parser expects the root element of an XWS-Security configuration to be either a xwss:JAXRPCSecurity or a xwss:SecurityConfiguration. xwssconfig.xsd (the XWS-Security configuration schema)
  • Field Details

    • log

      protected static final Logger log
  • Constructor Details

    • SecurityConfigurationXmlReader

      public SecurityConfigurationXmlReader()
  • Method Details

    • readApplicationSecurityConfigurationString

      public static ApplicationSecurityConfiguration readApplicationSecurityConfigurationString(String sourceXml) throws Exception
      read an XWS-Security configuration String representing an xwss:JAXRPCSecurity element and return an ApplicationSecurityConfiguration instance.
      Parameters:
      sourceXml - the configuration String
      Returns:
      an ApplicationSecurityConfiguration corresponding to the configuration
      Throws:
      Exception - if there was an error in creating the configuration
    • validate

      public static void validate(InputStream xmlStream, PrintStream out) throws Exception
      Parse and validate an XWS-Security configuration
      Parameters:
      xmlStream - the InputStream representing the configuration
      out - the PrintStream to which Errors messages should be logged
      Throws:
      Exception - if there was an error while validating the configuration
    • createDeclarativeConfiguration

      public static DeclarativeSecurityConfiguration createDeclarativeConfiguration(InputStream xmlStream) throws Exception
      read an XWS-Security configuration representing a xwss:SecurityConfiguration element and return a DeclarativeSecurityConfiguration instance.
      Parameters:
      xmlStream - the InputStream for the configuration
      Returns:
      a DeclarativeSecurityConfiguration corresponding to the configuration
      Throws:
      Exception - if there was an error in creating the configuration
    • createApplicationSecurityConfiguration

      public static ApplicationSecurityConfiguration createApplicationSecurityConfiguration(InputStream xmlStream) throws Exception
      read an XWS-Security configuration representing an xwss:JAXRPCSecurity element and return an ApplicationSecurityConfiguration instance.
      Parameters:
      xmlStream - the InputStream for the configuration
      Returns:
      an ApplicationSecurityConfiguration corresponding to the configuration
      Throws:
      Exception - if there was an error in creating the configuration