Skip to main content

%SOAP.Security.Header

class %SOAP.Security.Header extends %SOAP.Header

OASIS Web Services Security SOAP header.

Property Inventory

Method Inventory

Parameters

parameter NAMESPACE = http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd;
Inherited description: NAMESPACE specifies the XML namespace to be used when projecting the class to XML. If NAMESPACE = "", the default namespace is used for the XML schema is used as the namespace for his class.
parameter XMLFORMAT = literal;
Inherited description: The XMLFORMAT parameter controls the generation of the XMLExport and XMLImport methods for XML enabled classes to include code for only literal or only encoded format. This allows the generated routines to be significantly smaller since usually both formats are not needed.

If XMLFORMAT="Literal", then only support for literal format import and export is generated.

If XMLFORMAT="Encoded", then only support for SOAP encoded format import and export is generated.

The default is to generate support for both literal and encoded format.

parameter XMLTYPE = Security;
Inherited description: This parameter provides the default XMLTYPE for the class. If it is empty then the class name will be used to construct a default XML type.

The default XMLTYPE is used when naming and referencing this type in a schema and the schema context did not provide an XML type name.

Properties

property Namespace as %String);
The actual XML namespace for this header
Property methods: NamespaceDisplayToLogical(), NamespaceGet(), NamespaceIsValid(), NamespaceLogicalToDisplay(), NamespaceLogicalToOdbc(), NamespaceNormalize(), NamespaceSet()
property SecurityContextToken as %SOAP.WSSC.SecurityContextToken (XMLPROJECTION = "none");
The SecurityContextToken obtained from the received Security header while the SecurityContextToken is being validated. This token may be used in the response.
Property methods: SecurityContextTokenGet(), SecurityContextTokenGetSwizzled(), SecurityContextTokenIsValid(), SecurityContextTokenNewObject(), SecurityContextTokenSet()
property Signature as %XML.Security.Signature (XMLPROJECTION = "none");
If the Security header has a Signature, then the %XML.Security.Signature instance instance corresponding to the signature is stored here.
Property methods: SignatureGet(), SignatureGetSwizzled(), SignatureIsValid(), SignatureNewObject(), SignatureSet()
property UsernameToken as %SOAP.Security.UsernameToken (XMLPROJECTION = "none");
The UsernameToken which was in an imported Security header
Property methods: UsernameTokenGet(), UsernameTokenGetSwizzled(), UsernameTokenIsValid(), UsernameTokenNewObject(), UsernameTokenSet()

Methods

method AddSecurityElement(element As %SOAP.Security.Element, position="") as %Status
Add an element to the Security header.
If position is specified as a %SOAP.Security.Element subclass, then the element is added after this element. Otherwise, position is the %Integer position at which to the element is added. If position=-1, then the element is added after all elements.
If position is not specified, the position depends on which type of element is added. Token elements are those which do not specify signature (Signature) or encryption (ReferenceList or EncryptedKey with ReferenceList) are added after all previously added token elements. The exception is the Timestamp element always goes first.
If any tokens which are to be encrypted are added, they should be added after the EncryptedKey element is added and should be postioned after the EncryptedKey specified as the position argument.
Elements which specify signature (Signature) or encryption (ReferenceList or EncryptedKey with ReferenceList) are added following all tokens elements and thus before all other non-token elements.
This method replaces the deprecated methods AddToken and AddElement. There is no need to modify existing code, but if you choose to do so, you can simply replace references to AddToken and AddElement with references to AddSecurityToken. It is not necessary to adjust the argument lists.
method FindByEncryptedKeySHA1(encryptedKeySHA1 As %Binary) as %SOAP.Security.Element
Find the key from an EncryptedKey element which corresponds to the EncryptedKeySHA1 argument. Return the key if found, else "".
method FindElement(type As %String, ByRef pos As %String) as %SOAP.Security.Element
Find the first security element of the specified type after position pos and return the element. Return "" if no element of the specified type is found. Types are Timestamp, BinarySecurityToken, UsernameToken, Signature, SignatureConfirmation, EncryptedKey.
method FindEncryptedKey(usedAsSigningKey As %Boolean) as %XML.Security.EncryptedKey
Find an EncryptedKey element. Return the key if found, else "".
method FindLastElement(type As %String, ByRef pos As %String) as %SOAP.Security.Element
Find the last security element of the specified type and return the element. Return "" if no element of the specified type is found. Types are Timestamp, BinarySecurityToken, UsernameToken, Signature, SignatureConfirmation, EncryptedKey.
classmethod GetSecurityNamespace()
Return the default WS-Security namespace
classmethod IsSecurityNamespace(namespace As %String) as %Boolean
Return true if the specified namespace is a valid namespace for a WS-Security header

Inherited Members

Inherited Properties

Inherited Methods

FeedbackOpens in a new tab