XSQL: XSQL-006

I have a servlet that serves up xsl. If I run it with some parameters and save the output to a file and use that file as the xsl for an xsql call, it works fine.
However, when I call the servlet directly from xsql, i.e. <?xml-stylesheet type="text/xsl" href="/servlet/XSLGen?page_name=fob&;page_style=english"?>
then I get the following error:
Oracle XSQL Servlet Page Processor 1.0.2.0 (Production)
XSQL-006: XSLT stylesheet is not well-formed: http://www.nds-i.com/servlet/XSLGen?page_nam
XML parse error at line 1, char 60
End tag does not match start tag 'body'
I only get this when I run from the servlet. Like I said, if I save the servlet output to a file it works fine.
I don't have an End tag. Any ideas?
Lewis
null

What web server are you using?
With the Web-to-go server inside JDeveloper 3.2.2 production I just tried the following
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/src/servlet/XSLServlet"?>
<x/>with the XSLServlet code of:import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
public class XSLServlet extends HttpServlet {
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
response.setContentType("text/xml");
PrintWriter p = response.getWriter();
p.println("<html xsl:version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'><b>foo</b></html>");
p.close();
}and requesting the XSQL page returns the bolded word foo to my browser.

Similar Messages

  • BC4J + XSQL, XSQL+EJB Sample Code

    I'm new to the XML/Java thing. Does anyone have sample code which uses BC4J or EJB components with XSQL (or other XML template files)?

    Sharon,
    Take a look at the XML wireless sample on this site.
    - Select Products from the menu on the left of this page
    - Select the JDeveloper link
    - Select Sample Code (at the top of the page)
    - Select the XML Wireless Sample link
    Blaise
    null

  • Error when try to call a pl/sql procedure from the .xsql file

    I tried to call a pl/sql procedure like this:
    <?xml version="1.0"?>
    <page connection="omtest5" xmlns:xsql="urn:oracle-xsql">
    <xsql:include-owa>
    sampleowaxml.testone
    </xsql:include-owa>
    </page>
    but I got the following error message:
    <?xml version="1.0" ?>
    - <page>
    - <xsql-error action="xsql:include-owa">
    <statement>declare buf htp.htbuf_arr; param_names owa.vc_arr; param_values owa.vc_arr; rows integer := 32767; outclob CLOB;begin param_names(1) := 'HTTP_COOKIE'; param_values(1) := ''; param_names(2) := 'SERVER_NAME'; param_values(2) := 'mxfang-nt.us.oracle.com'; param_names(3) := 'SERVER_PORT'; param_values(3) := '80'; param_names(4) := 'SCRIPT_NAME'; param_values(4) := '/servlets/oracle.xml.xsql.XSQLServlet'; param_names(5) := 'PATH_INFO'; param_values(5) := '/xsql/test/myproject.xsql'; param_names(6) := 'HTTP_USER_AGENT'; param_values(6) := 'Mozilla/4.0 (compatible; MSIE 5.01; Windows NT)'; owa.init_cgi_env(6,param_names,param_values); sampleowaxml.testone owa.get_page(buf,rows); dbms_lob.createtemporary(outclob,true,dbms_lob.session); for i in 1..rows loop dbms_lob.writeappend(outclob,length(buf(i)),buf(i)); end loop; ? := outclob; ? := DBMS_LOB.INSTR(outclob,CHR(10)&#0124; &#0124;CHR(10));end;</statement>
    <message>ORA-06550: line 3, column 3: PLS-00103: Encountered the symbol "OWA" when expecting one of the following: := . ( @ % ; The symbol ":=" was substituted for "OWA" to continue.</message>
    </xsql-error>
    - <xsql-error action="xsql:include-owa">
    <message />
    </xsql-error>
    </page>
    This error message is very similiar to the message that Shanthir posted on Jan, 21. I did run the dbmslob.sql, but it doesn't help. Anybody has ideas how to solve it?
    I used the PL/SQL web toolkit provided by OAS4.0.8.1. I believe oracle web agent is replaced by this toolkit.
    Thanks,
    Min
    null

    Hi,
    Glad that somebody else too got this problem. Well, as I had mentioned in my previous posting too, I think there are some procedures in the package, dbms_lob, like the writeappend, createtemporary etc.. which is not found in my dbms_lob.sql file, I am using 8.0.5, but I found these procedures in the 8i, I think it is becos of that.
    By the way if anybody got this solution and got any workaround, please help me too.
    I am still waiting for the solution to that.
    Shanthi

  • Unable to use the values returned by a PL/SQL stored procedure in a XSQL page

    Hi,
    I've been messing around with XML and XSQL in particular. I was trying to write a xsql page to display a report with account totals...I have the following .xsql which calls a PL/SQL stored procedure :
    <?xml version="1.0"?>
    <xsql:query connection="pfcdm" xmlns:xsql="urn:oracle-xsql">
    <xsql:set-session-param name="zasset_total" value="100">
    <xsql:dml connection="pfcdm">
    rraman.sp_vw_id(zasset_total,zinvm_total,zmkt_val);
    </xsql:dml>
    </xsql:set-session-param>
    select 'Asset total is {@zasset_total}' as "ASSET_TOTAL" from dual
    </xsql:query>
    My procedure sp_vw_id returns the values that it should. But, I am not sure how to declare variables within a page, and to output the return values. There is very scanty documentation on the usage of <xsql:dml> or <xsql:ref-cursor-function>.
    Any response would be greatly appreciated.
    Thanks,
    Raja

    Here is the example from the Oracle9i (complete rewrite) of the XSQL Chapter in our Oracle documentation.
    Question
    I using <xsql:dml> to call a stored procedure which has one OUT parameter, but I was not able to see any results. The executed code results in the following statement:
    <xsql-status action="xsql:dml" rows="0"/>
    Answer
    You cannot set parameter values by binding them in the position of OUT variables in this release using <xsql:dml>. Only IN parameters are supported for binding. You can create a wrapper procedure that constructs XML elements using the HTP package and then your XSQL page can invoke the wrapper procedure using <xsql:include-owa> instead.
    For an example, suppose you had the following procedure:
    CREATE OR REPLACE PROCEDURE addmult(arg1 NUMBER,
    arg2 NUMBER,
    sumval OUT NUMBER,
    prodval OUT NUMBER) IS
    BEGIN
    sumval := arg1 + arg2;
    prodval := arg1 * arg2;
    END;You could write the following procedure to "wrap" it, taking all of the IN arguments that the procedure above expects, and then "encoding" the OUT values as a little XML datagram that you print to the OWA page buffer:
    CREATE OR REPLACE PROCEDURE addmultwrapper(arg1 NUMBER, arg2 NUMBER) IS
    sumval NUMBER;
    prodval NUMBER;
    xml VARCHAR2(2000);
    BEGIN
    -- Call the procedure with OUT values
    addmult(arg1,arg2,sumval,prodval);
    -- Then produce XML that encodes the OUT values
    xml := '<addmult>'&#0124; &#0124;
    '<sum>'&#0124; &#0124;sumval&#0124; &#0124;'</sum>'&#0124; &#0124;
    '<product>'&#0124; &#0124;prodval&#0124; &#0124;'</product>'&#0124; &#0124;
    '</addmult>';
    -- Print the XML result to the OWA page buffer for return
    HTP.P(xml);
    END;This way, you can build an XSQL page like this that calls the wrapper procedure:
    <page connection="demo" xmlns:xsql="urn:oracle-xsql">
    <xsql:include-owa bind-params="arg1 arg2">
    BEGIN addmultwrapper(?,?); END;
    </xsql:include-owa>
    </page>This allows a request like:
    http://yourserver.com/addmult.xsql?arg1=30&arg2=45
    to return an XML datagram that reflects the OUT values like this:
    <page> <addmult><sum>75</sum><product>1350</product></addmult>
    </page>

  • Is there a for-each statement in XSQL like the one in XSL?

    I'm trying to do the following:
    <?xml version="1.0" ?>
    - <!-- <?xml-stylesheet type="text/xsl" href="/dvd/xsl/admin/listuser.xsl"?>
    -->
    - <database>
    - <request>
    - <parameters>
    - <row>
    <checkboxuser>jonathan</checkboxuser>
    </row>
    - <row>
    <checkboxuser>james</checkboxuser>
    </row>
    - <row>
    <checkboxuser>steve</checkboxuser>
    </row>
    - <row>
    <checkboxuser>richard</checkboxuser>
    </row>
    </parameters>
    - <session>
    <access>0</access>
    <user>malik</user>
    <adminfirstname>Malik</adminfirstname>
    <adminlastname>Graves-Pryor</adminlastname>
    </session>
    - <cookies>
    <JServSessionIdroot>v647ogyd8n</JServSessionIdroot>
    </cookies>
    </request>
    - <allusers>
    - <userinfo>
    <first-name>Jonathan</first-name>
    <last-name>Terry</last-name>
    <email>[email protected]</email>
    <user-name>jonathan</user-name>
    <password>terry</password>
    <access-level>1</access-level>
    </userinfo>
    </allusers>
    </database>Now as you can see, I have 4 instances of <checkboxuser> in my XSQL page. These values are being passed in from checkboxes on the previous page. Is there an XSQL command that will say something like <xsql:for-each select="/database/request/parameters/checkboxuser"> ?
    So that it'd look something like this in the original code:
    <?xml version="1.0"?>
    <!--<?xml-stylesheet type="text/xsl" href="/dvd/xsl/admin/listuser.xsl"?>-->
    <database connection="dvddb" xmlns:xsql="urn:oracle-xsql">
    <xsql:include-request-params/>
    <xsql:query id-attribute="" tag-case="lower" rowset-element="allusers" row-element="userinfo">
    SELECT FIRSTNAME AS "FIRST-NAME",
    LASTNAME AS "LAST-NAME",
    EMAIL AS "EMAIL",
    USERNAME AS "USER-NAME",
    PASSWORD AS "PASSWORD",
    ACCESSLEVEL AS "ACCESS-LEVEL"
    FROM LKUP_USER
    WHERE USERNAME = '<xsql:for-each select="/database/request/parameters/checkboxuser">'
    ORDER BY ACCESSLEVEL
    </xsql:query>
    </database>Or something like that... The XSL works fine, but not when I want to pull info from the DB.. :)
    Malik Graves-Pryor

    Ok I got a friend of mine to load everything up for me using 'javac' on he command line with -verbose and he got this back:
    C:\oracle\ora81>javac -verbose MultiValuedParam.java
    [parsed MultiValuedParam.java in 453 ms]
    [loaded C:\Oracle\ora81\lib\oraclexsql.jar(oracle/xml/xsql/XSQLActionHandlerImpl
    .class) in 62 ms]
    [loaded C:\jdk1.2.2\jre\lib\rt.jar(java/lang/Object.class) in 0 ms]
    [loaded C:\Oracle\ora81\lib\oraclexsql.jar(oracle/xml/xsql/XSQLActionHandler.cla
    ss) in 0 ms]
    [loaded C:\jdk1.2.2\jre\lib\rt.jar(java/sql/SQLException.class) in 15 ms]
    [loaded C:\jdk1.2.2\jre\lib\rt.jar(java/lang/Exception.class) in 0 ms]
    [loaded C:\jdk1.2.2\jre\lib\rt.jar(java/lang/Throwable.class) in 0 ms]
    [loaded C:\jdk1.2.2\jre\lib\rt.jar(java/io/Serializable.class) in 0 ms]
    MultiValuedParam.java:10: Package javax.servlet.http not found in import.
    import javax.servlet.http.*;
    ^
    MultiValuedParam.java:11: Package org.w3c.dom not found in import.
    import org.w3c.dom.*;
    ^
    [checking class MultiValuedParam]
    2 errors
    [done in 1266 ms]Any clues on what needs to be done to get those last two working? He has the oraclexsql.jar file listed in the system environment variable section of win2k.
    Thanks!
    Malik Graves-Pryor

  • Error when trying to run a procedure from the .xsql file

    Here is the error message pasted below.
    - <test>
    - <xsql-error action="xsql:include-owa">
    <statement>declare buf htp.htbuf_arr; param_names owa.vc_arr; param_values owa.vc_arr; rows integer := 32767; outclob CLOB;begin param_names(1) := 'HTTP_COOKIE'; param_values(1) := ''; param_names(2) := 'SERVER_NAME'; param_values(2) := 'shanthi.ijs.com'; param_names(3) := 'SERVER_PORT'; param_values(3) := '8080'; param_names(4) := 'SCRIPT_NAME'; param_values(4) := '/xsql/test/myex.xsql'; param_names(5) := 'PATH_INFO'; param_values(5) := ''; param_names(6) := 'HTTP_USER_AGENT'; param_values(6) := 'Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)'; owa.init_cgi_env(6,param_names,param_values); scott.get_date; owa.get_page(buf,rows); dbms_lob.createtemporary(outclob,true,dbms_lob.session); for i in 1..rows loop dbms_lob.writeappend(outclob,length(buf(i)),buf(i)); end loop; ? := outclob; ? := DBMS_LOB.INSTR(outclob,CHR(10)&#0124; &#0124;CHR(10));end;</statement>
    <message>ORA-06550: line 3, column 75: PLS-00302: component 'SESSION' must be declared ORA-06550: line 3, column 28: PL/SQL: Statement ignored ORA-06550: line 3, column 120: PLS-00302: component 'WRITEAPPEND' must be declared ORA-06550: line 3, column 111: PL/SQL: Statement ignored</message>
    </xsql-error>
    <xsql-error action="xsql:include-owa" />
    </test>
    My .xsql file is:
    <test connection="system" xmlns:xsql="urn:oracle-xsql">
    <xsql:include-owa>
    scott.get_date;
    </xsql:include-owa>
    </test>
    Any help in this regard is greatly appreciated.
    Shanthi
    null

    I tried this way:
    <?xml version="1.0"?>
    <datapage connection="system" xmlns:xsql="urn:oracle-xsql">
    <xsql:dml>
    begin
    get_rec;
    end;
    </xsql:dml>
    </datapage>
    Here it doesn't give any error, Why is it that it works here but not with <xsql:include-owa>, ofcourse I need to get a proper output from the procedure yet. Looks like the procedure doesn't support "out" variable, should I specifically use a function ?
    Anyhelp will be appreciated.
    Shanthi

  • XSQL file "Invalid at the top level of the document"

    I am trying to insert HTML form parameters into database using <xsql:insert-request>. It worked fine except that it displays <xsql-status action="xsql:insert-request" rows="1"/> after it inserts the data into the database. I am trying to follow the insertnewsform example in Steve's book "building oracle xml applications" to return user a thank-you note. Here is my problem:
    I have four files:
    faqform.html (html form, action=faqfeed.xsql)
    faqfeed.xsql
    request-to-faq.xsl (used as transform for faqfeed.xsql)
    thankyou.xsl (used for returning user a thank-you)
    When I submit the html form, I get an error saying:
    "The XML page cannot be displayed
    Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
    Invalid at the top level of the document. Line 1, Position 43
    <?xml version = '1.0' encoding = 'UTF-8'?>"
    I didn't put "encoding..." in any of my xsql files, not sure where that came from. When I used faqfeed.xsql?xml-stylesheet=none in the url and it showed up as a well-formed xml file with all the info I need. Here is my faqfeed.xsql and thankyou.xsl
    ********* faqfeed.xsql ***********
    <?xml version="1.0"?>
    <?xml-stylesheet type="text/xsl" href="thankyou.xsl"?>
    <page connection="template" xmlns:xsql="urn:oracle-xsql">
    <xsql:insert-request table="faq" transform="request-to-faq.xsl"/>
    <xsql:query tag-case="lower" max-rows="5" rowset-element="" row-element="faq">
    select * from faq
    </xsql:query>
    </page>
    ********* thankyou.xsl **********
    <html xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xsl:version="1.0">
    <head><title>Thank you!</title></head>
    <body>
    <h3>Thank you for your faq!</h3>
    Your faq has been successfully inserted to the database!
    <table>
    <xsl:for-each select="page/faq">
    <tr>
    <td><xsl:value-of select="question"/></td>
    <td><xsl:value-of select="answer"/></td>
    </tr>
    </xsl:for-each>
    </table>
    </body>
    </html>
    Anything I am missing here that caused that error? Any hints would be greatly appreciated!
    Wenqi
    null

    Do the XSQL Demos work correctly on your system?
    The error you're getting seems like maybe the *.xsql extension is not mapped properly to the oracle.xml.xsql.XSQLServlet class in your servlet engine.

  • Lower case tag names in XSQL query

    XSQL queries appear to default all column tag names to upper case, even when you specifically use lower case characters. Is there any way to get them into lower case?
    For example,
    <?xml version="1.0"?>
    <test connection="devel" xmlns:xsql="urn:oracle-xsql">
    <xsql:query rowset-element="" row-element="" null-indicator="yes">
    select 'hello' as hi from dual
    </xsql:query>
    </test>
    Results in,
    <?xml version="1.0" ?>
    <test>
    <HI>hello</HI>
    </test>
    I would really like to get <HI> to <hi>...
    thanks.

    You can also preserve case by putting quotes around the column alias:
    For example,
    <?xml version="1.0"?>
    <test connection="devel" xmlns:xsql="urn:oracle-xsql">
    <xsql:query rowset-element="" row-element="" null-indicator="yes">
    select 'hello' as "hi"
    , 'Hello' as "Hi"
    , 'HELLO' as "HI"
    from dual
    </xsql:query>
    </test>
    This way you can also get mixed case.

  • Oracle.xml.xsql.XSQLServlet in Java Web Server 2.0

    Does anyone know how to add the oracle.xml.xsql.XSQLServlet in the Java Web Srever 2.0? When running the helloworld.xsql I am now getting the following error message.
    "500 Internal Server Error
    The servlet named oracle.xml.xsql.XSQLServlet at the requested URL
    http://nw601250:8080/xsql/demo/helloworld.xsql
    reported this exception: java.security.AccessControlException: access denied (java.io.FilePermission C:\JavaWebServer2.0\public_html\xsql\demo\helloworld.xsql read). Please report this to the administrator of the web server.
    java.lang.RuntimeException: java.security.AccessControlException: access denied (java.io.FilePermission C:\JavaWebServer2.0\public_html\xsql\demo\helloworld.xsql read) at oracle.xml.xsql.XSQLPageManager.getPage(XSQLPageManager.java:122) at oracle.xml.xsql.XSQLPageProcessor.process(XSQLPageProcessor.java, Compiled Code) at oracle.xml.xsql.XSQLServlet.doGet(XSQLServlet.java:124) at javax.servlet.http.HttpServlet.service(HttpServlet.java:715) at javax.servlet.http.HttpServlet.service(HttpServlet.java:840) at com.sun.server.ServletState.callService(ServletState.java:226) at com.sun.server.ServletManager.callServletService(ServletManager.java:936) at com.sun.server.ProcessingState.invokeTargetServlet(ProcessingState.java:423) at com.sun.server.http.HttpProcessingState.execute(HttpProcessingState.java:79) at com.sun.server.http.stages.Runner.process(Runner.java:79) at com.sun.server.ProcessingSupport.process(ProcessingSupport.java, Compiled Code) at com.sun.server.Service.process(Service.java:204) at com.sun.server.http.HttpServiceHandler.handleRequest(HttpServiceHandler.java:374) at com.sun.server.http.HttpServiceHandler.handleRequest(HttpServiceHandler.java:166) at com.sun.server.HandlerThread.run(HandlerThread.java:162)"
    I have the alias *.xsql set to map to the servlet named oracle.xml.xsql.XSQLServlet under the Servlet Aliases section, but I'm not sure how to add the servlet under the Servlet section, as I'm guessing that this is the problem I'm now experiencing. I tried adding oracle.xml.xsql.XSQLServlet as both the servlet name and class, but this is not working.
    Any help would be greatly appreciated. Thanks!

    Rani,
    The following is part of a message that was posted back on Nov. 7 of '99 from Steve Muench. I just followed this exactly with the Java Web Server 1.0.1 and it worked fine (including adding the classpath settings and xsql servlet mappings as it says below). Thanks,Dan
    Here's the steps I just followed to run all the XSQL Demos under JSWDK 1.0.1
    (1) Downloaded jswdk1_0_1-win.zip from Sun
    (2) Installed in D:\jswdk-1.0.1
    (3) Edited "startserver.bat" to add the
    classpath entries needed by XSQL Servlet:
    set CLASSPATH=%CLASSPATH%;d:\xsql\lib
    set CLASSPATH=%CLASSPATH%;d:\xsql\lib\classes111.zip
    set CLASSPATH=%CLASSPATH%;d:\xsql\lib\oraclexsql.jar
    set CLASSPATH=%CLASSPATH%;d:\xsql\lib\oraclexmlsql.jar
    set CLASSPATH=%CLASSPATH%;d:\xsql\lib\xmlparserv2.jar
    (4)Edited d:/jswdk-1.0.1/webpages/WEB-INF/servlets.properties and added the line:
    xsql.code=oracle.xml.xsql.XSQLServlet
    (5) Edited d:/jswdk-1.0.1/webpages/WEB-INF/mappings.properties
    and added the line:
    .xsql=xsql
    (6) Copied D:\xsql\demo to D:/jswdk-1.0.1/webpages/xsql/demo
    (7) Started the Webserver with "startserver.bat"
    (8) Browsed http://localhost:8080/xsql/demo/index.html
    (9) Exercised all the demos.
    Hope this helps.
    Steve Muench
    Oracle XML Team

  • Urgent :post xml for xsql difference with html form post

    Hi,
    We are developing an application to process xml request
    posted by external party. The requests arrive by
    http-post operation
    We developed and tested with an html-form.
    Now we encounter problems in testing with http-post
    The xsql page is processed correctly but
    insert only fixed text when formatting xml-data as input for
    the insert-request, string inserted is empty.
    Everything is by the book and html-forms works great.
    Is anybody else using xsql to insert xml data in the database on this version? Maybe can you help by looking into a testcase ? Issued a tar but am on terrible deadline
    so need help very soon.
    Details: HP-UX 11.11 Oracle 9.2.0.4 java1.4 ojdbc 1.4
    Tnx in advance,
    Jeroen

    Mark,
    Have an external partner which sends xml-requests.
    Have to read those, store them and process them.
    Idea is let them
    1)post the xml at a url where an xsql page is reading the xml
    2) transforming this for an insert into
    the database. The column is defined to store the complete xml-message.
    3) A trigger takes care of processing the stuff and preparing the output
    4) and a query in the xsql-page reads the output from an output table
    When developing and testing this with an html-form that posts the xml is works great.
    $ cat newclobins.xsql
    <?xml version="1.0"?>
    <page connection="demo" xmlns:xsql="urn:oracle-xsql" >
    <xsql:set-session-param name="id">
    select msgid.nextval from dual
    </xsql:set-session-param>
    <xsql:dml>
    delete cbs_msg_in where id={@id}
    </xsql:dml>
    <xsql:insert-request table="cbs_msg_in" column="id,msg" transform="cbsform_1.xsl"/>
    <data>
    <xsql:query null-indicator="yes">
    select msgid,msg from cbs_xml_out where msgid={@id}
    </xsql:query>
    </data>
    </page>
    $ cat cbsform_1.xsl
    <?xml version="1.0"?>
    <ROWSET xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xsl:version="1.0">
    <xsl:for-each select="request">
    <ROW>
    <MSG><xsl:value-of select="parameters/doc" /></MSG>
    <ID><xsl:value-of select="session/id" /></ID>
    </ROW>
    </xsl:for-each>
    </ROWSET>
    1) When using a tool like
    http://www.programmersheaven.com/articles/adrian/getpost/article.html it fails with
    No rows to modify -- the row enclosing tag missing. Specify the correct row enclosing tag.
    2) When using the commandline utility like
    xsql jeroen5.xsql posted-xml=test3.xml
    this works great when inserting plain text but not
    when inserting xml-format data into a column
    So problem 1 is why external tools like above or my partner that uses .net to do something similar gives this strange error?
    Problem nr 2 is should I stick to just the data in xml and forget about storing the xml-formatted data?
    Hope you can help because I am getting quite desparate here.
    Regards,
    Jeroen

  • Apache not serving XSQL pages properly.

    java 1.2
    apache 1.3.12
    tomcat 3.2.1 (w/ mod_jk)
    Solaris 7
    XSQL 1.0.4.3
    The XSQL Servlet appears to be working fine through TOMCAT stand-alone. So for example, this
    "http://192.168.0.2:8080/xsql/demo/helloworld/helloworld.xsql" works fine...
    When I try to hit it through Apache (w/out the 8080 port) however I simply get the original XSQL query page instead of the query results. In other words, it appears Apache doesn't forward *.xsql requests to the XSQL Servlet...I think? Any ideas - thanks.

    Thanks for your responses...I think I've figured it out for both mod_jserv and mod_jk.
    The mapping of *.xsql to the oracle.xml.xsql.XSQLServlet is taken care of in the web.xml supplied in the XDK. This tells Tomcat to handle all *.xsql files with the XSQLServlet and that was working all along (Tomcat stand-alone).
    What's missing is that Apache needs to direct all *.xsql files to Tomcat. This is taken care of by adding the following lines to the httpd.conf:
    (for mod_jserv add)
    AddType text/xsql .xsql
    AddHandler jserv-servlet .xsql
    (for mod_jk add)
    JkMount /xsql/*.xsql ajp12
    In general, I simply mimiced the configuration of *.jsp files.
    I noticed a posting a few weeks back where someone was getting "rubbish" when they tried to access http://localhost/xsql/ - my guess is that apache was serving up the xsql pages "as is", without passing them onto Tomcat. This should hopefully do the trick...
    Comments?

  • Using xsql params w/in oracle text "contains" clause

    Hello,
    Regarding the xsql code below:
    <?xml version="1.0"?>
    <?xml-stylesheet type="text/xsl" href="hrefs.xsl"?>
    <page connection="rxschema" xmlns:xsql="urn:oracle-xsql">
    <xsql:query file="%winping-utility%" version="1.0"
    null-indicator="yes" link="">
    select distinct c.contentpathname
    from rx_schema.ct_shared s, rx_schema.contentstatus c
    where s.contentid = c.contentid
    and contains (s.ul_file, '{@link} within href') > 0
    and s.revisionid = (select max(revisionid)
    from rx_schema.ct_shared
    where contentid = s.contentid)
    order by contentpathname
    </xsql:query>
    </page>
    specifically this line:
    and contains (s.ul_file, '{@link} within href') > 0
    This query doesn't work, I think the "{@link}" xsql param (passed in) is being interpreted as an xml attribute (since it's within the "contains" clause), is there a way to force it to read this as a param? I also tried it w/o the braces (and I also verified that it works when I hardcode a value in place of "@link").
    Thanks,
    JSK

    The syntax of a 'Contains' query should contain only the 'Contains' query operators.
    http://www.cise.ufl.edu/help/database/oracle-docs/text.920/a96518/cqoper.htm#1360

  • XSQL Using bind params with sql LIKE clause

    I am unable to use a bind-param with the LIKE clause in a SELECT statement.
    eg call .../temp.xsql?name=N
    XSQL query is this:
    <xsql:query max-rows="-1" bind-params="name">
    SELECT last_name
    FROM emp
    WHERE last_name LIKE '?%'
    </xsql:query>
    I have tried a few combinations so far with no success eg:
    WHERE last_name LIKE '{@name}%'
    WHERE last_name LIKE ?||%
    Any ideas?

    I highly recommend using XSQL's real bind variable feature wherever you can. You can read about it in the XSQL Online Documentation (Search for the "Using Bind Variables" section).
    Using this feature is more performant and more secure than using textual substitution variables.
    Here's what your page looks like using textual substitution:
    <page connection="UTD4" xmlns:xsql="urn:oracle-xsql">
      <xsql:query null-indicator="yes" >
        SELECT * FROM TC_HL7_SEG WHERE SEGMENT_CODE LIKE '{@code}%'
      </xsql:query>
    </page> .
    And here's what it would look like using real bind variables:
    <page connection="UTD4" xmlns:xsql="urn:oracle-xsql">
      <xsql:query null-indicator="yes" bind-params="code">
        SELECT * FROM TC_HL7_SEG WHERE SEGMENT_CODE LIKE ?||'%'
      </xsql:query>
    </page> .
    Using real bind variables allows the database to avoid reparsing the SQL statement everytime, which improves performance.
    Steve Muench
    JDeveloper/BC4J Development Team
    Author, Building Oracle XML Applications

  • Too much output fails xsql response

    We have a strange problem
    I post a XML message as a request to query some data . The server reponses well if the amount of data to respond is not too much. If amount the data exceeds a certain limit we get an error.
    Flow we use:
    for development we use an html form,
    request goes to the apache webserver,
    calls an xsql page,
    page does an insert into a table with a clob column
    trigger on this table calls a procedure to process
    the request -> output is prepared in a new table in xml-format
    page does a query on the output table to prepare the answer
    Details: Oracle 9.2.0.4 HP-UX 11.11 XDK 9.2.0.6
    The PL-sql to prepare the response:
    procedure ResponseContractsList
    is
    dum clob;
    CURSOR cResponseContractsList
    IS
    select XMLELEMENT("CBSMessage", XMLATTRIBUTES('http://www.w3.org/2001/XMLSchema' as "xmlns:xsd" , 'http://www.w3.org/2001/XMLSchema-instance' as "xmlns:xsi" ,'http://www.oracle.com/CBSResponse.xsd' as "xsi:noNamespaceSchemaLocation" ),
    XMLELEMENT("Header",
    XMLELEMENT("Version", '1'),
    XMLELEMENT("Guid", '6BC096BB-0CE6-11D1-BAAE-00C04FC2E20D'),
    XMLELEMENT("Error", 0)
    XMLELEMENT("Response",
    XMLELEMENT("Type", 'ResponseContractList'),
    XMLELEMENT("RequestID", 1),
    XMLELEMENT("Error", 0),
    (select XMLAGG(
    XMLELEMENT("ResponseContractList",
    (select XMLAGG(
    XMLELEMENT("Object",
    XMLELEMENT("ObjectID", OBJ_CD),
    XMLELEMENT("ObjectName", OBJ_NM),
    XMLELEMENT("ObjectRegion", rtrim(REG_NM)),
    (select XMLAGG(
    XMLELEMENT("Contract",
    XMLELEMENT("ContractID", CNTR_CD),
    XMLELEMENT("ContractName", nvl(OBJ_ECD,' ') || ' ' || OBJ_NM),
    XMLELEMENT("ContractCode", nvl(CNTR_ECD,' ')),
    XMLELEMENT("StartDate", to_char(min(RSTR_DTM_TOT),'yyyy-mm-dd')),
    XMLELEMENT("EndDate", to_char(max(RSTR_DTM_TOT),'yyyy-mm-dd')),
    XMLELEMENT("SupplierCode", OBJ_TARA_NR)
    from CNTR,
    CNTR_OBJ,
    RSTR,
    MOD
    where CNTR_OBJ_OBJ = OBJ_CD
    and CNTR_OBJ_CNTR = CNTR_CD
    and CNTR.STATUS_RIJ = '1'
    and MOD_CNTR = CNTR_MOD
    and MOD_TP in (2,4)
    and RSTR_MOD = MOD_CD
    and MOD_ORIG_CD = CNTR_OBJ_MOD
    and RSTR_DTM_TOT >= sysdate
                   and cntr_med=231
    group by CNTR_CD, OBJ_ECD, CNTR_ECD, OBJ_TARA_NR
    from contracten.OBJ,
    ACC_ADR,
    NAW,
    REG
    where OBJ_TARA_NR is not null
    and ACC_ADR_OBJ = OBJ_CD
    and NAW_CD = ACC_ADR_NAW
    and REG_LAND = NAW_LAND
    and REG_STRK = NAW_STRK
    and REG_CD = NAW_REG
    and rownum<61
    from dual
    ) as "CBSResponse"
    from dual;
    BEGIN
    OPEN cResponseContractsList;
    FETCH cResponseContractsList into waarde;
    CLOSE cResponseContractsList;
    delete dummy;
    insert into dummy (MSG) values (waarde);
    END
    Will work , but if you take rownum <62 then
    we get the following error
    Posting the xml
    <?xml version="1.0" encoding="utf-8"?>
    <CBSMessage xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.oracle.com/CBSrequest2.xsd">
    <Header>
    <Version>1</Version>
    <Sender>CBS</Sender>
    <Receiver>IRIS</Receiver>
    <Guid>6BC096BB-0CE6-11D1-BAAE-00C04FC2E20D</Guid>
    </Header>
    <Request>
    <Type>RequestContractList</Type>
    <RequestID>26</RequestID>
    <Order>6</Order>
    <RequestContractList/>
    </Request>
    </CBSMessage>
    Leads to a
    OUTPUT WHEN THERE is too much data
    - <page>
    <xsql-status action="xsql:insert-request" rows="1" />
    - <data>
    <ERROR>oracle.xml.sql.OracleXMLSQLException: End tag does not match start tag 'ObjectRegion'.</ERROR>
    </data>
    </page>
    XSQL
    <?xml version="1.0"?>
    <page connection="demo" xmlns:xsql="urn:oracle-xsql" > <xsql:insert-request table="testxml" column="msg" transform="jeroeninsform.xsl"/> <data> <xsql:query null-indicator="yes" > select msg from dummy
    </xsql:query>
    </data>
    </page>
    Hope you can help because are getting desperate
    Tnx,
    Jeroen

    About a week ago I wrote about problems we encountered during development when
    an xsql page does an insert, insert fires a trigger, trigger calls procedure to process
    data, xsql page does a select from output table to return
    We had 2 problems:
    1) ORA-00600: internal error code, arguments: [qmxsqLoadNS], [], [], [], [], [], [], [] Current SQL statement for this session:
    2) Output came not beyond a certain limit
    Problem 1 is recognized as bug by Oracle Support in 9.2.0.4, 9.2.05 and 9.2.0.6 Solved in 10.2 Unknown what is fixed
    Bug is described in 3872147 . I'm still trying to convince them to do something about it because in 3 weeks we have go live with this
    software and my alert is full with this ora-0600 Bug is definitely caused by the trigger
    Problem 2 is solved, this was caused by getting output through a xmltype column which in xsql relates to
    a plsql string with size limitation on 64k
    Regards,
    Jeroen

  • Delete in xsql:dml vs xsql:delete-request and returned rows attribute

    There is a difference in the number of rows returned between using a delete in xsql:dml vs xsql:delete-request. If I issue a delete via xsql:dml and the row I wish to delete is not in the table, then I get a result with rows equal to 0 as expected. However if I issue a delete via xsql:delete-request and the row I wish to delete is again not in the table, then I get a result with rows equal to 1.
    It appears that the value of rows in the response to xsql:delete-request is the number of rows to be processed, ie the number of rows in the posted document, whereas the value of rows in the response to xsql:dml is the number of rows processed in the database.
    I'd expect that the result that we want is the number of rows processed in the database. Thus xsql:delete-request should use the rows attribute in the response to reflect the number of rows processed in the database and thus be consistent with xsql:dml, and possibly use another attribute to reflect the number of rows to be processed.
    The same problem occurs with an update in xsql:dml vs xsql:update-request.
    http://aetius/xsql/demo/dmldelete.xsql?cxn=demo&bind=ename&ename=COMPAQ&sql=delete+from+EMP+where+ENAME+%3d+?
    result is
    <xsql-status action="xsql:dml" rows="0"/>
    where dmldelete.xsql is
    <xsql:dml
    null-indicator="yes"
    connection="{@cxn}"
    bind-params="{@bind}"
    xmlns:xsql="urn:oracle-xsql">
    {@sql}
    </xsql:dml>
    http://aetius/xsql/demo/reqdelete.xsql?cxn=demo&table=EMP&key=ENAME
    where posted document is
    <ROWSET><ROW><ENAME>COMPAQ</ENAME></ROW></ROWSET>
    result
    <xsql-status action="xsql:delete-request" rows="1"/>
    where reqdelete.xsql is
    <xsql:delete-request
    connection="{@cxn}"
    key-columns="{@key}"
    table="{@table}"
    xmlns:xsql="urn:oracle-xsql">
    </xsql:delete-request>
    Steve.

    If you post as an HTML parameter, then you can directly reference the parameter value as either a lexical parameter:
    <xsql:dml>
    insert into foo(xml_column) values ('{@paramname}')
    </xsql:dml>
    or as a bind parameter:
    <xsql:dml bind-params="paramname">
    insert into foo(xml_column) values (?)
    </xsql:dml>
    I'd recommend the latter since it's more robust to the presence of quotes in the XML that's being posted.
    If you post the XML HTTP body, then you'd have to write a custom action handler that called the getPageRequest().getPostedDocument() to get hold of the posted XML Document.

Maybe you are looking for

  • Problem with custom formula

    Hi Experts, We have a requirement in which we have to show the fact data of the cube to be annualized for time dimension i.e. if users check at year level the value should be multiplied by 1,for quarter level the value should be multiplied by 3 and f

  • Reporting against conformed dimension fails with error

    Hello guys I have a model that has 3 fact tables and 3 dimension tables. The way it is set up is that the 3 dimensions all joins to the 3 facts: Fact 1, and fact 2 joins to customer Dim, Company Dim, Item Dim on company number, Item Code, Customer Co

  • HTML encoding of XML tags

    Hi , I am using openSAML and passing an XML document as a string to the SAMLAttribute. But when i see in the logs, the XML tags like "<" , ">" are being displayed as &lt and &gt. I don't want this HTML encoding to happen ... I don't know why this is

  • I keep getting duplicate e mails

    I keep getting duplicate e mails

  • Unable to Open Emails on Mac book pro?

    I am having trouble with My MAC BOOK PRO! I am being asked to Input My password for My email access. Have been getting my emails fine On my IPHONE 5S. My last email was On the 19th of dec. I have input My password many times TO be rejected access via