Simple Type and Complex Type Parameters

Previous Next

See Also

A simple type parameter can contain only a basic type, and can be compared with a variable in a programming language. It cannot contain other elements, and it cannot have attributes. Examples of simple types are string and integer.

When checking a web service method in USoft and generating parameters, data types are filled in with simple types as follows:

USoft Data Type

XML Data Type

DOUBLE PRECISION, FLOAT, REAL

xsd:double

BIT

xsd:Boolean

CHAR

xsd:string

VARCHAR, VARCHAR2

xsd:string

LONG, LONG VARCHAR, TEXT, CLOB

xsd:string

MONEY, SMALLMONEY

xsd:string

DATE, DATETIME, SMALLDATETIME

xsd:dateTime (*)

TIME, TIMESTAMP

xsd:dateTime

INT, INTEGER, SMALLINT, TINYINT

xsd:int

NUMBER, NUMERIC, DECIMAL with decimals

xsd:double

NUMBER, NUMERIC, DECIMAL without decimals

xsd:int

 

(*) The dateTime XML data type has format: YYYY-MM-DDTHH24:MI:SS. In the Definer, for a simple type parameter, use a domain with IO format: YYYY-MM-DD"T"HH24:MI:SS

A complex type parameter is an XML element that can include attribute values or a content model that contains other elements (structures, objects, and arrays). Complex type parameters are specified in USoft using namespaces.

When creating an XML schema definition, each element and attribute has simple or complex content and is of simple or complex type. A complexType element is used to define a user type, which can contain multiple elements and attributes.

TIP:

When retrieving values from a complex type input parameter, use the apply or value method of the USXSL component, and specify the correct namespace. For example, if the value of an InputParameter parameter is:

<person xmlns="urn:myNameSpace">

<FirstName>John</FirstName>

</person>

You can use the USXSL component as follows:

USXSL.value(

:InputParameter

,'/ns:person/ns:FirstName'

,'xmlns:ns="urn:myNameSpace"'

)

For more information, refer to the See Also topics.