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
Phrases
RDF data
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 & Internet
XML
XPATH & XQUERY

Functions Index

soap_dt_define

define re-define or erase the complex datatype definition for SOAP calls
soap_dt_define (in namevarchar, in schema_stringvarchar);
Description

This defines a new complex SOAP datatype (usually array of structure) named 'name'.

The schema_string string represents definition as complexType element from XML Schema. The only complexContent, all and sequence elements can be used within the complexType. This means that optional elements in the defined datatype are not supported as a variant of the SOAP parameter datatype. If the schema descriptions contains an unsupported element , the SQL error will be signalled and error message will explain what element is wrong.

Parameters
name – A varchar containing the expanded name of SOAP type to be defined/removed or an empty string (''). If an empty string is supplied this function will try to extract it from the given schema_string schema fragment (attribute @name'). Name cannot be an empty string for removing SOAP types. his function is implemented as a stored procedure and hence should be referenced fully qualified as DB.DBA.soap_dt_define() if the current catalogue cannot be guaranteed to be DB.
schema_string – XMLSchema excerpt as varchar or NULL (null is used for removal).
Return Types

This function returns a varchar of the name of the registered SOAP type.

Errors

This function can generate the following errors:

Examples
Definition of an Array


<!-- file float_array.xsd -->
<complexType name="ArrayOffloat"
   xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/" 
   xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
   xmlns="http://www.w3.org/2001/XMLSchema"
   xmlns:tns="services.wsdl">
   <complexContent>
   <restriction base="enc:Array">
   <sequence>
   <element name="item" type="float" minOccurs="0" maxOccurs="unbounded" nillable="true"/>
   </sequence>
   <attributeGroup ref="enc:commonAttributes"/>
   <attribute ref="enc:offset"/>
   <attribute ref="enc:arrayType" wsdl:arrayType="float[]"/>
   </restriction>
   </complexContent>
</complexType>
<!-- eof float_array.xsd -->

can be defined from ISQL tool or in the PL procedure
SQL> DB.DBA.soap_dt_define ('ArrayOffloat', file_to_string ('float_array.xsd'));


Definition of an Structure


<!-- file struct.xsd -->
<complexType name="PERSON"
   xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/" 
   xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
   xmlns="http://www.w3.org/2001/XMLSchema"
   xmlns:tns="services.wsdl">

   <sequence>
     <element name="firstName" type="string"/>
     <element name="lastName" type="string"/>
     <element name="ageInYears" type="int"/>
     <element name="weightInLbs" type="float"/>
     <element name="heightInInches" type="float"/>
   </sequence>
</complexType>
<!-- eof struct.xsd -->

can be defined from ISQL tool or in the PL procedure
SQL> DB.DBA.soap_dt_define ('PERSON', file_to_string ('struct.xsd'));


Definition of composite type array of structures


<!-- file array_struct.xsd -->
<complexType name="ArrayOfPERSON"
   xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/" 
   xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
   xmlns="http://www.w3.org/2001/XMLSchema"
   xmlns:tns="services.wsdl">
   
   <complexContent>
   <restriction base="enc:Array">
   <sequence>
   <element name="item" type="tns:PERSON" minOccurs="0" maxOccurs="unbounded" nillable="true"/>
   </sequence>
   <attributeGroup ref="enc:commonAttributes"/>
   <attribute ref="enc:offset"/>
   <attribute ref="enc:arrayType" wsdl:arrayType="tns:PERSON[]"/>
   </restriction>
   </complexContent>

</complexType>
<!-- eof array_struct.xsd -->

can be defined from ISQL tool or in the PL procedure
SQL> DB.DBA.soap_dt_define ('ArrayOfPERSON', file_to_string ('array_struct.xsd'));