XMLType and CLOB

For full document retrieval and inserts is there a performance difference between declaring a XMLType or a simple CLOB database column type in table.
Thanks in advance.

I have a related question:
Is there any difference between using the XMLTYPE constructor function and using XMLTYPE.CREATEXML to convert a temporary CLOB to XMLTYPE?
I have the following in a PL/SQL function (simplified):
FUNCTION get_geocode_xml( p_geocodes IN CLOB) RETURN XMLTYPE IS
  r_geocodes XMLTYPE;
BEGIN
  r_geocodes := XMLTYPE.CREATEXML(p_geocodes);
  RETURN r_geocodes;
END;Is this the same as using the constructor as in
r_geocodes := XMLTYPE(p_geocodes);
It seems to work either way, but I've only extensively tested the first method.

Similar Messages

  • Oracle XMLType and clobs

    Hi,
    I've been struggling for days trying to figure out how to populate an XMLType
    field in Oracle 9i. I'm using the OracleThinDriver, WL 7.0, weblogic oracle extensions
    and a WL connection pool but to no avail.
    Has anyone done this? Is it possible? I keep getting an invalid LOB when I do
    a select on the XMLType field and cast it to a OracleThinClob type and attempt
    to write to it.
    Any help is much appreciated.
    Thx.
    Rachel

    We do not support XMLType oracle extension in 7.0. That feature is available from next
    major release(8.0?).
    Mitesh
    Rachel Hall wrote:
    Hi,
    I've been struggling for days trying to figure out how to populate an XMLType
    field in Oracle 9i. I'm using the OracleThinDriver, WL 7.0, weblogic oracle extensions
    and a WL connection pool but to no avail.
    Has anyone done this? Is it possible? I keep getting an invalid LOB when I do
    a select on the XMLType field and cast it to a OracleThinClob type and attempt
    to write to it.
    Any help is much appreciated.
    Thx.
    Rachel

  • Accessing XMLType and CLOB from Enterprise Java Beans

    When trying to create a temporary CLOB within the application server the following exception
    occurs (connection from Jndi):
    Oracle9iAS (9.0.2.0.0) Containers for J2EE initialized
    AccessEJBBean.meld: ex=java.lang.NullPointerException java.lang.NullPointerException      
    at oracle.sql.LobPlsqlUtil.plsql_createTemporaryLob(LobPlsqlUtil.java:1352)      
    at oracle.jdbc.dbaccess.DBAccess.createTemporaryLob(DBAccess.java:997)      
    at oracle.sql.LobDBAccessImpl.createTemporaryClob(LobDBAccessImpl.java:240)      
    at oracle.sql.CLOB.createTemporary(CLOB.java:527)      
    at com.access.impl.AccessEJBBean.meld(AccessEJBBean.java:67)      
    (email: [email protected] )

    When trying to create a temporary CLOB within the application server the following exception
    occurs (connection from Jndi):
    Oracle9iAS (9.0.2.0.0) Containers for J2EE initialized
    AccessEJBBean.meld: ex=java.lang.NullPointerException java.lang.NullPointerException      
    at oracle.sql.LobPlsqlUtil.plsql_createTemporaryLob(LobPlsqlUtil.java:1352)      
    at oracle.jdbc.dbaccess.DBAccess.createTemporaryLob(DBAccess.java:997)      
    at oracle.sql.LobDBAccessImpl.createTemporaryClob(LobDBAccessImpl.java:240)      
    at oracle.sql.CLOB.createTemporary(CLOB.java:527)      
    at com.access.impl.AccessEJBBean.meld(AccessEJBBean.java:67)      
    (email: [email protected] )

  • Using DB Adapter with XMLDB and CLOB

    Hi,
    with oracle xmldb i can store XMLs in lob or structured storage (s. Oracle® XML DB Developer's Guide 10g Release 2 (10.2) B14259-02).
    Now my question:
    If want to use a database adapter in the ESB to wake up several BPELs. Is there a functionality how i can transform such a clob into a XML where i can use XSLTs?
    The db adapter does only map each column to one xml-tag...
    If i try to use a table with xmltype the creation of a database adapter fails with:
    "some tables contain columns that are not recognized by the database adapter, so they will captured as strings:
    sys_nc_rowinfo$(sys.xmltype)
    change teh type of the above columns to that of the closest supported type...."
    Message was edited by:
    HEWizard

    Hi,
    To get it working you have to create an AQ-table with payload type xmltype. The xmltype payload data type is available on rdbms 10g and up. If you are on 9i or lower use raw data type. Create a queue inside the AQ-table. I'm not quite sure what's the best scenario for you to the queue with data, but I would imagine that you could create a database trigger on the table you're talking about and enqueue the xml-data (payload) to the AQ-table. Thus using the AQ-table as a staging table for the ESB system.
    Next, create an ESB system using an AQAdapter to dequeue the queue (like you did using a DBAdapter). The adapter can handle both single-user and multi-consumer queue's and all data types (raw, xmltype and object types).
    Messages are dequeued generally within a second after you commited the transaction.
    Kind regards,
    H

  • VC++ and CLOB

    Im using Oracle provider oledb version 8.1.7 and VC++ 6 are there any samples to insert CLOB type ,Please let me know

    Hi Jill,
    Welcome to the forum.
    There are easier methods to output XML to a file, rather than using line-by-line UTL_FILE operations.
    For example :
    DECLARE
    xml_result xmltype;
    doc        dbms_xmldom.DOMDocument;
    BEGIN
    xml_result := dbms_xmlgen.getXMLType('SELECT * FROM scott.dept');
    doc := dbms_xmldom.newDOMDocument(xml_result);
    dbms_xmldom.writeToFile(doc, 'TEST_DIR/my_file.xml', 'ISO-8859-1');
    dbms_xmldom.freeDocument(doc);
    END;
    /or,
    DECLARE
    xml_result xmltype;
    xml_prolog clob := '<?xml version="1.0" encoding="ISO-8859-1"?>'||chr(10);
    BEGIN
    xml_result := dbms_xmlgen.getXMLType('SELECT * FROM scott.dept');
    dbms_xslprocessor.clob2file(xml_prolog || xml_result.getClobVal(), 'TEST_DIR', 'my_file.xml');
    END;
    /Both will produce :
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <ROWSET>
      <ROW>
        <DEPTNO>10</DEPTNO>
        <DNAME>ACCOUNTING</DNAME>
        <LOC>NEW YORK</LOC>
      </ROW>
      <ROW>
        <DEPTNO>20</DEPTNO>
        <DNAME>RESEARCH</DNAME>
        <LOC>DALLAS</LOC>
      </ROW>
      <ROW>
        <DEPTNO>30</DEPTNO>
        <DNAME>SALES</DNAME>
        <LOC>CHICAGO</LOC>
      </ROW>
      <ROW>
        <DEPTNO>40</DEPTNO>
        <DNAME>OPERATIONS</DNAME>
        <LOC>BOSTON</LOC>
      </ROW>
    </ROWSET>Hope that helps.

  • BLOB and CLOB data in BI Publisher

    Hello,
    I have an XML file with blob and clob data in it. I am using BI desktop publisher to load the xml file and create the rtf template. I am getting the following error:
    ConfFile: C:\Program Files\Oracle\BI Publisher\BI Publisher Desktop\Template Builder for Word\config\xdoconfig.xml
    Font Dir: C:\Program Files\Oracle\BI Publisher\BI Publisher Desktop\Template Builder for Word\fonts
    Run XDO Start
    Template: C:\work\employee.rtf
    RTFProcessor setLocale: en-us
    FOProcessor setData: C:\work\employee.xml
    FOProcessor setLocale: en-us
    Do i need to install anything or am i missing any configuration to read the blob and clob? Please advise
    thanks

    Check this out, hopefully it'll help you
    http://oraclebizint.wordpress.com/2007/11/12/oracle-bi-ee-101332-working-with-clob-fields/
    Fiston

  • How to copy a table with LONG and CLOB datatype over a dblink?

    Hi All,
    I need to copy a table from an external database into a local one. Note that this table has both LONG and CLOB datatypes included.
    I have taken 2 approaches to do this:
    1. Use the CREATE TABLE AS....
    SQL> create table XXXX_TEST as select * from XXXX_INDV_DOCS@ext_db;
    create table XXXX_TEST as select * from XXXX_INDV_DOCS@ext_db
    ERROR at line 1:
    ORA-00997: illegal use of LONG datatype
    2. After reading some threads I tried to use the COPY command:
    SQL> COPY FROM xxxx/pass@ext_db TO xxxx/pass@target_db REPLACE XXXX_INDV_DOCS USING SELECT * FROM XXXX_INDV_DOCS;
    Array fetch/bind size is 15. (arraysize is 15)
    Will commit when done. (copycommit is 0)
    Maximum long size is 80. (long is 80)
    CPY-0012: Datatype cannot be copied
    If my understanding is correct the 1st statement fails because there is a LONG datatype in XXXX_INDV_DOCS table and 2nd one fails because there is a CLOB datatype.
    Is there a way to copy the entire table (all columns including both LONG and CLOB) over a dblink?
    Would greatelly appriciate any workaround or ideas!
    Regards,
    Pawel.

    Hi Nicolas,
    There is a reason I am not using export/import:
    - I would like to have a one-script solution for this problem (meaning execute one script on one machine)
    - I am not able to make an SSH connection from the target DB to the local one (although the otherway it works fine) which means I cannot copy the dump file from target server to local one.
    - with export/import I need to have an SSH connection on the target DB in order to issue the exp command...
    Therefore, I am looking for a solution (or a workaround) which will work over a DBLINK.
    Regards,
    Pawel.

  • Display BLOB and CLOB on browser

    Hi All.
    I need to display contents of BLOBs and CLOBs on the browser. They can be any docFlavour eg. .jpg, .gif, .pdf, .doc etc
    Is there some standard way of doing this ???
    If any all possible I would rather not use swing class because of its footprint and its slow performance over the net.

    Hi !
    Just in case anyone read this and is willing to comment on it...
    I have one BLOB and one CLOB column in the same record.
    I have been able to stream documents into and out of the BLOB's incl. MS .doc Also I have been able to get the content from BLOB and write it to a target directory.
    However I am having odd problems with CLOB, a simple text file. My servlet attempts to read the CLOB and does create the output file in the target directory, but does not copy the content over. It also returns 0 for clobLength !?! Here is the stub-code :
    ResultSet clobRS = thisStmt.executeQuery (
    "SELECT ATextMsg " +
    "FROM ... " +
    "WHERE ... " );
    clobRS.next();
    CLOB thisCLOB = ((OracleResultSet) clobRS).getCLOB("ATextMsg");
    int chunkSize = thisClob.getChunkSize();
    System.out.println("chunkSize is " + chunkSize); // default us 8132...
    char [] textBuffer = new char[chunkSize];
    String targetFile = targetDir + "retrieved_" + fileName;
    File thisFile = new File(targetFile); // it does create an empty target file...
    // read content as ASCII (text) content...
    FileOutputStream thisFileOutputStream = new FileOutputStream(thisFile);
    OutputStreamWriter thisWriter = new OutputStreamWriter(thisFileOutputStream);
    BufferedWriter thisBufferedWriter = new BufferedWriter(thisWriter);
    // things go wrong here, returns length of 0, why ?!?
    long clobLength = thisClob.length();
    System.out.println("clobLength is " + clobLength);
    // flush to targetFile - but since clobLength=0, nothing gets copied over...
    for (position=1; position<=clobLength; position+=chunkSize)
    int charsRead = thisClob.getChars(position, chunkSize, textBuffer);
    thisBufferedWriter.write(testBuffer);
    Since the clobLength is 0, obviously it will not copy from the database CLOB to the file.
    Manually change the clobLength = 8132, recompile and run, then it copies some junk to the targetFile, certainly not the textual data in the CLOB itself.
    The BLOB is fine...
    Can someone comment on this please and if possible, give me a hint on where I might have gone wrong with a simple text file ???

  • Xmltype and payload_factory

    Hello,
    I hope someone can help. Thanks
    I am trying to dequeue a XMLType msg.
    I am not having any luck, not much support that i could find on the web.
    I get the following error
    oracle.jms.AQjmsException: JMS-137: Payload factory must be specified for destinations with ADT payloads
    the erros accurs at the following line
    this.receiver = ((AQjmsSession)this.session).createReceiver(que[b]ue);
    So my question what kind of payload facotry do I specify, and how do I define it??
    For a custom sqldata type I do the following:
    I have a class that implemtns couple interface
    CBMessageDat implements CustomDatum, CustomDatumFactory
    then i do the following:
    this.receiver = ((AQjmsSession)this.session).createReceiver(queue, CBMessageDat.getFactory());
    This works fine
    Any help, code on how to dequeeu a xmltype would be great, thanks in advance.

    To answer my question for xmltype and payload_factory when using JMS
    This is what I needed to do
    ORADataFactory orad = XMLType.getORADataFactory();
    this.receiver = ((AQjmsSession)this.session).createReceiver(queue, orad);
    XMLType implements ORADataFactory interface, and has a static get for that member.

  • XMLType and Oracle JMS compatibility

    We need to receive messages from a Oracle-AQ queue with paylod_type XMLType,
    and we would like manage this with JMS and MDB using OC4J 10.1.3.
    Somebody know if is it possible to map such a queue as a JMS source or are there
    limitations to the specific SYS.AQ$_JMS_MESSAGE paylod_type?
    In the second case, what kind of workaround can we put in place? The XMLType is
    a must in our environment, so we have to manage it in some way...
    Thanks,
    Giorgio.

    We need to receive messages from a Oracle-AQ queue with paylod_type XMLType,
    and we would like manage this with JMS and MDB using OC4J 10.1.3.
    Somebody know if is it possible to map such a queue as a JMS source or are there
    limitations to the specific SYS.AQ$_JMS_MESSAGE paylod_type?
    In the second case, what kind of workaround can we put in place? The XMLType is
    a must in our environment, so we have to manage it in some way...
    Thanks,
    Giorgio.

  • Xmltype and validarion with xsd.

    Hi,
    How can I create a relation between a column (xmltype) and a xml schema (file.xsd) ?
    Thanks.

    You should create a schema based XMLType object using createSchemaBasedXML(), then validate it with schemaValidate()
    http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96616/arxml24.htm#1014214
    http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96616/arxml24.htm#1014272
    Also you may use XMLType's constructor to define a XSD, whether it must be validated and must be well formed.
    There lots of ways for storing, managing and developing with XML in oracle. java, c, pl/sql or xml/sql.
    Best Regards
    Erturk

  • Help required in handling of Oracle BLOB and CLOB in OC4J

    Hi,
    I am in a process of porting my application from Weblogic 6 to OC4J.
    I have problem while handling CLob and Blob's in oracle. Weblogic has
    classes defined to do the same. (weblogic.jdbc.common.OracleClob)
    Does any one know how I can achieve this.
    Thanks in advance.
    Regards,
    Moin

    We have an application running on OC4J accessing an Oracle 8.1.7 db, and have no problems using BLOBs and CLOBs. It is explained quite clearly in the Oracle documentation.
    If you require further assistance let me know :-)

  • Code for using thin client over connection pool to access blob and clob

    Hi,
    Currently I am running WL5.1SP12 with oracle thin client 8.1.7 to access blob
    and clob data. As the performance for concurrent users is very bad, I like to
    use the thin client over a connection pool to access the blob and clob instead.
    My question is whether this is possible and if so does anyone have a sample code?
    Thanks.
    This is urgent as the site has to roll out in 2 weeks..
    Rgd,
    Jason

    See http://e-docs.bea.com/wls/docs61/jdbc/thirdparty.html#1043705.
    "Jason" <[email protected]> wrote in message news:3eba851f$[email protected]..
    >
    Hi Stephen,
    Thanks for the reply. Can I confirm that what you are saying is that in release
    6.1 I am able to access blob/clob data via thin client over connection pool?
    Rgd.
    Jason
    "Stephen Felts" <[email protected]> wrote:
    Blob/clob support through the connection pool came in with release 6.1.
    "Jason" <[email protected]> wrote in message news:[email protected]..
    Hi,
    Currently I am running WL5.1SP12 with oracle thin client 8.1.7 to accessblob
    and clob data. As the performance for concurrent users is very bad,I like to
    use the thin client over a connection pool to access the blob and clobinstead.
    My question is whether this is possible and if so does anyone havea sample code?
    Thanks.
    This is urgent as the site has to roll out in 2 weeks..
    Rgd,
    Jason

  • Extracting data from XML using xmltype and extract

    Hello all,
    I want to write a pl/sql functions that takes a clob as an input and return a some data extracted from the data passed into it.
    the input will be an xml similar to the following:
    <FIXML xsi:schemaLocation="http://www.finacle.com/fixml executeFinacleScript.xsd" xmlns="http://www.finacle.com/fixml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <Header>
            <ResponseHeader>
                <RequestMessageKey>
                    <RequestUUID>IVR201306180841060310000000000000000</RequestUUID>
                    <ServiceRequestId>executeFinacleScript</ServiceRequestId>
                    <ServiceRequestVersion>10.3</ServiceRequestVersion>
                    <ChannelId>IVR</ChannelId>
                </RequestMessageKey>
                <ResponseMessageInfo>
                    <BankId>01</BankId>
                    <TimeZone></TimeZone>
                    <MessageDateTime>2013-06-18T05:36:55.918</MessageDateTime>
                </ResponseMessageInfo>
                <UBUSTransaction>
                    <Id/>
                    <Status/>
                </UBUSTransaction>
                <HostTransaction>
                    <Id/>
                    <Status>SUCCESS</Status>
                </HostTransaction>
                <HostParentTransaction>
                    <Id/>
                    <Status/>
                </HostParentTransaction>
                <CustomInfo/>
            </ResponseHeader>
        </Header>
        <Body>
            <executeFinacleScriptResponse>
                <ExecuteFinacleScriptOutputVO>
                    <executeFinacleScript_customData>
                        <DataCategory>ACC</DataCategory>
                        <New_Data>0001019300101001</New_Data>
                    </executeFinacleScript_customData>
                </ExecuteFinacleScriptOutputVO>
            </executeFinacleScriptResponse>
        </Body>
    </FIXML>'
    I want to extract the value of new_data.
    I wrote the following anonymous block to test the code :
    declare
    xparam xmltype;
    v_xpath varchar2(500);
    begin
    xparam:=xmltype('<FIXML xsi:schemaLocation="http://www.finacle.com/fixml executeFinacleScript.xsd"  xmlns="http://www.finacle.com/fixml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <Header>
            <ResponseHeader>
                <RequestMessageKey>
                    <RequestUUID>IVR201306180841060310000000000000000</RequestUUID>
                    <ServiceRequestId>executeFinacleScript</ServiceRequestId>
                    <ServiceRequestVersion>10.3</ServiceRequestVersion>
                    <ChannelId>IVR</ChannelId>
                </RequestMessageKey>
                <ResponseMessageInfo>
                    <BankId>01</BankId>
                    <TimeZone></TimeZone>
                    <MessageDateTime>2013-06-18T05:36:55.918</MessageDateTime>
                </ResponseMessageInfo>
                <UBUSTransaction>
                    <Id/>
                    <Status/>
                </UBUSTransaction>
                <HostTransaction>
                    <Id/>
                    <Status>SUCCESS</Status>
                </HostTransaction>
                <HostParentTransaction>
                    <Id/>
                    <Status/>
                </HostParentTransaction>
                <CustomInfo/>
            </ResponseHeader>
        </Header>
        <Body>
            <executeFinacleScriptResponse>
                <ExecuteFinacleScriptOutputVO>
                    <executeFinacleScript_customData>
                        <DataCategory>ACC</DataCategory>
                        <New_Data>0001019300101001</New_Data>
                    </executeFinacleScript_customData>
                </ExecuteFinacleScriptOutputVO>
            </executeFinacleScriptResponse>
        </Body>
    </FIXML>');
    v_xpath:='//New_Data/text()';-
    dbms_output.put_line(xparam.EXTRACT(v_xpath).GETSTRINGVAL());
    end;
    but I get the following Error:
    dbms_output.put_line(xparam.EXTRACT(v_xpath).GETSTRINGVAL());
    end;
    Error at line 1
    ORA-30625: method dispatch on NULL SELF argument is disallowed
    ORA-06512: at line 46
    the problem is that when I remove : xmlns="http://www.finacle.com/fixml" attribute from the root node the code works correctly.
    of course , I can simply use replace to remove it, but I want to know what is causing the error.
    I am using oracle database 10g

    Let me explain that the issue is not only related to Oracle.
    If you google a bit for default namespace and Xpath you will find many topic.
    Basically when you have an XML having a definition of namespace without a prefix:
    i.e.:
    <html xmlns="http://www.w3.org/1999/xhtml">
      <head>
        <title>Example XHTML document</title>
      </head>
      <body>
        <p>Sample content</p>
      </body>
    </html>
    this means that all unprefixed elements are belonging to this default namespace.
    In this case an Xpath equal to '//title/text()' will not get anything because it is assuming to find the element title within a null namespace. But title in this case is automatically assigned to the default namespace.
    When you specify a prefix in a namespace then all elements without prefix are associated to namespace NULL. Using a default namespace is causing a lot of headache.
    These links can be giving a clearer picture:
    http://www.edankert.com/defaultnamespaces.html
    Assuming that you have data like this:
    WITH mydata AS
    (   SELECT '
    <html xmlns="http://www.w3.org/1999/xhtml">
      <head>
        <title>Example XHTML document</title>
      </head>
      <body>
        <p>Sample content</p>
      </body>
    </html>' xmldata FROM DUAL
    SELECT xmltype (xmldata).EXTRACT ('//title/text()').getstringval ()
      FROM mydata;
    This query will not give anything back to you. You will have to specify:
    SELECT xmltype (xmldata).EXTRACT ('//title/text()', 'xmlns="http://www.w3.org/1999/xhtml"').getstringval ()
      FROM mydata;
    Note also that you should be able to get the default namespace when it is specified (without prefix) by using:
    SELECT xmltype(xmldata).getnamespace() from mydata;
    Post your Oracle version to see if it something related to your version. In mine I got this:
    SQL*Plus: Release 11.2.0.1.0 Production on Thu Jun 20 18:32:58 2013
    Copyright (c) 1982, 2010, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> WITH mydata AS
      2  (   SELECT '
      3  <html xmlns="http://www.w3.org/1999/xhtml">
      4    <head>
      5      <title>Example XHTML document</title>
      6    </head>
      7    <body>
      8      <p>Sample content</p>
      9    </body>
    10  </html>' xmldata FROM DUAL
    11  )
    12  SELECT xmltype(xmldata).getnamespace() from mydata;
    XMLTYPE(XMLDATA).GETNAMESPACE()
    http://www.w3.org/1999/xhtml
    SQL>
    If this would work, then it would be enough to add the optional additional parameter namespace. In case it is null it will be set as xmlsn="" and it will work anyway:
    Please note that it will work both if the XML has a default namespace or not
    i.e.:
    with default namespace:
    SQL> DECLARE
      2     xparam         XMLTYPE;
      3     v_xpath        VARCHAR2 (500);
      4     v_ns           VARCHAR2 (500);
      5  BEGIN
      6     xparam :=
      7        xmltype ('
      8  <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ns="http://www.w3.org/1999/xhtml" >
      9    <head>
    10      <title>Example XHTML document</title>
    11    </head>
    12    <body>
    13      <p>Sample content</p>
    14    </body>
    15  </html>');
    16     v_xpath := '//title/text()';
    17     v_ns := 'xmlns="' || xparam.getnamespace () || '"';
    18     DBMS_OUTPUT.
    19      put_line (
    20        'Value of title:' || xparam.EXTRACT (v_xpath, v_ns).getstringval ());
    21  END;
    22  /
    Value of title:Example XHTML document
    PL/SQL procedure successfully completed.
    SQL>
    and without default namespace
    SQL> DECLARE
      2     xparam         XMLTYPE;
      3     v_xpath        VARCHAR2 (500);
      4     v_ns           VARCHAR2 (500);
      5  BEGIN
      6     xparam :=
      7        xmltype ('
      8  <html xmlns:ns="http://www.w3.org/1999/xhtml" >
      9    <head>
    10      <title>Example XHTML document</title>
    11    </head>
    12    <body>
    13      <p>Sample content</p>
    14    </body>
    15  </html>');
    16     v_xpath := '//title/text()';
    17     v_ns := 'xmlns="' || xparam.getnamespace () || '"';
    18     DBMS_OUTPUT.
    19      put_line (
    20        'Value of title:' || xparam.EXTRACT (v_xpath, v_ns).getstringval ());
    21  END;
    22  /
    Value of title:Example XHTML document
    PL/SQL procedure successfully completed.
    Regards.
    Al
    Message was edited by: AlbertoFaenza
    IF removed as it is working anyway.

  • Aq Adapter ( ESB ) and CLOB payload

    I have a AQ adapter which consists of the following payload :
    CREATE OR REPLACE TYPE "XML_CLOB_TYPE" AS OBJECT
    (XML CLOB
    I've added an AQ adapter in ESB which enqueues messages to this specific queue. I've got a certain payload ( in XML format ) that I want to enqueue in this queue. When I add a routing rule to the routing service and create a XLST mapper I can only see XML as the target attribute. which is quite obvious as this is the defined type.
    Is there an easy way to enqueue a full XML message into this CLOB? Or is the possibility to escape all the < and > signs in my xsl like this?
    <xsl:template match="/">
    <obj1:XML_CLOB_TYPE>
    <XML>
    &lt ; test &gt ;
    <xsl:value-of select="/imp1:transacties/imp1:transactie/imp1:brokerid"/>
    &lt ;/ test &gt ;
    </XML>
    </obj1:XML_CLOB_TYPE>
    </xsl:template>
    the above method works but is cumbersome and (IMHO) quite ugly.
    anyone has a better working solution?
    TIA
    updated escaping
    Message was edited by:
    Martin.Kleinman
    updated escaping.
    Message was edited by:
    Martin.Kleinman

    Hi Martin-
    I am facing a similar issue. Here is the details, please let me know how you resolved it.
    We have created an AQ in Oracle DB which will have the following message Structure:
    CREATE OR REPLACE TYPE enqueue_payload AS OBJECT
    ( field1 VARCHAR2(100),
    field2 VARCHAR2(100),
    field3 DATE,
    field4 VARCHAR2(100),
    field5 NUMBER,
    payload CLOB,
    In the Payload field we are enqueing an XML message.
    We have to use a OSB proxy service to dequeue the message from the AQ, transform it to another format and send to a SOA Composite.
    We created a AQ Adapter in Jdeveloper 11g and imported the WSDL, XSD and .jca jca binding file into the OSB project. And configured the OSB proxy service using the WSDL imported.
    However in OSB proxy service message flow when I try to create an XQUERY transformation, I see that the Payload field does not expose the structure of the XML message that is being enqueued. I even changed the message structure definition to have the payload field as XMLType. But it didn't help.
    On analyzing the XSD created by AQ Adapter, I see that the payload is being defined as "string" in the XSD.
    Inputs Needed
    =========
    1. How can we parse the payload field defined as CLOB/XMLType in OSB so that I can see the structure of the XML message it holds ?
    2. Is there any in-built function in OSB to convert it to XML ?
    3. Any other inputs in order to transform the XML message coming in the payload field as CLOB/XMLType
    Please provide your inputs and I hope that I have clearly explained my use case.
    Thanks in advance for your time and help!!
    Regards,
    Dibya

Maybe you are looking for

  • ResultSet problem with a jdbc connection pool implementation

    Hi I'm trying to use jdbc connection pool in my java application (js2e 1.4.0_01) from the example at http://www.developer.com/tech/article.php/626141 In my main() code, in addition to JDBCConnection, JDBCConnectionImpl and JDBCPool classes, i use JDB

  • Set preview as default in mountain lion

    I've tried using command + i  or control click to bring up the get info box to reset open with to preview but I just get a general info box with 5 tabs that do not seem to have this option. I tried uninstalling Schubert but the plug in is not in the

  • Images save blurry

    Hi, first off let me begin by saying no, it's not a problem with firmware 2.2, because I'm using firmware 2.1. Secondly, no, updating to firmware 2.2 will not fix this problem as most people with this problem are using firmware 2.2. The problem is wh

  • Testversion of elements12, remove watermark

    Hello, I'm trying out the testversion of elements 12. It seems like a great software and I think I'll buy it after some tryouts. Question: If i create a project in the testversion it will carry a watermark saying this is only the testversion of eleme

  • Internet Explorer crashes occasionally

    Hello, I currently have the problem that on one of my clients the Internet Explorer is crashing without a clear cause. Here's the eventlog entry: Name der fehlerhaften Anwendung: iexplore.exe, Version: 11.0.9600.17207, Zeitstempel: 0x53a20d78 Name de