Configuring an Oracle Database Adapter for Global Transaction Participation

Oracle JCA Adapter for Database 9-31 Row Column name=DEPTNO sqltype=NUMBER20Column ... Row refCursorOutputParam However the XML output from this is hard to use. It is very difficult to write an Xpath expression or XSL based on a weakly typed XSD and column names as attribute values instead of element names. Although a row set can represent any result set, it is possible to assume for some procedures that it will have the same structure each time, and hence can be described with a strongly typed XSD. A strongly typed XSD is almost a necessity if you want to transform the result set to another XSD later on. A strongly typed XSD looks like the XSD that Example 9–2 shows. Example 9–2 Strongly Typed XSD refCursorOutputParam dept deptno20deptno ... dept refCursorOutputParam You can use the Adapter Configuration Wizard to create a strongly typed XSD for a row set returned by a stored procedure or function REF CURSOR variable. An Oracle Database function is a special stored procedure that always has one out variable, and can be inlined - for example, inside select statements - and so traditionally does not do updates. Using this feature, you can select a stored procedure or stored function, enter its arguments, and perform a test execution to retrieve an actual row set. The Adapter Configuration Wizard then introspects the returned row set and generates a strongly typed XSD. You can enter arguments easily through the wizard. For example, you can enter numbers and strings directly, dates as literals 20091111, and you can even enter structs like MYOBJa, b. The Adapter Configuration Wizard row set support using a strongly typed XSD has the following restrictions: ■ Oracle Database PLSQL record or boolean types are not supported. ■ Oracle Database PLSQL varray is not supported. ■ Oracle Database PLSQL rowtype is not supported. ■ Oracle Database PLSQL table types are not supported. ■ Oracle Database PLSQL procedures with IN only REF CURSOR parameters are not supported. For an Oracle Database PLSQL procedure with REF CURSOR as an INOUT parameter, the Adapter Configuration Wizard ignores the IN and generates the strongly typed XSD based on the OUT parameter. ■ Referencing an element in the XSD using ref is not supported. Note: Functions are not supported for IBM DB2 UDB. Only SQL stored procedures are supported.