Creating hierarchical XML from MS SQL

Hello,
I am trying to create a hierarchical XML from MS SQL database. I have got a SQL running:
select distinct
1 as Tag,
NULL as Parent,
X_SEQ_NUM as [Invoice!1!Invoice_Num!element],
COALESCE(INV.ADJUSTMENT_AMT,0) as [Invoice!1!Adjusted_Total!element],
Null as [Item!2!CostedAccrual!element],
Null as [Item!2!QuotAcc!element],
Null as [Item!2!Prod_Name!element]
from S_INVOICE INV
inner join S_INVOICE_ITEM ITEM on (ITEM.INVOICE_ID = INV.ROW_ID)
inner join S_PROD_INT PROD on (PROD.ROW_ID = ITEM.PROD_ID)
where
INV.X_TAX_POINT_DT between '2010-02-01' and '2010-02-15'
and (PROD.X_FREIGHT_FLG = 'Y' or PROD.X_INT_PROD_FLAG = 'Y')
and X_SEQ_NUM = '1066505'
UNION ALL
select distinct
2 as Tag,
1 as Parent,
INV.X_SEQ_NUM ,
COALESCE(INV.ADJUSTMENT_AMT,0),
     COALESCE(ITEM.X_UNIT_PRI,0) as CostedAccrual, --costed accrual
     COALESCE(ITEM.X_QUOTED_AMT,0)/ITEM.X_EXCHANGE_RATE as QuotAcc,
     PROD.NAME as Prod_Name
from S_INVOICE INV
inner join S_INVOICE_ITEM ITEM on (ITEM.INVOICE_ID = INV.ROW_ID)
inner join S_PROD_INT PROD on (PROD.ROW_ID = ITEM.PROD_ID)
where
INV.X_TAX_POINT_DT between '2010-02-01' and '2010-02-15'
and (PROD.X_FREIGHT_FLG = 'Y' or PROD.X_INT_PROD_FLAG = 'Y')
and X_SEQ_NUM = '1066505'
ORDER by 3, 7
for XML EXPLICIT
( we are on a siebel created db)
and I get the following
<?xml version="1.0" encoding="UTF-8" ?>
- <ROWSET>
- <ROW>
- <XML_F52E2B61-18A1-11d1-B105-00805F49916B>
- <Invoice>
<Invoice_Num>1066505</Invoice_Num>
<Adjusted_Total>220.0000000</Adjusted_Total>
- <Item>
<CostedAccrual>200.0000000</CostedAccrual>
<QuotAcc>0.00000000000000000000000</QuotAcc>
<Prod_Name>Third Party Services</Prod_Name>
</Item>
</Invoice>
</XML_F52E2B61-18A1-11d1-B105-00805F49916B>
</ROW>
</ROWSET>
(Apologies for the lack of outlining)
My question is about the the line "XML_F52E...." as it isn't right and I'm not sure how to proceed.
Any thoughts?
Thank you in advance.
Richard

Hi Richard,
Not sure, if i got it correctly.
You are talking abt the element name ?
then, always give meaningful short name to columns in the query.

Similar Messages

  • Creating web service from pl/sql procedure

    Hello.
    I need to create a web service from pl/sql procedure and i chose JDeveloper for this implementation. I have wsdl, but I never created web services. So, I created web service with document/literal message format.
    But I have several troubles:
    1. All element names have lower case letters.
    2. The SOAP envelope must begin from words soapenv:Envelope but i have soap:Envelope.
    3. And operation name has tail like "Element".
    I know bad way for implement 1 and 3 points. It's a modification of java_wsdl_mapping.xml and wsdl files. But if I want to add new method to my service all changes will be cleaned. It's not critical but inconvenient to support.
    But for point 3 i have no ideas.
    This task is very important for me. Can somebody help me?
    JDeveloper 10.1.3.3
    Regards,
    Aleksey

    http://www.oracle.com/technology/obe/obe1013jdev/10131/wsfromplsqlpackage/devwsfrom%20plsql.htm
    Frank

  • Support for Creating Web Service from pl/sql package in JDeveloper 11

    We have been creating all of our web services from pl/sql packages in our Oracle database using JDeveloper 10.1.3.1. I understand that this capability is not supported in Jdev 11. We have been mandated to either move up to JDeveloper 11, or consider switching to eclipse, or even VS2008 and run .NET services from IIS. I have seen work-around solutions using TopLink and Jdev 11. Are there plans to revive this feature in the near future? We're now looking at switching to .NET since we could scrap our OAS instances and use IIS to publish web services. The only reason we were sticking with Oracle was the ease in converting all our existing package to web services with Jdev.
    Is anyone else in the same situation. If so, what solutions are you considering?

    Hi,
    there are a lot of option to make plsql web services .
    First you can stay with jdev 10.1.3
    Use the xmldb servlets
    use jdev 11g tp4 to create plsql ws and upgrade to jdev 11g production
    And I think in the next release of jdev it will be back , there are more options which disappeared like the adf bc sdo ws or jmx datacontrol etc.
    thanks Edwin

  • How to create an xml from xsd in abap

    HI Experts,
       i want to create an xml file from xsd and i want to validate an xml file against an xds.is this possible in abap.if it is possible can any one give me an sample code
    for this one.
    how to create an xml file in abap.i have seen so many blogs which parses the xml file but i didn't get blog for creating an xml file.how can we do that one.
    any suggestions will be appriciated
    thanks in advance
    With Regards
    Naidu

    HI
    GOOD
    IT IS POSSIBLE IN ABAP
    Extensible Markup Language (XML) is a simple, very flexible text format derived from SGML (ISO 8879). Originally designed to meet the challenges of large-scale electronic publishing, XML is also playing an increasingly important role in the exchange of a wide variety of data on the Web and elsewhere.
    XSD->
    XML Schemas express shared vocabularies and allow machines to carry out rules made by people. They provide a means for defining the structure, content and semantics of XML documents. in more detail.
    XDS->
    XDS can process data images from CCD-, imaging-plate, and multiwire-detectors in a variety of formats. Detector specific Input file templates greatly simplify the use of XDS; they are provided as part of the documentation.
    XDS runs under Unix or Linux on a single server or a grid of up to 99 machines of the same type managed by the MOSIX system; in addition, by using OpenMP, it can be executed in parallel on up to 32 processors at each node that share the same address space.
    http://www2.stylusstudio.com/SSDN/default.asp?action=9&fid=23&read=2926
    /people/r.eijpe/blog/2006/02/19/xml-dom-processing-in-abap-part-iiia150-xml-dom-within-sap-xi-abap-mapping
    THANKS
    MRUTYUN

  • Creating PDF documents from PL/SQL

    I would like to know if there is a way to create dynamic PDF documents from PL/SQL procedures using OWA replacement cartridge?
    null

    I would like to know if there is a way to create dynamic PDF documents from PL/SQL procedures using OWA replacement cartridge?
    null

  • Creating Excel Workbook from PL/SQL Procedure

    I am trying to create Excel Workbook with two worksheets from PL/SQL procedure. I created one worksheet. Can I create a separate sheet from same procedure. I used OWA_UTIL.MIME_HEADER ('application/vnd.ms-excel', FALSE)
    command to create the spreadsheet.
    Any help would be helpful.
    Thanks
    Yagna Shah

    Further to my previous post here is how I will develop a typical master details excel report.
    by using the package,
    It will also show sum of salary at each department.
    Note : When I paste the code here I loose the indentation. So the code below is not indented properly.
    DECLARE
    r NUMBER := 0 ; --- r IS the ROW NUMBER IN this excel file
    l_sum NUMBER ;
    BEGIN
    --- Generate the styles that we need
    gen_xl_xml.create_excel( 'UTL_DIR','master_Detail.xls') ;
    gen_xl_xml.create_style( 'dept_title' , 'Arial', 'Red',14, p_backcolor => 'LightGray' );
    gen_xl_xml.create_style( 'sgs2' , 'Arial', NULL ,10, p_bold => TRUE );
    gen_xl_xml.create_style( 'sgs3' , 'Arial', 'blue',14 );
    gen_xl_xml.create_style( 'sgs4' , 'Arial', 'green',14 );
    gen_xl_xml.create_style( 'emp_title' , 'Arial', 'Black',9, p_backcolor => 'LightBlue' );
    gen_xl_xml.create_style( 'sal_tot' , 'Arial', 'Brown',13, p_backcolor => 'Yellow' );
    -- SET ANY COLUMN AND ROW changes
    gen_xl_xml.set_column_width( 3, 145 );
    gen_xl_xml.set_column_width( 4, 145 );
    l_sum := 0 ;
    FOR recd IN ( SELECT department_id, department_name FROM departments ) LOOP
    IF l_sum <> 0 THEN
    r := r +1 ;
    gen_xl_xml.write_cell_char( r, 4, 'Department Total ->' , 'sal_tot' );
    gen_xl_xml.write_cell_num( r, 5, l_sum , 'sal_tot' );
    l_sum := 0;
    END if ;
    r := r+1 ;
    gen_xl_xml.write_cell_CHAR( r,1, 'Department : '|| recd.department_name , 'dept_title' );
    -- As we need same style applied till the above data flows use write_cell_null
    gen_xl_xml.write_cell_NULL( r,2 , null );
    gen_xl_xml.write_cell_NULL( r,3, 'dept_title' );
    gen_xl_xml.write_cell_NULL( r,4, 'dept_title' );
    gen_xl_xml.write_cell_NULL( r,5, 'dept_title' );
    --- Add employee heading
    r := r+1 ;
    gen_xl_xml.write_cell_CHAR( r,2, 'EmployeeID' , 'emp_title' );
    gen_xl_xml.write_cell_CHAR( r,3, 'First Name' , 'emp_title' );
    gen_xl_xml.write_cell_CHAR( r,4, 'Last Name' , 'emp_title' );
    gen_xl_xml.write_cell_CHAR( r,5, 'Salary' , 'emp_title' );
    FOR rec IN (SELECT employee_id , first_name , last_name, salary FROM employees WHERE department_id = recd.department_id ) LOOP
    r := r+1 ;
    gen_xl_xml.write_cell_num( r,2, rec.employee_id, 'sgs2' );
    gen_xl_xml.write_cell_char( r,3, rec.first_name, 'sgs3' );
    gen_xl_xml.write_cell_char( r,4, rec.last_name , 'sgs4' );
    gen_xl_xml.write_cell_num( r,5, rec.salary );
    l_sum := l_sum + rec.salary ;
    END LOOP ;
    END LOOP ;
    gen_xl_xml.close_file ;
    END ;
    -----------------------------------------------------------------------------------------------------------------

  • To Create an XML from a java Bean

    I have a java class( a bean ) wih a number of properties. I need to create an xml file which is closely tied with the bean. How can I do it?

    Search the web there's stuff out there that can do this for you

  • Creating excel sheet from pl/sql

    Hi,
    I need to generate an excel sheet and write the result of a query into it from pl/sql .
    Is it possible?
    any idea pls.
    cheers
    RRK

    You can use the following method --
    Write the following code in the emp.sql
    set serveroutput on
    set verify off
    set feedback off
    set long 400000
    set pagesize 0
    set lin 1000
    set markup html on spool on
    spool c:\Emp.xls
    select     *
    from emp;
    spool off
    set markup html off spool off
    set verify on
    set feedback onAnd, then run it with the following command and see-
    satyaki>
    satyaki>select * from v$version;
    BANNER
    Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
    PL/SQL Release 9.2.0.6.0 - Production
    CORE    9.2.0.6.0       Production
    TNS for IBM/AIX RISC System/6000: Version 9.2.0.6.0 - Production
    NLSRTL Version 9.2.0.6.0 - Production
    satyaki>
    satyaki>
    satyaki>@C:\emp.sql;
    <p>
    <table border='1' width='90%' align='center' summary='Script output'>
    <tr>
    <th scope="col">
    EMPNO
    </th>
    <th scope="col">
    ENAME
    </th>
    <th scope="col">
    JOB
    </th>
    <th scope="col">
    MGR
    </th>
    <th scope="col">
    HIREDATE
    </th>
    <th scope="col">
    SAL
    </th>
    <th scope="col">
    COMM
    </th>
    <th scope="col">
    DEPTNO
    </th>
    </tr>
    <tr>
    <td align="right">
          7369
    </td>
    <td>
    SMITH
    </td>
    <td>
    CLERK
    </td>
    <td align="right">
          7902
    </td>
    <td>
    17-DEC-80
    </td>
    <td align="right">
           800
    </td>
    <td align="right">
    </td>
    <td align="right">
            20
    </td>
    </tr>
    <tr>
    <td align="right">
          7499
    </td>
    <td>
    ALLEN
    </td>
    <td>
    SALESMAN
    </td>
    <td align="right">
          7698
    </td>
    <td>
    20-FEB-81
    </td>
    <td align="right">
          1600
    </td>
    <td align="right">
           300
    </td>
    <td align="right">
            30
    </td>
    </tr>
    <tr>
    <td align="right">
          7521
    </td>
    <td>
    WARD
    </td>
    <td>
    SALESMAN
    </td>
    <td align="right">
          7698
    </td>
    <td>
    22-FEB-81
    </td>
    <td align="right">
          1250
    </td>
    <td align="right">
           500
    </td>
    <td align="right">
            30
    </td>
    </tr>
    <tr>
    <td align="right">
          7566
    </td>
    <td>
    JONES
    </td>
    <td>
    MANAGER
    </td>
    <td align="right">
          7839
    </td>
    <td>
    02-APR-81
    </td>
    <td align="right">
          2975
    </td>
    <td align="right">
    </td>
    <td align="right">
            20
    </td>
    </tr>
    <tr>
    <td align="right">
          7654
    </td>
    <td>
    MARTIN
    </td>
    <td>
    SALESMAN
    </td>
    <td align="right">
          7698
    </td>
    <td>
    28-SEP-81
    </td>
    <td align="right">
          1250
    </td>
    <td align="right">
          1400
    </td>
    <td align="right">
            30
    </td>
    </tr>
    <tr>
    <td align="right">
          7698
    </td>
    <td>
    BLAKE
    </td>
    <td>
    MANAGER
    </td>
    <td align="right">
          7839
    </td>
    <td>
    01-MAY-81
    </td>
    <td align="right">
          2850
    </td>
    <td align="right">
    </td>
    <td align="right">
            30
    </td>
    </tr>
    <tr>
    <td align="right">
          7782
    </td>
    <td>
    CLARK
    </td>
    <td>
    MANAGER
    </td>
    <td align="right">
          7839
    </td>
    <td>
    09-JUN-81
    </td>
    <td align="right">
          2450
    </td>
    <td align="right">
    </td>
    <td align="right">
            10
    </td>
    </tr>
    <tr>
    <td align="right">
          7788
    </td>
    <td>
    SCOTT
    </td>
    <td>
    ANALYST
    </td>
    <td align="right">
          7566
    </td>
    <td>
    19-APR-87
    </td>
    <td align="right">
          3000
    </td>
    <td align="right">
    </td>
    <td align="right">
            20
    </td>
    </tr>
    <tr>
    <td align="right">
          7839
    </td>
    <td>
    KING
    </td>
    <td>
    PRESIDENT
    </td>
    <td align="right">
    </td>
    <td>
    17-NOV-81
    </td>
    <td align="right">
          5000
    </td>
    <td align="right">
    </td>
    <td align="right">
            10
    </td>
    </tr>
    <tr>
    <td align="right">
          7844
    </td>
    <td>
    TURNER
    </td>
    <td>
    SALESMAN
    </td>
    <td align="right">
          7698
    </td>
    <td>
    08-SEP-81
    </td>
    <td align="right">
          1500
    </td>
    <td align="right">
             0
    </td>
    <td align="right">
            30
    </td>
    </tr>
    <tr>
    <td align="right">
          7876
    </td>
    <td>
    ADAMS
    </td>
    <td>
    CLERK
    </td>
    <td align="right">
          7788
    </td>
    <td>
    23-MAY-87
    </td>
    <td align="right">
          1100
    </td>
    <td align="right">
    </td>
    <td align="right">
            20
    </td>
    </tr>
    <tr>
    <td align="right">
          7900
    </td>
    <td>
    JAMES
    </td>
    <td>
    CLERK
    </td>
    <td align="right">
          7698
    </td>
    <td>
    03-DEC-81
    </td>
    <td align="right">
           950
    </td>
    <td align="right">
    </td>
    <td align="right">
            30
    </td>
    </tr>
    <tr>
    <td align="right">
          7902
    </td>
    <td>
    FORD
    </td>
    <td>
    ANALYST
    </td>
    <td align="right">
          7566
    </td>
    <td>
    03-DEC-81
    </td>
    <td align="right">
          3000
    </td>
    <td align="right">
    </td>
    <td align="right">
            20
    </td>
    </tr>
    <tr>
    <td align="right">
          7934
    </td>
    <td>
    MILLER
    </td>
    <td>
    CLERK
    </td>
    <td align="right">
          7782
    </td>
    <td>
    23-JAN-82
    </td>
    <td align="right">
          1300
    </td>
    <td align="right">
    </td>
    <td align="right">
            10
    </td>
    </tr>
    <tr>
    <td align="right">
          9898
    </td>
    <td>
    Erwin
    </td>
    <td>
    Adventur
    </td>
    <td align="right">
          7369
    </td>
    <td>
    17-AUG-07
    </td>
    <td align="right">
          5000
    </td>
    <td align="right">
           230
    </td>
    <td align="right">
            20
    </td>
    </tr>
    <tr>
    <td align="right">
          7006
    </td>
    <td>
    Gopal
    </td>
    <td>
    Player
    </td>
    <td align="right">
          7369
    </td>
    <td>
    17-AUG-07
    </td>
    <td align="right">
          5000
    </td>
    <td align="right">
           230
    </td>
    <td align="right">
            20
    </td>
    </tr>
    </table>
    <p>
    satyaki>Regards.
    Satyaki De.

  • Generate Valid XML from pl/sql

    Hi,
    A new-bee here. I want to know how to generate a valid xml document. I have a schema which by the way includes two other schemas. This is the code I am using but I don't know how to make sure that I insert the child nodes in the right sequence. Any sample code that you guys can provide would be greatly appreciated.
    FUNCTION GenerateOrderXML(
              o_ErrorCode     OUT     NUMBER,
              o_ErrorText     OUT     VARCHAR2,
              i_AccountID     IN     document.documentid%TYPE,
              i_OrderName IN VARCHAR2) RETURN XMLType
    IS
         v_Doc     XMLDOM.DOMDocument;
         v_MainNode     XMLDOM.DOMNode;
         v_RootElmt     XMLDOM.DOMElement;
         v_RootNode     XMLDOM.DOMNode;
         v_TmpCLOB     CLOB := ' ';
    CURSOR CURSOR_SERVOBJ
              IS
              SELECT XMLTAG, XMLVALUE FROM SERVICEOBJECT
                   WHERE SERVICEOBJECT.ID < 500
                   ORDER BY SEQUENCE;
    -- Create xml root element
         v_Doc := XMLDOM.newDOMDocument;
         v_MainNode := XMLDOM.makeNode(v_Doc);
         v_RootElmt := XMLDOM.createElement(v_Doc, 'OrderRequest');
         v_RootNode := XMLDOM.appendChild(v_MainNode, XMLDOM.makeNode(v_RootElmt));
         -- Add OrderName, OrderType
         AddChild(v_Doc, v_RootNode, 'orderName', i_OrderName);
         AddChild(v_Doc, v_RootNode, 'orderType', 'NA');
         -- Add all attributes
         FOR v_NameValue IN CURSOR_SERVOBJ
         LOOP
              AddChild(v_Doc, v_RootNode, v_NameValue.XMLTAG, v_NameValue.XMLVALUE);
         END LOOP;
         --     XMLDOM.writeToBuffer(v_Doc, v_Buffer);
         XMLDOM.writeToClob(v_Doc, v_TmpCLOB);
         o_ErrorCode := 0;
         RETURN XMLType.createXML(v_TmpClob);
    END;

    The r was a typo. The messge is correct.
    Here is another problem I am having. I can't import a schema that includes another schema. When I try to register the third schema I get the following error. The first two register without any errors and when I run this
    select schema_url from user_xml_schemas;
    I see
    http://www.bbc.com/XMLSchema/sfi.xsd
    http://www.bbc.com/XMLSchema/ProductModel.xsd
    So why is my third schema not importing? Can you point me to any good documentation/tutorials on XML DB.
    Note: Thank you for your help so far.
    ERROR at line 1:
    ORA-31000: Resource 'ProductModel.xsd' is not an XDB schema document
    ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 0
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 26
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 131
    ORA-06512: at line 6
    1st Schema Heading
    <xsd:schema xmlns="http://www.bbc.com/XMLSchema/bfi.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.bbc.com/XMLSchema/bfi.xsd" elementFormDefault="qualified">
    2nd Schema Heading
    <xsd:schema xmlns="http://www.bbc.com/XMLSchema/ProductModel.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.bbc.com/XMLSchema/ProductModel.xsd" elementFormDefault="qualified">
    3rd Schema Heading
    <xsd:schema xmlns="http://www.bbc.com/XMLSchema/ResourceOrder.xsd" xmlns:qb="http://www.bbc.com/XMLSchema/ProductModel.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.bbc.com/XMLSchema/ResourceOrder.xsd" elementFormDefault="qualified">
    <xsd:import namespace="http://www.bbc.com/XMLSchema/ProductModel.xsd" schemaLocation="ProductModel.xsd"/>

  • Creating page items from pl/sql procedure and using them on a page

    I have a page containing 2 select lists (P21_DEPARTMENTS and P21_DATE). Originally I added them as items that were "select list with submits". The problem is that based on the clearance level of the currently logged on user I only wanted the P21_DEPARTMENTS to be a select list if the user was an administrator. If however the user is not an admin then I want the page to have a hidden form field called P21_DEPARTMENTS that stores the user's department and has a label item that has the department name.
    There is also a report region that generates a table based on the department selected from the select list (if the user is an admin) or the value stored in the hidden form field if the user is not.
    My problem is that I cannot have both those items on the same page and use the HTML built-in authentication to determine which item should be rendered because I need to use the same ID for both items so that the stored procedure in my report region doesn't break. HTML does not permit items to share the same ID.
    I tried to circumvent the problem by creating a stored procedure that performs all of the item rendering in the procedure and uses "htp.p()" to output all of my HTML code. This solution would allow me to pass a parameter into the procedure informing me as to whether or not the user is an administrator. If the user is an administrator the procedure would use a conditional statement and render a select list. If not, the hidden form field and label option would be used instead.
    I finally got the stored procedure working perfectly. Now I am encountering the most bizarre thing. Since the "select list with submit" was not working (I used the same code that gets generated when I created other items using htmlDB's GUI) I decided to use a JavaScript function instead that gets triggered by the onChange event. I send along the value that is currently selected in the select list and in the function I set:
    location.href='http://www.myoraclesite.com/pls/htmldb/f?p=111:21:729740000000000000::NO::P21_DEPARTMENTS:1';
    In theory this should work. The problem is that it doesn't. The page reloads and the P21_DEPARTMENTS select list is not pre-selected.
    The only thing I can think of is that when htmlDB generates page items that you've created with it's own admin tool it assigns some internal guid or something as opposed to when someone tries to generate dynamic page items of their own from a pl/sql procedure it's like the application doesn't even know they exist.
    Any help would be GREATLY appreciated.
    My only other solution would be to create a totally separate page (one for admin and another for non-admin). I would really like to avoid this.
    Thanks in advance.

    I would love to be able to generate my menus and
    various other items in my htmlDB applications in much
    the same way I can using ASP, PHP and Cold Fusion.
    Users should have the ability to write server-side
    code wherever they feel like it. The way htmlDB works
    right now I spend more time trying to figure out how
    to create simple effects and generate simple
    interfaces when I need to be building a portal. Ami - it's important to understand that HTML DB is not like other languages. Thus, trying to force concepts which are common in other languages into HTML DB will often result in more work.
    It's definitely worth the time to go over the HTML DB 2-day Developer, which can be found here: http://www.oracle.com/technology/products/database/htmldb/pdf/B14377_01.pdf
    I can build a portal using Classic ASP, C#, PHP or Cold
    Fusion in like 1/10 of the time that it takes me to
    build one using htmlDB. I understand that this is not
    meant for the hard-core programmer but no web
    programming application in today's day and age should
    prevent experts from getting under the hood.And I can build a Portal in HTML DB in 1/10 the time it will take me to do it in any other language. It's like anything else - proficiency comes with practice and work.
    As for getting under the hood, there is plenty of places you can do that with HTML DB. Keep in mind that HTML DB itself is an HTML DB application, so the limits on what you can build with HTML DB are virtually limitless.
    Sorry for the vent there. After spending the last 2
    days trying to figure out how to implement such a
    straightforward thing and now being informed that it
    can't be done kind of bugged me.I understand your frustration, as I've been there before. My rule for beginners is that if you are writing more than a line or two of code in the first week, you're doing something wrong. Stop, take a break, and then use the ample resources (including searching this forum) to help solve your problem. There are plenty of resources available for you to learn about HTML DB on the HTML DB home page: http://otn.oracle.com/htmldb
    Good luck,
    - Scott -

  • Creating a webservice from PL/SQL Package in JDev 11g

    Hi All...
    I have a PL/SQl package and I am using JDEv 11g. I want to create it as a webservice. I want to deploy it in a remote server. Can I deploy it from my client machine. In server Weblogic already started. What are the prerequisites, that we need to deploy a wbservice. I done the following steps.
    1. Create an application.
    2. Right click the package and select Generate Java option.
    3. It create a Java class in the Application sources.
    4. Double click the class and select Create Web Service. It created the web service.
    5. When I select the webservice and click Run it shows the following error. It going to the Default \server. Actually I need it in a remote server.
    [Running application NewWebService on Server Instance DefaultServer...]
    ---- Deployment started. ---- Apr 20, 2009 1:15:40 PM
    Target platform is (Weblogic 10.3).
    Running dependency analysis...
    2009-04-20 13:15:40.205: Writing WAR file to D:\Oracle\Middleware\jdeveloper\system\system11.1.1.0.31.51.88\o.j2ee\drs\NewWebService\NewWebService-LastNoWebService-webapp
    2009-04-20 13:15:40.222: Wrote WAR file to D:\Oracle\Middleware\jdeveloper\system\system11.1.1.0.31.51.88\o.j2ee\drs\NewWebService\NewWebService-LastNoWebService-webapp
    2009-04-20 13:15:40.357: Writing EAR file to D:\Oracle\Middleware\jdeveloper\system\system11.1.1.0.31.51.88\o.j2ee\drs\NewWebService
    2009-04-20 13:15:40.374: Wrote EAR file to D:\Oracle\Middleware\jdeveloper\system\system11.1.1.0.31.51.88\o.j2ee\drs\NewWebService
    Deploying Application...
    <Apr 20, 2009 1:15:40 PM IST> <Warning> <J2EE> <BEA-160195> <The application version lifecycle event listener oracle.security.jps.wls.listeners.JpsAppVersionLifecycleListener is ignored because the application NewWebService is not versioned.>
    <Apr 20, 2009 1:15:40 PM IST> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1240213540593' for task '3'. Error is: 'java.lang.ClassNotFoundException: sqlj.runtime.ref.DefaultContext'
    java.lang.ClassNotFoundException: sqlj.runtime.ref.DefaultContext
         at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:283)
         at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:256)
         at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:54)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         Truncated. see log file for complete stacktrace
    java.lang.ClassNotFoundException: sqlj.runtime.ref.DefaultContext
         at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:283)
         at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:256)
         at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:54)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         Truncated. see log file for complete stacktrace
    >
    <Apr 20, 2009 1:15:40 PM IST> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating deploy task for application 'NewWebService'.>
    <Apr 20, 2009 1:15:40 PM IST> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
    java.lang.ClassNotFoundException: sqlj.runtime.ref.DefaultContext
         at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:283)
         at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:256)
         at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:54)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         Truncated. see log file for complete stacktrace
    java.lang.ClassNotFoundException: sqlj.runtime.ref.DefaultContext
         at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:283)
         at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:256)
         at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:54)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         Truncated. see log file for complete stacktrace
    >
    [Deployer:149034]An exception occurred for task [Deployer:149026]deploy application NewWebService on DefaultServer.: sqlj.runtime.ref.DefaultContext.
    weblogic.application.WrappedDeploymentException: sqlj.runtime.ref.DefaultContext
    #### Deployment incomplete. #### Apr 20, 2009 1:15:40 PM
    oracle.jdeveloper.deploy.DeployException
         at oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer.doDeploymentAction(Jsr88RemoteDeployer.java:247)
         at oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer.deployImpl(Jsr88RemoteDeployer.java:157)
         at oracle.jdeveloper.deploy.common.AbstractDeployer.deploy(AbstractDeployer.java:94)
         at oracle.jdevimpl.deploy.fwk.WrappedDeployer.deployImpl(WrappedDeployer.java:39)
         at oracle.jdeveloper.deploy.common.AbstractDeployer.deploy(AbstractDeployer.java:94)
         at oracle.jdeveloper.deploy.common.BatchDeployer.deployImpl(BatchDeployer.java:82)
         at oracle.jdeveloper.deploy.common.AbstractDeployer.deploy(AbstractDeployer.java:94)
         at oracle.jdevimpl.deploy.fwk.WrappedDeployer.deployImpl(WrappedDeployer.java:39)
         at oracle.jdeveloper.deploy.common.AbstractDeployer.deploy(AbstractDeployer.java:94)
         at oracle.jdevimpl.deploy.fwk.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:436)
         at oracle.jdeveloper.deploy.DeploymentManager.deploy(DeploymentManager.java:209)
         at oracle.jdevimpl.runner.adrs.AdrsStarter$5$1.run(AdrsStarter.java:1365)
    Caused by: oracle.jdeveloper.deploy.DeployException
         at oracle.jdevimpl.deploy.common.Jsr88DeploymentHelper.deployApplication(Jsr88DeploymentHelper.java:413)
         at oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer.doDeploymentAction(Jsr88RemoteDeployer.java:238)
         ... 11 more
    Caused by: oracle.jdeveloper.deploy.DeployException: Deployment Failed
         at oracle.jdevimpl.deploy.common.Jsr88DeploymentHelper.deployApplication(Jsr88DeploymentHelper.java:395)
         ... 12 more
    #### Cannot run application NewWebService due to error deploying to DefaultServer.
    [Application NewWebService stopped and undeployed from Server Instance DefaultServer]
    6. when i goto the consoleof weblogic server, already an instance created. But nothing displayed under WebServices.
    7. Select the instance and press 'Start'. While deploying an error came.
    java.lang.Exception: [DeploymentService:290049]Deploy failed for id '1,240,213,727,265' since no targets are reachable.
    Please help me..
    its very urgent...
    Regards,
    Resmi.

    Oh, no - another very urgent question. The world must be about to end ;)
    Resmi, Have a read of [url http://forums.oracle.com/forums/thread.jspa?threadID=883293]this - JDeveloper 11g, as of today, doesn't (at least is not supposed to) support publishing PL/SQL procedures/packages as a web service.
    John

  • Creating an XML From a Deep Structure  using XSL Transformation

    Hi ABAPers,
    I have a requirement to use XSL Transformations on an ABAP deep type structure.
    Currently i have an API that fills in this deep structure and by using CALL TRANSFORMATION ID.... i will get the BIG XML having having 100s of nodes . But actualy form the deep structure i need only some NODES (say 50)... So i tried writing an XSLT
    in the transaction STRANS.. but on using this TRANSFORMATION which i wrote i am getting an error messgae like INVALID XML...
    Am i going in right track or is there a good solution...
    My sample transformation is as below...
    <xsl:transform version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:strip-space elements="*"/>
    <xsl:template match="/">
    <xsl:value-of select="DATA/NODE_ELEMENTS/UUID_KEY/UUID"/>
    <xsl:value-of select="DATA/NODE_ELEMENTS/SEMANTICAL_NAME"/>
    <xsl:value-of select="DATA/NODE_ELEMENTS/STRUCT_CAT"/>
    <xsl:value-of select="DATA/NODE_ELEMENTS/USAGE_CAT"/>
    <xsl:value-of select="DATA/NODE_ELEMENTS/RESTRICTED_IND"/>
    <xsl:value-of select="VALUES/DATA/NODE_ID"/>.
    </xsl:template>
    </xsl:transform>
    Please help me in solving this issue....
    Thanks,
    Linda.

    Hi Linda,
        I am replying based on your sample code.
       Try the below following suggestions.
       here 'GRPHDR' is the node where I am selecting the data.
               IGRPHDR is the name of the reference.
    First calling the transformation in you program.
    TYPES: BEGIN OF tl_hdr,
               msgid(20)    TYPE c,
                 END OF tl_hdr.
    DATA : t_hdr           TYPE STANDARD TABLE OF tl_hdr.
      GET REFERENCE OF t_hdr INTO l_result_xml-value.
        l_result_xml-name = 'IGRPHDR'.
        APPEND l_result_xml TO t_result_xml.
       TRY.
            CALL TRANSFORMATION yfi_xml_read
            SOURCE XML it_xml_data
            RESULT (t_result_xml).
          CATCH cx_root INTO l_rif_ex.
            l_var_text = l_rif_ex->get_text( ).
            l_bapiret-type = 'E'.
            l_bapiret-message = l_var_text.
            APPEND l_bapiret TO errormsgs.
            EXIT.
        ENDTRY.
    in XSL transformation
       First write a block of statement to specify from which node you are taking the data.
       No matter it is a node or sub-node.
    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
      <xsl:output encoding="iso-8859-1" indent="yes" method="xml" version="1.0"/>
      <xsl:strip-space elements="*"/>
    <xsl:template match="/">
          <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
          <asx:values>
            <IGRPHDR>  " reference name of internal table
              <xsl:apply-templates select="//GrpHdr"/>
            </IGRPHDR>
      </asx:values>
        </asx:abap>
    </xsl:template>
    Next select the data from the nodes under the nodes specified in the transformation.
    here msgid is the field i am selecting for value.
    <xsl:template match="GrpHdr">
        <item>
          <MSGID>  " field in the internal table t_hdr where data has to go
            <xsl:value-of select="MsgId"/>
          </MSGID>
        </item>
      </xsl:template>
    reply back if further clarification is needed.
    Thanks and regards,
    Kannan N

  • How to create an XML from Source Table

    Hi,
    I am new to ODI and have a requirement as part of our project -
    Say have a table in Source schema with few columns and need to convert the same to XML format and insert the XML as a CLOB column in table of target schema.
    There could also be a case where the XML generated in Source will have to be passed on to Target by calling a web service at target (through ODI)
    Please help with all the steps required to achieve the same.
    Regards,
    Kumar

    HI
    GOOD
    IT IS POSSIBLE IN ABAP
    Extensible Markup Language (XML) is a simple, very flexible text format derived from SGML (ISO 8879). Originally designed to meet the challenges of large-scale electronic publishing, XML is also playing an increasingly important role in the exchange of a wide variety of data on the Web and elsewhere.
    XSD->
    XML Schemas express shared vocabularies and allow machines to carry out rules made by people. They provide a means for defining the structure, content and semantics of XML documents. in more detail.
    XDS->
    XDS can process data images from CCD-, imaging-plate, and multiwire-detectors in a variety of formats. Detector specific Input file templates greatly simplify the use of XDS; they are provided as part of the documentation.
    XDS runs under Unix or Linux on a single server or a grid of up to 99 machines of the same type managed by the MOSIX system; in addition, by using OpenMP, it can be executed in parallel on up to 32 processors at each node that share the same address space.
    http://www2.stylusstudio.com/SSDN/default.asp?action=9&fid=23&read=2926
    /people/r.eijpe/blog/2006/02/19/xml-dom-processing-in-abap-part-iiia150-xml-dom-within-sap-xi-abap-mapping
    THANKS
    MRUTYUN

  • Modified "Create error table" from CKM SQL problem

    Hi guys!
    I have a strange problem while creating error table by the CKM. I've changed in the interface from flow control to static control and now the command to create error table looks like:
    create table STG_TMP.E$_I_D_ASSORTMENT_S
    ERR_TYPE VARCHAR2(1 CHAR) NULL,
    ERR_MESS VARCHAR2(250 CHAR) NULL,
    CHECK_DATE DATE NULL,
    ORIGIN VARCHAR2(100 CHAR) NULL,
    CONS_NAME VARCHAR2(35 CHAR) NULL,
    CONS_TYPE VARCHAR2(2 CHAR) NULL
    the create error table(it should create table with all the columns varchar2 and handle the situation when column is number(0,0) => varchar2(255)) step from CKM is:
    <%=snpRef.getColList("<?\t", "int vL[POS]=[LONGC]+[SCALE]; if(\u0022[DEST_DT]\u0022.equals(\u0022DATE\u0022)) {vL[POS]=20;}; if(\u0022[DEST_DT]\u0022.equals(\u0022NUMBER\u0022) && vL[POS]==0) {vL[POS]=255;};", "\n \t", "\n?>", "INS")%>
    create table <%=snpRef.getTable("L","ERR_NAME", "W")%>
    ERR_TYPE <%=snpRef.getDataType("DEST_VARCHAR", "1", "")%> <%=snpRef.getInfo("DEST_DDL_NULL")%>,
    ERR_MESS <%=snpRef.getDataType("DEST_VARCHAR", "250", "")%> <%=snpRef.getInfo("DEST_DDL_NULL")%>,
    CHECK_DATE <%=snpRef.getDataType("DEST_DATE", "", "")%> <%=snpRef.getInfo("DEST_DDL_NULL")%>,
    <%=snpRef.getColList("", "[COL_NAME]\t varchar2 (<?=vL[POS]?>) " + snpRef.getInfo("DEST_DDL_NULL"), ",\n\t", "", "INS")%>,
    ORIGIN <%=snpRef.getDataType("DEST_VARCHAR", "100", "")%> <%=snpRef.getInfo("DEST_DDL_NULL")%>,
    CONS_NAME <%=snpRef.getDataType("DEST_VARCHAR", "35", "")%> <%=snpRef.getInfo("DEST_DDL_NULL")%>,
    CONS_TYPE <%=snpRef.getDataType("DEST_VARCHAR", "2", "")%> <%=snpRef.getInfo("DEST_DDL_NULL")%>
    Do you know whats the problem??
    Thanks in advance :)
    With regards,
    PsmakR

    What version of ODI are you using ?
    Are you still using Sunopsis ?
    Try using ODI 10.1.3.5
    Also, follow the solution in post
    Issue with Create Target Table in CKM Oracle

  • Generate xml from non-relational table

    Hi
    I would like to create hierarchical xml from non-relational table as below, can anybody share some idea?
    I have tried the XMLAgg/XmlElement and could not get the desired result. Any help would be greately appreciated.
    create table testing
    ( super_cat varchar2(30)
    , normal_cat varchar2(30)
    , sub_cat varchar2(30)
    , detail varchar2(30));
    CREATE UNIQUE INDEX IDX_TESTING ON TESTING(SUPER_CAT,NORMAL_CAT,SUB_CAT);
    insert into testing values ('SUPER_A','NORMAL_A','SUB_A', 'DETAIL1');
    insert into testing values ('SUPER_A','NORMAL_A','SUB_B', 'DETAIL2');
    insert into testing values ('SUPER_A','NORMAL_B','SUB_A', 'DETAIL3');
    insert into testing values ('SUPER_A','NORMAL_B','SUB_B', 'DETAIL4');
    COMMIT;The result should be like :
    <Document>
    <SuperCategory>
    <SuperCategoryName>SUPER_A</SuperCategoryName>
    <NormalCategory>
    <NormalCategoryName>NORMAL_A</NormalCategoryName>
    <SubCategory>
    <SubCategoryName>SUB_A</SubCategoryName>
    <ResultDetail><Detail>DETAIL1</Detail></ResultDetail>
    </SubCategory>
    <SubCategory>
    <SubCategoryName>SUB_B</SubCategoryName>
    <ResultDetail><Detail>DETAIL2</Detail></ResultDetail>
    </SubCategory>
    </NormalCategory>
    <NormalCategory>
    <NormalCategoryName>NORMAL_B</NormalCategoryName>
    <SubCategory>
    <SubCategoryName>SUB_A</SubCategoryName>
    <ResultDetail><Detail>DETAIL3</Detail></ResultDetail>
    </SubCategory>
    <SubCategory>
    <SubCategoryName>SUB_B</SubCategoryName>
    <ResultDetail><Detail>DETAIL4</Detail></ResultDetail>
    </SubCategory>
    </NormalCategory>
    </SuperCategory>
    </Document>

    user563940 wrote:
    Hi
    I would like to create hierarchical xml from non-relational table as below, can anybody share some idea?
    I have tried the XMLAgg/XmlElement and could not get the desired result. Any help would be greately appreciated.I think you should be able to achieve this with the addition of XMLFOREST.
    http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/functions244.htm#SQLRF06169

Maybe you are looking for

  • Recent Files List in Dreamweaver CS5.5

    Recently opened files are not being stored in the recent file list (File --> Open Recent) on my installation of Dreamweaver. Is there a setting I can enable to turn this on? Thank you.

  • Remove applications from the "open with" menu

    How do you remove applications from the "open with" context menu? I seem to have one instance of a program for every time it was "updated." So my "open with" menu has about 8 instances of Adobe Acrobat, 3 or 4 of Word, etc. It's obnoxious and cumbers

  • Can't open my Creative Cloud apps since my Mac Maverick Update

    Hi, can anyone help me please? Since I updated my Mac to Maverick on the weekend... 1. My Creative Cloud manager says all of my CC apps are up to date. 2. The program Icons have disappeared from my Dock since my update to Maverick 3. However in my Ap

  • Package creation and class importation

    how do i code a package statement so that i may use an import statement for that class in another class? i.e I have class called IaMFullOfStaticMethods.java and i want to import it into my StaticMethodTest.java. assume that all java installations are

  • ODI: Is ODI 10g compatible with SOA 11g ?

    hi all, I have a requirement where ODI should invoke web services in SOA 11g fusion middleware. Is it required that i use ODI 11g? Or is ODI 10g compatible working with SOA 11g. In case if i have to use ODI 10g to invoke webservices in SOA 11g den do