Encryption
Encryption involves the sender encrypting the message with the recipient's public key to ensure that only the recipient can read the message (only the recipient has its own private key, necessary for decrypting the message.) This requires the sender to have the recipient's public key in its keystore.
The process for encrypting is very similar to and indeed usually combined with the signature process above. Our WS-Security test sample provides an example of encrypting requests and responses.