www.openlinksw.com
docs.openlinksw.com

Book Home

Contents
Preface

Virtuoso Functions Guide

Administration
Aggregate Functions
Array Manipulation
BPEL APIs
Backup
Compression
Cursor
Date & Time Manipulation
Debug
Dictionary Manipulation
Encoding & Decoding
File Manipulation
Free Text
Hashing / Cryptographic
dsig_template_ext
md5
md5_final
md5_init
md5_update
x509_certificate_ver...
xenc_x509_certificat...
xenc_decrypt_soap
xenc_delete_temp_key...
xenc_encrypt
xenc_get_key_algo
xenc_get_key_identif...
xenc_key_3des_create
xenc_key_3des_rand_c...
xenc_key_3des_read
xenc_key_aes_create
xenc_key_aes_rand_cr...
xenc_key_dsa_create
xenc_key_dsa_read
xenc_key_rsa_read
xenc_key_create_cert
xenc_key_exists
xenc_key_inst_create
xenc_key_remove
xenc_key_serialize
xenc_set_primary_key
LDAP
Locale
Mail
Miscellaneous
Number
Remote SQL Data Source
Replication
SOAP
SQL
String
Transaction
Type Mapping
UDDI
User Defined Types & The CLR
Virtuoso Java PL API
Virtuoso Server Extension Interface (VSEI)
Web Server & Internet
XML
XPATH & XQUERY

Functions Index

xenc_decrypt_soap

Decrypt and verify a SOAP message
varchar xenc_decrypt_soap (in xml_text varchar, in soap_version int, in validate_flag int, in encoding varchar, in lang varchar, in opts any, out keys any);
Description

The function is used to decrypt and optionally verify signature (depends of a validate_flag parameter) of a SOAP message.

Parameters
xml_text – A string containing SOAP message
soap_version – An interger indication SOAP version (11 for v1.1, 10 for 1.0 etc)
validate_flag – Bit mask flag. See below for details.
  • bit 0 and 1 : 00 - do not validate, 01 (decimal 1) - validate, 10 (decimal 2) - validate if signature exists
  • bit 2 : 100 (decimal 4) - try to decode, do not signal error if WS-Security is not supplied
encoding – The message (xml_text) character encoding
lang – The message (xml_text) language
opts – A vector containing options for User Name token profile. For example : vector ('UsernameToken', vector ('label', 'lab1', 'keyAlgorithm' , '[3des algo uri]'))
keys – if supplied the parameter will be set with keys names used for decryption and signature verification. The strucure is as follows : vector (vector ([enc-key1],[enc-key2],...), vector ('[signing token name]', '[matching token]')). Where enc-key is a key used to decrypt the message fragment; '[signing token name]' is the temporary key used to validate the signature and '[matching token]' is the token (key) from user's space that matches the signing token.
Return Types

On success the function returns decrypted SOAP message.

Errors

This function can generate the following errors:

.

Examples
Decrypting SOAP message
	  declare ekeys, opts, decoded any;
	  opts := vector ('UsernameToken', vector ('label', 'Application-Label',
	  'keyAlgorithm', 'http://www.w3.org/2001/04/xmlenc#tripledes-cbc'));
	  decoded := xenc_decrypt_soap (body_str, 11, 6, 'UTF-8', 'x-any', opts, ekeys);

See Also

xenc_encrypt()