Problem inserting XML into object view

Hi all,
My environment is :
Windows NT 4.0
Oracle 8i 8.1.5
(NLS_CHARACTERSET = EL8MSWIN1253)
Apache 1.3.11 Web Server
Apache JServ 1.1
XSQL v 0.9.9.1 and XML parser for Java v2,
XMLSQL that come with it
I've created an object view as following :
create table schedules (
schedule_id varchar2(20),
description varchar2(100),
constraint pk_schedule_id primary key (schedule_id)
create table schedule_details (
schedule_id varchar2(20),
starting_time date,
duration number,
constraint pk_schedule_dtls primary key (schedule_id, starting_time),
constraint fk_schedule_id foreign key (schedule_id) references schedules (schedule_id)
create or replace type schedule_detail_t as object (
starting_time varchar2(20),
duration number
create or replace type schedule_detail_list as table of schedule_detail_t;
create or replace type schedule_details_t as object (
schedule_id varchar2(20),
description varchar2(100),
details schedule_detail_list
create or replace view schedule_details_view of schedule_details_t
with object OID (schedule_id)
as select schedule_id, description,
cast(multiset(select schedule_detail_t (to_char(starting_time, 'hh24:mi'), duration) as Detail
from schedule_details
where schedule_details.schedule_id = schedules.schedule_id
) as schedule_detail_list )
from schedules;
And I'm trying to insert using putXML this
<?xml version = "1.0" encoding = "ISO-8859-1"?>
<ROWSET>
<ROW>
<SCHEDULE_ID>S1112</SCHEDULE_ID>
<DESCRIPTION>Working 08:00 to 20:00</DESCRIPTION>
<DETAILS>
<DETAILS_ITEM>
<STARTING_TIME>08:00</STARTING_TIME>
<DURATION>12</DURATION>
</DETAILS_ITEM>
</DETAILS>
</ROW>
</ROWSET>
The error I get is
oracle.xml.sql.OracleSQLXMLException:
non supported oracle-character-set-174
Note: no rows have been inserted
at oracle.xml.sql.dml.OracleXMLSave.insertXML
When I'm posting using XSQL the XML doesn't get inserted with no error message.
But when I try this for a change
<?xml version = "1.0" encoding = "ISO-8859-1"?>
<ROWSET>
<ROW>
<SCHEDULE_ID>S1111</SCHEDULE_ID>
<DESCRIPTION>Working 08:00 to 20:00</DESCRIPTION>
</ROW>
</ROWSET>
Trying to insert into table (this time) "schedules" using putXML it works ...
It works on tables and it doesn't work on object views.
Any piece of advice will be highly appreciated.
Nick

No known limitations. Please post the sample DDL to create your object types and object view, along with an example of the example XML document you're trying to insert.

Similar Messages

  • Inserting data into a view

    Hi,
    How to insert data into a view of one table

    Same as for the underlying table:
    INSERT INTO <view_name>(<col1>, <col2>, ..., <coln>) VALUES (<val1>, <val2>, ..., <valn>);
    Cheers,
    Colin

  • BPEL process to Insert XML into DB using pl/sql stored proc

    Hi,
    We have created a BPEL process in which we are taking input request and store it into Oracle Database using PL/SQL proc.
    We have been unsuccessful in doing so because the data stored in table has root element missing.
    Has any body done this (insert xml into DB using pl/sql stored proc) successfully ?
    We can so this successfully if we do not use stored procedure and store data directly in table.
    Regards

    I have done this, stored it as a CLOB.
    Also I received the payload as an opaque schema, so I had to convert the message from binary into string.
    This way the root element doesn't get removed.
    cheers
    James

  • Having a problem importing xml into an indesign template.

    I am having a problem importing xml into an indesign template. The xml data is there and will populate the columns on the document but I am having problems matching styles, removing data that should not be mapped and importing repeated same fields but differnet data.
    Message me if this is something you can do quickly for a fee.

    Also you can check the following link
    [Reporting|http://devlibrary.businessobjects.com/BusinessObjectsXIR2/en/devsuite.htm]
    Regards,
    Tej

  • Problem Inserting into object view with OracleXmlSave

    Gurus,
    I'm trying to insert into an object view with
    multiple collections of objects representing a master/detail relationship and a CLOB column, but I've this error:
    oracle.xml.sql.OracleXMLSQLException: Error Interno
    at oracle.xml.sql.dml.OracleXMLSave.saveXML(OracleXMLSave.java:1967)
    at oracle.xml.sql.dml.OracleXMLSave.insertXML(OracleXMLSave.java:1060)
    at onix.interface_isbn.OnixXmlLoader.doInsert(OnixXmlLoader.java:165)
    at onix.interface_isbn.OnixXmlLoader.setLoader(OnixXmlLoader.java, Compiled Code)
    at onix.interface_isbn.OnixXmlLoader.<init>(OnixXmlLoader.java:23)
    at onix.interface_isbn.correrLoader.main(correrLoader.java:77)
    I'm using OracleXmlSave with insertXML method to do this.
    Is There any limitations to do that? (example
    number of tables into the view, columns datatype).
    I'd appreciate any comments
    Thank

    No known limitations. Please post the sample DDL to create your object types and object view, along with an example of the example XML document you're trying to insert.

  • Inserting data into relational views of object tables

    I hope someone could help me to solve the following problem:
    I would like to design an object-relational database in O8i. Unfortunatly the client-software (GIS) can only understand relational data (except the object type 'geometry'). So I created relational views on my object tables. But now it is not possible to insert data in those views. Do I have to create triggers on those views for inserting data ???
    Nevertheless: Updating data in views makes no problems.
    Thank you for reading this and I look foreward to hearing from you soon.
    Christian Heil

    Hi Mohammed,
    I guess following is your requirement
    List1 tile is attached to "BOList1". On button press you wanted the data to be persisted to Business object "BOList1History"
    I assume that you have created "BOLIst1History" properly by associating a write Bdoc etc etc.
    Write a method in Business object "BOList" called ZUpdateHistory. This new method should contain code for creating an instance of "BOLIST1History" and fill the property values as per your requirement. Call this method from the Button press event as follows
    anchor.bo.ZUpdateHistory
    Hope this helps
    Regards
    Ganesh Datta

  • Generating mixed case columns for XML using Object views

    I am trying to model a query involving joins to generate hierarchical levels for XML document. I model it with an object view with a multicast subquery and the generated XML works fine except the following :
    The generated XML creates a tag <view_column_name>_ITEM for the nested multicase subquery columns in the view and all the nested subquery view columns in upper case because the underlying table columns are in upper case. To better illustrate, please see the following example :
    CREATE TYPE Tillinstance_t as object (
    "Tillinstanceid" number
    ,"Stationid" number
    ,"Comment" varchar2(2000)
    ,"DepositID" number(38)
    ,"TimestampCreate" date
    ,"UseridCreate" number
    ,"TimestampChange" date
    ,"UseridChange" number
    ,"TimestampClosed" date
    ,"UseridClosed" number
    ,"TimestampBalance" date
    ,"UserIDBalance" number )
    create type insts as table of Tillinstance_t ;
    CREATE OR REPLACE VIEW till_view AS
    SELECT t.tillid as "TillID"
    , t.description as "Descr"
    , t.word as "Word"
    , t.Scopetypeid as "ScopeTypeId"
    , t.displayOrder as "DisplayOrder"
    , t.useridcreate as "UserIDCreate"
    , t.newid as "NewID"
    , t.flagactive as "FlagActive"
    , t.timestampcreate as "TSCR"
    , t.useridcreate as "UIDCR"
    , t.timestampchange as "TSCH"
    , t.useridchange as "UIDCH"
    , CAST( MULTISET ( SELECT i.Tillinstanceid as "TillinstanceID"
    , i.stationid as "StationID"
    , i.ocomment as "Comment"
    , i.depositid as "DepositID"
    , i.Timestampcreate as "TSCR"
    , i.useridcreate as "UIDCR"
    , i.Timestampchange as "TSCH"
    , i.useridchange as "UIDCH"
    , i.timestampclosed as "TSCL"
    , i.useridclosed as "UIDCL"
    , i.timestampbalance as "TSBAL"
    , i.useridbalance as "UIDBAL"
    FROM TillInstance i
    WHERE t.tillid = i.tillid)
    AS Insts)
    AS "Insts"
    FROM ucTill t
    The generated XML shows up in the form of :
    <?xml version = '1.0'?>
    <Tills>
    <Till TillID="1002" Descr="Till #3" Word="Till3" ScopeTypeId="8"
    DisplayOrder="0" UserIDCreate="296" TSCR="3/26/2001 0:0:0" UIDCR="296"
    TSCH="5/4/2001 14:12:32" UIDCH="298">
    <Insts>
    <Insts_ITEM TILLINSTANCEID="1278" STATIONID="1057" OCOMMENT="Morning Till3"
    TIMESTAMPCREATE="3/26/2001 0:0:0" USERIDCREATE="296" TIMESTAMPCHANGE="6/7/2001
    8:26:49" USERIDCHANGE="99" TIMESTAMPCLOSED="6/7/2001 8:26:49"
    USERIDCLOSED="99"/>
    <Insts_ITEM TILLINSTANCEID="1362" STATIONID="1057" TIMESTAMPCREATE="6/7/2001
    8:27:13" USERIDCREATE="99" TIMESTAMPCHANGE="6/11/2001 11:32:58"
    USERIDCHANGE="320"/>
    </Insts>
    </Till>
    </Tills>
    Now How do I stripe out the _ITEM from the generated XML and change the columns TIMESTAMPCREATE, USERIDCLOSED etc to mixed case?
    Any idea

    I could generate the mixed case columns with no problem. It was my mistake and sorry for the inconvinience.
    However I am running into problems modelling a nested hierarchical set of queries with levels more than 2.
    Please advise of any sample code available anywhere.
    For example I could do :
    create table x1 ( id number , f1 varchar2(10));
    creat table x2 ( id number , id_x1 number references x1(id) , f1 varchar2(10)) ;
    create table x3 ( id number , id_x2 number references x2(id), f1 varchar2(10)) ;
    To model this, I did
    create type x3_typ as object ( id number, id_x2 number , f1 varchar2(10)) ;
    create type x3_typ_t is table of x3_typ ;
    create type x2_typ as object ( id number, id_x1 number , f1 varchar2(10), x3_list x3_typ_t ) ;
    create type x2_typ_t is table of ref x2_typ ;
    create type x1_typ as object ( id number
    , f1 varchar2(10) , x2_list x2_typ_t ) ;
    create or replace view x3_x2 as
    select id , f1 , cast(multiset(select * from x3 ) as x3_typ_t ) as x3_list
    If I try to use a view again like as given below, I get the Oracle inconsistent datatypes error.
    create or replace view x2_x1 as
    select id , f1 , cast(multiset(select * from x3_x2 ) as x2_typ_t ) as x2_list
    I there a better way? Am I missing something? Please help.

  • Problem inserting data into database (increment problem)

    I have a servlet page that gets various data from a bean and executes multiple SQL statements to store this data. Beacuase i want to insert data into a number of tables that are related with a one to many relationship I am not using the auto increment function in mySQL. Instead i have created a counter bean that increments each time the servlet is involked. I am using this counter to set the primary key ID in the quesiton table that i insert data into and I am alos inserting it into another table as a foreign key which relates a number or records in the outcomes table to one record in the question table. I am havin a few problems getting it to work.
    Firstly the bean counter works but when the tomcat server is shutdown the counter is reset which will cause conflicts in the database no doubt and secondly even though i have not shut my server down i seem to be getting the following error saying there is a duplicate key even though there is no data in the database.
    Here is the exception.
    javax.servlet.ServletException: Duplicate entry '4' for key 1     org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)     org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
    org.apache.jsp.authoring.question_005fmanager.process_005fquestion_jsp._jspService(process_005fquestion_jsp.java:469)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    java.sql.SQLException: Duplicate entry '4' for key 1
    com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2851)
    com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1531)     com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:1366)     com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:952)     com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1974)     com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1897)     com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1758)     org.apache.jsp.authoring.question_005fmanager.process_005fquestion_jsp._jspService(process_005fquestion_jsp.java:140)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    My code is here
    // gets the feedback string parameters
         if(request.getParameterValues("feedbackBox") != null)
                   String[] feedbackList = request.getParameterValues("feedbackBox");
                   questionData.feedback = feedbackList;
         //gets the session username variable
         String insertQuestion1__username = null;
         if(session.getValue("MM_Username") != null){ insertQuestion1__username = (String)session.getValue("MM_Username");}
         //Creates a new mySQL date
         java.sql.Date currentDate = new java.sql.Date((new java.util.Date()).getTime());
         //goes thorugh each element of the scores array and calculates maxScore 
         questionData.maxScore = 0;
         for (int i = 0; i < questionData.scores.length; i++) {
                   questionData.maxScore = questionData.maxScore + questionData.scores;
         //increments count;
         synchronized(page) {
    appCounter.increaseCount();
         int counter = appCounter.count;
         Driver DriverinsertQuestion = (Driver)Class.forName(MM_connQuestion_DRIVER).newInstance();
         Connection ConninsertQuestion1 = DriverManager.getConnection(MM_connQuestion_STRING,MM_connQuestion_USERNAME,MM_connQuestion_PASSWORD);
         questionData.numOutcomes = questionData.choices.length;
         while (counter != 0)
              int questionID = counter;
              PreparedStatement insertQuestion1 = ConninsertQuestion1.prepareStatement("INSERT INTO Question.question (Question_ID, Topic_ID, Description, Image, Author, Created_Date, Max_Score, Question_Type) VALUES (" + questionID + ", '" + questionData.topicID + "', '" + questionData.questionText + "', '" + questionData.questionImage + "', '" insertQuestion1__username "', '" + currentDate + "', " + questionData.maxScore + ", '" + questionData.questionType + "') ");
              insertQuestion1.executeUpdate();          
         Driver DriverinsertQuestion2 = (Driver)Class.forName(MM_connAnswer_DRIVER).newInstance();
         Connection ConninsertQuestion2 = DriverManager.getConnection(MM_connAnswer_STRING,MM_connAnswer_USERNAME,MM_connAnswer_PASSWORD);
         PreparedStatement insertQuestion2 = ConninsertQuestion2.prepareStatement("INSERT INTO Answer.question (Question_ID, Question_Description, Question_Type, Topic, Number_Outcomes, Question_Wording) VALUES ('" counter "', '" questionData.questionLabel "', '" questionData.questionType "', '" questionData.questionType "', '" questionData.topicID "', '" questionData.numOutcomes "', '" questionData.questionText "' ) ");
         insertQuestion2.executeUpdate();
         Driver DriverinsertOutcomes = (Driver)Class.forName(MM_connAnswer_DRIVER).newInstance();
         Connection ConninsertOutcomes = DriverManager.getConnection(MM_connAnswer_STRING,MM_connAnswer_USERNAME,MM_connAnswer_PASSWORD);
         for (int i=0; i < questionData.numOutcomes; i ++)
         PreparedStatement insertOutcomes = ConninsertOutcomes.prepareStatement("INSERT INTO Answer.outcome (Question_ID, Outcome_Number, Outcome_Text, Score, Feedback) VALUES ( '" counter "', '" i "', '" +questionData.choices[i]+ "', '" +questionData.scores[i]+ "', '" +questionData.feedback[i]+ "' ) ");
         insertOutcomes.executeUpdate();
    Does anyone know where i am going wrong or how to fix this problem. I would like to know wheter i am doing this the right way. Is thjis the most practical way to use a counter bean or is there a better safer way to do it.
    Suggestions would be mcuh appreciated
    Thanks

    hi Narendran,
        i declared itab as follows
    DATA:      tb_final TYPE STANDARD TABLE OF ztable,
                       wa_final TYPE ztable.    "work area
    i am populating tb_final as follows:
                 wa_final-vkorg = wa_ycostctr_kunwe-vkorg.
                  wa_final-vtweg = wa_ycostctr_kunwe-vtweg.
                  wa_final-spart = wa_ycostctr_kunwe-spart.
                  wa_final-kunwe = wa_ycostctr_kunwe-kunwe.
                  wa_final-kondm = wa_ycostctr_kunwe-kondm.
                  wa_final-kschl = wa_ycostctr_2-kschl.
                  wa_final-hkont = wa_ycostctr_2-saknr.
                  wa_final-kostl = wa_ycostctr_kunwe-kostl.
            APPEND wa_final TO tb_final.
                  CLEAR wa_final.
    here i am not populating Mandt field.
    finally in tb_final am not getting the proper data .
    kindly help me.
    Thanks,
    Praveena

  • Problem inserting XML doc (character set)

    Hi all,
    I'm having trouble trying to insert XML either "posting" it (xsql) or "putting" it
    (OracleXML putXML).
    The error that I get: "not supported
    oracle-character-set-174".
    The environment is:
    Oracle 8i 8.1.5
    (NLS_CHARACTERSET EL8MSWIN1253 for greek)
    JDK 1.2.2
    Apache Web Server 1.3.11
    Apache JServ 1.1
    XSQL v 0.9.9.1 and
    XMLSQL, XML parser v2 that comes with it.
    I had dropped all java classes and reloaded
    them using oraclexmlsqlload batch file.
    But still getting the same error.
    The thing that is that I am
    able to insert XML doc that was generated
    with an authoring tool called W4F that extracts data from HTML pages and map them to
    XML document, even with greek characters
    in it. But when XML is generated using
    an editor or the servlet like the following:
    newschedule.xsql like
    <?xml version="1.0"?>
    <?xml-stylesheet type="text/xsl" href="latestschedules.xsl"?>
    <page connection="dtv" xmlns:xsql="urn:oracle-xsql">
    <xsql:insert-request date-format="DD'/'MM'/'YYYY" table="schedule_details_view"
    transform="request-to-newschedule.xsl"/>
    <xsql:query table="schedule"
    tag-case="lower" max-rows="5" rowset-element="latestschedules"
    row-element="schedule">
    select *
    from schedules
    order by schedule_id desc
    </xsql:query>
    </page>
    request-to-newschedule.xsl like
    <?xml version = '1.0'?>
    <ROWSET xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xsl:version="1.0">
    <xsl:for-each select="request/parameters">
    <ROW>
    <SCHEDULE_ID><xsl:value-of select="Schedule_id_field"/></SCHEDULE_ID>
    <DESCRIPTION><xsl:value-of select="Description_field"/></DESCRIPTION>
    <DETAILS>
    <DETAILS_ITEM>
    <STARTING_TIME><xsl:value-of select="Starting_Time_field_1"/></STARTING_TIME>
    <DURATION><xsl:value-of select="Duration_field_1"/></DURATION>
    </DETAILS_ITEM>
    <DETAILS_ITEM>
    <STARTING_TIME><xsl:value-of select="Starting_Time_field_2"/></STARTING_TIME>
    <DURATION><xsl:value-of select="Duration_field_2"/></DURATION>
    </DETAILS_ITEM>
    <DETAILS_ITEM>
    <STARTING_TIME><xsl:value-of select="Starting_Time_field_3"/></STARTING_TIME>
    <DURATION><xsl:value-of select="Duration_field_3"/></DURATION>
    </DETAILS_ITEM>
    <DETAILS_ITEM>
    <STARTING_TIME><xsl:value-of select="Starting_Time_field_4"/></STARTING_TIME>
    <DURATION><xsl:value-of select="Duration_field_4"/></DURATION>
    </DETAILS_ITEM>
    <DETAILS_ITEM>
    <STARTING_TIME><xsl:value-of select="Starting_Time_field_5"/></STARTING_TIME>
    <DURATION><xsl:value-of select="Duration_field_5"/></DURATION>
    </DETAILS_ITEM>
    </DETAILS>
    </ROW>
    </xsl:for-each>
    </ROWSET>
    Hope that someone could help me on this ...
    Any advice is highly appreciated.
    Thanks in advance
    Nicos Gabrielides
    email: [email protected]

    Hi,
    How about applying an XSL on the existing XML doc to create another XML doc to filter out the table column not found in the target db table, so that all the columns are matched and then use putXML to load?
    Hope that helps.
    OTN team@IDC

  • Problem - Inserting Records into Hashed Tables

    Help for an ABAP Newbie...
    How do I insert records into a hashed table?
    I am trying the following, but get the error message,
    *You cannot use explicit or implicit index operations with types "HASHED TABLE" or "ANY TABLE".  "LT_UNIQUE_NAME_KEYS" has the type "HASHED TABLE".
    TYPES: BEGIN OF idline,
        id TYPE i,
        END OF idline.
      DATA: lt_unique_name_keys TYPE HASHED TABLE OF idline WITH UNIQUE KEY id,
            ls_unique_name_key LIKE LINE OF lt_unique_name_keys.
    " Create a record and attempt to insert it into the internal table.
    " Why does this cause a compilation error message?
    ls_unique_name_key-id = 1.
      INSERT ls_unique_name_key INTO lt_unique_name_keys.
    Thanks,
    Walter

    INSERT ls_unique_name_key INTO TABLE lt_unique_name_keys.

  • Problem inserting date into MS SQL Server

    I am trying insert date into MS SQL Server database. First I used Statement and when I insert the date only date used to be inserted properly and the time used to be always 12:00:00 AM. I tried PreparedStatement and when I insert I get an error message:
    SQL Error: [Microsoft][ODBC SQL Server Driver]Optional feature not implemented
    I have attached the code.
    GregorianCalendar cal = new GregorianCalendar();
    java.util.Date dtm = (java.util.Date)cal.getTime();
    SimpleDateFormat formatOb = new SimpleDateFormat("dd/MM/yy hh:mm:ss");
    String date= (String)formatOb.format(dtm);
    dateCreated = new java.sql.Date(formatOb.parse(date).getTime());
    PreparedStatement psmt = con.prepareStatement("INSERT INTO Resume (ResumeName, Summary, Skills, OtherInformation, Interests, Memberships, Languages, Category, DateCreated, SupervisorName) VALUES(?,?,?,?,?,?,?,?,?,?)");
    psmt.setString(1, name);
    psmt.setString(2, summary);
    psmt.setString(3, skills);
    psmt.setString(4, info);
    psmt.setString(5, interest);
    psmt.setString(6, member);
    psmt.setString(7, language);
    psmt.setString(8, category);
    psmt.setDate(9, dateCreated);
    psmt.setString(10, loginName);
    psmt.executeUpdate();
    Any suggestions will be really helpful.

    Thanks,
    I changed the field in the database of DateCreated to timestamp, but when I insert the some binary data is inserted into the database. something like 0000000000000017D.
    I installed jtds-0.8.1 driver from source forge. but when try to connect to the database I get an error as:
    Connection refused: connect
    Error: Connection refused: connect
    I have attached the code for setting the driver and url also.
    private String driver = "net.sourceforge.jtds.jdbc.Driver";
    private String url = "jdbc:jtds:sqlserver://TEKKATTE:1433/placement;TDS=7.0";

  • How do I implement an HTTP Get which returns XML into a View Object?

    I've got a 3rd party program which accepts an HTTP GET and returns information via XML. I'd like to take that XML and then populate a View Object.
    The examples given in the manual are only for JavaScript with an AJAX server that I don't have. Here's an example:
    function UpdateNow() {
         var req = new Ajax.Request("qbwc://docontrol/
         UpdateNow?async=true&AppName=WCWebService3", {method:'get',
         onSuccess:processDataOne, onFailure:reportError});
    }I've been to literally dozens of sites trying to answer my question, but I'm just not knowledgeable enough to know where to start. Can someone point me in the right direction?
    Using JDev 11.1.1.6
    Thanks,
    Will

    I guess the basics would be:
    Create a Java class that reads from the URL of the service:
    http://docs.oracle.com/javase/tutorial/networking/urls/readingURL.html
    Then get the XML that you read into the ADF BC VO using the readXML method of the VO.
    Example 18 here: https://blogs.oracle.com/smuenchadf/resource/examples#18

  • Problem inserting xml doc into tables

    I'm trying to load and xml doc into a table/columns using putXML. I clearly have elements in my xml doc that I do not want to load into the table. I am receiving the following error: The XML element tag 'VERB' does not match the name of any of the columns/attributes of the target database. I'm having difficulty figuring out how to exclude of ignore these elements.
    Any help would be greatly appreciated.
    Thanks,
    John

    Hi,
    How about applying an XSL on the existing XML doc to create another XML doc to filter out the table column not found in the target db table, so that all the columns are matched and then use putXML to load?
    Hope that helps.
    OTN team@IDC

  • Problem inserting String into postgresql.

    Hello,
    I have this code in postgresql:
    select merge_db(3, 1, '1901-1-1', '1901-1-1', '1901-1-1', 1, 1, 1, 1, 1, 1 , 1, 'hola', 1);
    That calls the function merge_db and inserts data, but it wont work in my java program:
    String queryPostgresql = "select merge_db("+ oid +", "+ uid +", to_timestamp("+ etime +"), to_timestamp("+ pstime +"), to_timestamp("+ rstime +"), "+ elapsed +", "+ espera +", "+ numcpu +", "+ numcpu +", "+ memory +", "+ error +", "+ memory +", "+ etiqueta +", "+ finalizado +")";
    The main problem is in the field "etiqueta" which is varchar in sql and String in java. It throws "ERROR: the column (content of the variable) does not exist"
    Also I'm not completely confident about the timestamp fields, I think they are causing problems too.
    This is the merge_db function:
    create function merge_db(key int, data1 int, data2 timestamp with time zone , data3 timestamp with time zone, data4 timestamp with time zone, data5 int, data6 int, data7 int, data8 int, data9 int, data10 int, data11 int, data12 text, data13 int) returns void as
    $$
    begin
    loop
    update trabajos set time_elapsed = data5 where oid = key;
    if found then
    return;
    end if;
    begin insert into trabajos(oid,uid,fecha_fin,fecha_acept,fecha_exec,time_elapsed,espera,ncpu,rec_ncpu,rec_memoria,error,memoria,etiqueta,finalizado) values (key, data1, data2, data3, data4, data5, data6, data7, data8, data9, data10, data11, data12, data13);
    return;
    exception when unique_violation then
    end;
    end loop;
    end;
    $$
    language plpgsql;
    Thank you!

    Here is my code then:
    Connection connPostgresql = DriverManager.getConnection(myUrlPostgresql, "database", "pass");
    Statement StmtPostgresql = connPostgresql.createStatement();
    String queryPostgresql = "select merge_db("+ oid +", "+ uid +", to_timestamp("+ etime +"), to_timestamp("+ pstime +"), to_timestamp("+ rstime +"),
    "+ elapsed +", "+ espera +", "+ numcpu +", "+ numcpu +", "+ memory +", "+ error +", "+ memory +", "+ etiqueta +", "+ finalizado +")";
    StmtPostgresql.executeUpdate(queryPostgresql);The function in postgresql is this one:
    create function merge_db(key int, data1 int, data2 timestamp with time zone , data3 timestamp with time zone,
    data4 timestamp with time zone, data5 int, data6 int, data7 int, data8 int, data9 int, data10 int, data11 int, data12 text, data13 int)
    returns void as
    $$
    begin
    loop
    update trabajos set time_elapsed = data5 where oid = key;
    if found then
    return;
    end if;
    begin
    insert into trabajos(oid,uid,fecha_fin,fecha_acept,fecha_exec,time_elapsed,espera,ncpu,rec_ncpu,rec_memoria,error,memoria,etiqueta,finalizado)
    values (key, data1, data2, data3, data4, data5, data6, data7, data8, data9, data10, data11, data12, data13);
    return;
    exception when unique_violation then
    end;
    end loop;
    end;
    $$
    language plpgsql;The problem is when i try to use preparedstatement i won't work and throw that exception.
    And another question (I'm a pain in the ass): Java is throwing an exception regarding postgresql that says "org.postgresql.util.PSQLException: A result was returned when none was expected"
    Thank you very much.
    Edited by: 850264 on 13/04/2011 08:31

  • Problem insert XML from ViewObject to Clob

    i write method insertXML() and have problem write to CLOB.
    public void insertXML(){
    ViewObject vo=getZlecenieView1();
    Row r = vo.getCurrentRow();
    Object t= vo.writeXML(1,XMLInterface.XML_OPT_ALL_ROWS);
    String xml=t.toString();
    r.setAttribute("Xml",new ClobDomain(xml));
    getDBTransaction().commit();
    system.out.println(xml) oracle.xml.parser.v2.XMLElement@196c67a
    I'cant cast to String vo.wirteXML(1,XMLInteface.XML_OPT_ALL_ROWS);
    how write method???

    I would suggest printing out the contents of the input as you receive them in the JSP.
    PS, your architecture smells. What's with the ActiveX objects? What's with putting all you business logic in JSPs?

Maybe you are looking for