Specifications

CommentsJavaScript typeSOAP type
Datexsd:dateTime
Single-dimension arrays onlyArraySOAP-ENC:Array
All items must have the same data type, which must
be boolean, integer, float, string or dateTime
Uses the ByteArray “Hex” codecByteArrayxsd:hexBinary
Uses the ByteArray “Base64” codecByteArrayxsd:base64Binary
Uses the ByteArray “Base64” codecByteArraySOAP-ENC:base64
Copies the XML string content without changeStringOther
Example
var url = <get a URL for this service from http://www.whitemesa.com/interop.htm>;
// Call the echoString SOAP method
var testString = "This is my test string";
var response = SOAP.request( url,
{ "http://soapinterop.org/:echoString": { inputString: testString } },
"http://soapinterop.org/" );
var result = response["http://soapinterop.org/:echoStringResponse"]["return"];
// Call the echoInteger SOAP method
var testInt = { soapType: "xsd:int", soapValue: "10" };
var response = SOAP.request( url,
{ "http://soapinterop.org/:echoInteger": { inputInteger: testInt } },
"http://soapinterop.org/" );
var result = response["http://soapinterop.org/:echoIntegerResponse"]["return"];
18.6 Database module
Text encoding
JavaScript strings in Switch store Unicode text in UTF-16 encoding. A database implementation
may use a different text encoding, in which case the appropriate conversion must be performed
when exchanging text. The ODBC interface unfortunately does not offer a mechanism to discover
the text encoding used by the database, so this information must be provided by the user.
Most modern databases use Unicode-aware encodings such as UTF-16 or UTF-8. Older database
implementations may use local 8-bit encodings that are not Unicode-aware. To complicate
matters even more, some databases use a mixture of encodings (for example UTF-8 for storing
text in data fields and UTF-16 for interpreting queries).
Codec Arguments
Selected functions in the Switch database module offer extra “codec” arguments to support
databases that use text encodings other than UTF-16.
The DataSource.connect() function allows specifying two codec arguments:
query-codec: affects queries sent to and column names retrieved from the database.
438
Enfocus Switch 10