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
sha1_digest
tree_md5
x509_certificate_ver...
x509_csr_generate
xenc_spki_read
xenc_x509_certificat...
xenc_bn2dec
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_create
xenc_key_rsa_read
xenc_key_create_cert
xenc_key_exists
xenc_key_inst_create
xenc_key_remove
xenc_key_serialize
xenc_pem_export
xenc_pkcs12_export
xenc_set_primary_key
xenc_x509_generate
xenc_x509_ss_generat...
LDAP
Locale
Mail
Miscellaneous
Number
Phrases
RDF data
Remote SQL Data Source
Replication
SOAP
SQL
String
Transaction
Type Mapping
UDDI
User Defined Types & The CLR
VAD
Virtuoso Java PL API
Virtuoso Server Extension Interface (VSEI)
Web & Internet
XML
XPATH & XQUERY

Functions Index

xenc_encrypt

Encrypt and optionally sign a SOAP message
varchar xenc_encrypt (in message varchar, in soap_ver int, in template varchar, in ns any, in xp-n varchar, in ki-n any, in what-n varchar, ... );
Description

Encrypt SOAP message and optionally attach an XML signature. The keys are retrieved from the key store of the calling user account.

Parameters
message – A string containing SOAP message
soap_ver – SOAP version (11 = 1.1, 10 = 1.0 etc.)
template – a string containing Digital signature template.
ns – an array of strings containing WS-Security extension and WS-Utility version information.
xp-n – XPath expression to locate n-th part of the message to be encrypted
ki-n – Key instance to encrypt the part
what-n – 'Content' - the content under located element will be encrypted; 'Element' the located element and content will be encrypted.
Return Types

On success the function will return a string containing encrypted and optionally signed SOAP message.

Errors

This function can generate the following errors:

.

Examples
Encrypting and signing SOAP message
	  ...
	  ns := vector ();
	  template := dsig_template_ext (...);
	  keyi := xenc_key_inst_create ('myAES', xenc_key_inst_create ('rsa-test'));
	  resp := xenc_encrypt (request, 11, template, ns, '/Envelope/Body', keyi, 'Content');
	  ...

See Also

dsig_template_ext()

xenc_key_inst_create()