IBM WebSphere Application ServerTM
Release 7

com.ibm.websphere.wssecurity.wssapi
Interface WSSGenerationContext


public interface WSSGenerationContext

This interface stores the components for generating the SOAP message, such as signature, encryption, attached security token, and attached time stamp.

  1. Generate the wssfactory instance.
  2. Generate the wssGenerationContext instance.
  3. Create the components, such as WSSSignature, WSSEncryption, SecurityToken, WSSTimestamp object.
  4. Set the components into the wssGenerationContext object.
  5. Invoke wssGenerationContext.process() method.


Method Summary
 void add(SecurityToken token)
          Adds the SecurityToken object in order to attach the security token to the SOAP message.
 void add(WSSEncryption enc)
          Adds the WSSEncyption object in order to encrypt the element in the SOAP message.
 void add(WSSSignature sig)
          Adds the WSSSignature object in order to sign the element in the SOAP message.
 void add(WSSTimestamp ts)
          Adds the WSSTimestamp object in order to attach the time stamp to the SOAP message.
 void process(java.lang.Object messageContext)
          The WS-Security element is generated after this method is called.
 

Method Detail

add

void add(WSSSignature sig)
Adds the WSSSignature object in order to sign the element in the SOAP message.

Parameters:
sig - signature object

add

void add(WSSEncryption enc)
Adds the WSSEncyption object in order to encrypt the element in the SOAP message.

Parameters:
enc - encryption object

add

void add(SecurityToken token)
Adds the SecurityToken object in order to attach the security token to the SOAP message.

Parameters:
token - security token object

add

void add(WSSTimestamp ts)
Adds the WSSTimestamp object in order to attach the time stamp to the SOAP message.

Parameters:
ts - time stamp object

process

void process(java.lang.Object messageContext)
             throws WSSException
The WS-Security element is generated after this method is called.

Parameters:
messageContext - SOAP message context
Throws:
WSSException - if an unexcepted error occurs in processing

IBM WebSphere Application ServerTM
Release 7