Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

XKMSMessageAbstractType Class Reference
[XML Key Management System Implementation]

#include <XKMSMessageAbstractType.hpp>

Inheritance diagram for XKMSMessageAbstractType:

Inheritance graph
[legend]
List of all members.

Detailed Description

Interface definition for the MessageAbstractType.

The <MessageAbstractType> is an abstract type on which all other XKMS messages are built. All request/response messages have :

In addition, such messages may have :

The schema definition for MessageAbstractType is as follows :

   <!-- MessageAbstractType -->
   <complexType name="MessageAbstractType" abstract="true">
      <sequence>
         <element ref="ds:Signature" minOccurs="0"/>
         <element ref="xkms:MessageExtension" minOccurs="0" 
               maxOccurs="unbounded"/>
         <element ref="xkms:OpaqueClientData" minOccurs="0"/>
      </sequence>
      <attribute name="Id" type="ID" use="required"/>
      <attribute name="Service" type="anyURI" use="required"/>
      <attribute name="Nonce" type="base64Binary" use="optional"/>
   </complexType>
   <!-- /MessageAbstractType -->

  


Constructors and Destructors

enum  messageType {
  None,
  CompoundRequest,
  CompoundResult,
  LocateRequest,
  LocateResult,
  ValidateRequest,
  ValidateResult,
  PendingRequest,
  StatusRequest,
  StatusResult,
  Result,
  RegisterRequest,
  RegisterResult
}
virtual ~XKMSMessageAbstractType ()
 XKMSMessageAbstractType ()

Public Member Functions

Message Manipulation Methods
virtual messageType getMessageType (void)=0
Getter Interface Methods
virtual bool isSigned (void) const =0
 Find out whether this is a signed Message.
virtual DSIGSignaturegetSignature (void) const =0
 Retrieve the Signature information (if any is attached).
virtual XERCES_CPP_NAMESPACE_QUALIFIER
DOMElement * 
getElement (void) const =0
virtual const XMLCh * getId (void) const =0
 Get the Id for the Message.
virtual const XMLCh * getService (void) const =0
 Get the Service identifier for this message.
virtual const XMLCh * getNonce (void) const =0
 Get the Nonce of the message.
Setter interface methods
virtual void setId (const XMLCh *id)=0
 Set the Id URI for the Message.
virtual void setService (const XMLCh *service)=0
 Set the Service for the Message.
virtual void setNonce (const XMLCh *uri)=0
 Set the Nonce value.
virtual DSIGSignatureaddSignature (canonicalizationMethod cm=CANON_C14N_NOC, signatureMethod sm=SIGNATURE_DSA, hashMethod hm=HASH_SHA1)=0
 Add a signature to the message.
Opaque client data handling
virtual int getOpaqueClientDataSize (void)=0
 Find the number of <OpaqueData> elements.
virtual const XMLCh * getOpaqueClientDataItemStr (int item)=0
virtual void appendOpaqueClientDataItem (const XMLCh *item)=0


Member Enumeration Documentation

enum XKMSMessageAbstractType::messageType
 

Enumeration values:
None 
CompoundRequest  A default value that indicates something hasn't been set
CompoundResult  A CompoundRequest message - holding multiple requests
LocateRequest  A CompoundResult message - holding multiple results
LocateResult  A LocateRequest message
ValidateRequest  A LocateResult message
ValidateResult  A ValidateRequest message
PendingRequest  A ValidateResult message
StatusRequest  A PendingRequest message (Asynchronous protocol)
StatusResult  A StatusRequest message (Asynchronous protocol)
Result  A StatusResult message (Asynchronous protocol)
RegisterRequest  A non-specific result message
RegisterResult  A RegisterResult message


Constructor & Destructor Documentation

XKMSMessageAbstractType::XKMSMessageAbstractType  )  [inline, protected]
 

virtual XKMSMessageAbstractType::~XKMSMessageAbstractType  )  [inline, virtual]
 


Member Function Documentation

virtual DSIGSignature* XKMSMessageAbstractType::addSignature canonicalizationMethod  cm = CANON_C14N_NOC,
signatureMethod  sm = SIGNATURE_DSA,
hashMethod  hm = HASH_SHA1
[pure virtual]
 

Add a signature to the message.

Allows an application to sign the message

Returns:
the new Signature structure

virtual void XKMSMessageAbstractType::appendOpaqueClientDataItem const XMLCh *  item  )  [pure virtual]
 

virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMElement* XKMSMessageAbstractType::getElement void   )  const [pure virtual]
 

Implemented in XKMSCompoundRequest, XKMSCompoundResult, XKMSLocateRequest, XKMSLocateResult, XKMSPendingRequest, XKMSRegisterRequest, XKMSRegisterResult, XKMSRequestAbstractType, XKMSResult, XKMSStatusRequest, XKMSStatusResult, XKMSValidateRequest, and XKMSValidateResult.

virtual const XMLCh* XKMSMessageAbstractType::getId void   )  const [pure virtual]
 

Get the Id for the Message.

All messages are required to have an Id attribute that uniquely identifies the message. This method is used to retrieve a pointer to the Id string.

Returns:
a pointer to the Id string (owned by the library)

virtual messageType XKMSMessageAbstractType::getMessageType void   )  [pure virtual]
 

virtual const XMLCh* XKMSMessageAbstractType::getNonce void   )  const [pure virtual]
 

Get the Nonce of the message.

All messages MAY have a nonce, used to provide cryptographically random data that will help defend against a replay attack.

Returns:
A string (owned by the library) providing the nonce data in base64 encoded form. If no Nonce is set, NULL is returned.

virtual const XMLCh* XKMSMessageAbstractType::getOpaqueClientDataItemStr int  item  )  [pure virtual]
 

virtual int XKMSMessageAbstractType::getOpaqueClientDataSize void   )  [pure virtual]
 

Find the number of <OpaqueData> elements.

The <OpaqueClientData> element can have multiple <OpaqueData> children. This method allows an application to determine how many such children exist

Returns:
Number of <OpaqueData> elements

virtual const XMLCh* XKMSMessageAbstractType::getService void   )  const [pure virtual]
 

Get the Service identifier for this message.

All Messages are associated with a particular XKMS service. This method can be used to retrieve the Service URI for a particular message.

Returns:
a pointer to the Service URI string (owned by the library)

virtual DSIGSignature* XKMSMessageAbstractType::getSignature void   )  const [pure virtual]
 

Retrieve the Signature information (if any is attached).

All XKMS messages MAY have a <Signature> node that is used to attest to the validity of the message.

Returns:
The DSIGSignature object associated with this Message, or NULL if none is defined

virtual bool XKMSMessageAbstractType::isSigned void   )  const [pure virtual]
 

Find out whether this is a signed Message.

Returns:
true if the message is signed

virtual void XKMSMessageAbstractType::setId const XMLCh *  id  )  [pure virtual]
 

Set the Id URI for the Message.

Allows a calling application to set a new Id for the message

Note: Great care should be taken on resetting Id attributes, as they are used to track a particular transaction through its liefcycle.

Parameters:
id The Id to set

virtual void XKMSMessageAbstractType::setNonce const XMLCh *  uri  )  [pure virtual]
 

Set the Nonce value.

Allows the application to set a new Nonce value (overwriting any that is currently set).

Parameters:
uri String (base64 encoded data) to set in the Nonce attribute.
Note:
no checking of this string is done by the library - it is assumed that it is a valid base64 encoding.

virtual void XKMSMessageAbstractType::setService const XMLCh *  service  )  [pure virtual]
 

Set the Service for the Message.

Used to set a new service URI for a particular message. In general, the service attribute would not be expected to change.

Parameters:
service String to set in the Service attribute.


The documentation for this class was generated from the following file:
Generated on Sun Jul 3 17:44:22 2005 for XML-Security-C by  doxygen 1.4.2