Referencing Types in Other Schemas

9-100 Oracle Fusion Middleware Users Guide for Technology Adapters In the second and third cases, the actual value extracted from the XML file is null. The type converter accepts null and returns it without any conversion. The null value is bound to its corresponding parameter regardless of its type. Essentially, this is the same as passing null for parameter X. The fourth case has two possibilities. The parameter either has a default clause or it does not. If the parameter has a default clause, then the parameter can be excluded from the invocation of the stored procedure. This allows the default value to be used for the parameter. If the parameter is included, then the value of the parameter is used, instead. If the parameter does not have a default clause, then the parameter must be included in the invocation of the procedure. Elements for all parameters of a function must be specified. If an element in the instance XML is missing, then the function is invoked with fewer arguments than is expected. A null value is bound to the parameter by default: SQL CREATE PROCEDURE PROC X IN INTEGER DEFAULT 0 AS BEGIN … END; Here, no value is bound to the parameter. In fact, the parameter can be excluded from the invocation of the stored procedure. This allows the value of 0 to default for parameter X. To summarize, the following PLSQL is executed in each of these three cases: 1. BEGIN PROC X=?; END; - X = 100 2. BEGIN PROC X=?; END; - X = null 3. There are two possibilities: a. BEGIN PROC ; END; - X = 0 X has a default clause b. BEGIN PROC X=?; END; - X = null X does not have a default clause With the exception of default clause handling, these general semantics also apply to item values of a collection or attribute values of an OBJECT whose types are one of the supported primitive data types. The semantics of X when the type is user-defined are, however, quite different. For a collection, whether it is a VARRAY or a nested table, the following behavior can be expected, given a type definition such as SQL CREATE TYPE ARRAY AS VARRAY 5 OF VARCHAR2 10; and XML for a parameter, X, which has type ARRAY, that appears as follows: X X_ITEM xsi:nil=true X_ITEMHelloX_ITEM X_ITEM xsi:nil=true X_ITEMWorldX_ITEM X The first and third elements of the VARRAY are set to null. The second and fourth are assigned their respective values. No fifth element is specified in the XML file; therefore, the VARRAY instance has only four elements. Assume an OBJECT definition such as SQL CREATE TYPE OBJ AS OBJECT A INTEGER, B INTEGER, C INTEGER; and XML for a parameter, X, which has type OBJ, that appears as