Hi Folks,

I am using the Ibatis mapping tool for long and want to map XmlType from Oracle.
I registerd the XMLTypeHandlerCallbackand the system is running into the 
getResult Method
returning the UnsupportedOperationException  error:

if (getter.getResultSet() instanceof OracleResultSet) {
                        OPAQUE opaqueValue = getOpaqueValue(getter);
                        if (opaqueValue != null) {
                                XMLType xmlResult = 
XMLType.createXML(opaqueValue);
                                return xmlResult.getDOM();
                        } else {
                                return (Document) null;
                        }
                } else {
                        throw new UnsupportedOperationException(
                                        "XMLType mapping only supported for 
Oracle RDBMS");
}

Has anyone out there running example with the mapping and Object ?

I am using "SELECT 1 as id, xmlelement("Flat", xmlattributes(z.floors ..... "

With:

        <resultMap id="houseResult" class="houseData">
                <result property="id" column="id" />
                <result property="xmlValue" column="xmlValue"/>
        </resultMap>

        <select id="getHouseXML"
                resultMap=" houseResult "> select ...

and:

import org.w3c.dom.Document;

public class House {

        private Integer id;

        private Document xmlValue;

        public Document getXmlValue() {
                return xmlValue;
        }

        public void setXmlValue(Document xmlValue) {
                this.xmlValue = xmlValue;
        }

        public Integer getId() {
                return id;
        }

        public void setId(Integer id) {
                this.id = id;
        }

}


Thx a lot

Timo Schnölzer

Reply via email to