# 22. Virtuoso Functions Guide - soap_box_xml_entity

Chapter Contents | Prev | Next
Keyword Search:
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
LDAP
Locale
Mail
Miscellaneous
Number
Remote SQL Data Source
Replication
SOAP
http_body_read
soap_box_structure
soap_box_xml_entity
soap_call
soap_client
soap_current_url
soap_dt_define
soap_make_error
soap_print_box
soap_sdl
soap_server
soap_wsdl
soap_wsdl_import
wst_cli
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

## soap_box_xml_entity

Converts an XML entity to an SQL value given the desired SQL type.
any soap_box_xml_entity (in entity any, in try_typed_as any, [in soap_version integer]);
Description

This function converts an XML entity to an SQL value based on the type of the entity and the desired SQL type. This function is called internally to convert a SOAP request parameter to a PL procedure parameter when a SOAP request is being processed by the SOAP server.

Parameters
entity – The XML fragment as a vector (as returned from xml_tree() or a subpart of it).
try_typed_as – A sample value, whose type is taken as a desired type for conversion.
soap_version – Optional (default 1). The soap version (1 for SOAP 1.0, 11 for SOAP 1.1).
Return Types

The return type of soap_box_xml_entity() can vary according to the type of entity parameter, described by try_typed_as as follows:

- If entity is NULL, the return value will be NULL.
- If entity is not a vector() then its value will be cast to the try_typed_as type, if possible.
- If entity is a vector() containing XML tree then it will be converted to an appropriate SQL type (vector(), varchar, integer etc.) depending on the SOAP RPC encoding rules (XMLSchema-datatypes and SOAP-RPC encoding schema) for in/out SOAP messages. i.e. it depends on the structure/content of the XML tree passed as the entity argument.