Current Document Metadata insertion into Current Document
Help!! I need to place 'current document' metadata (not a placed photo, for instance) into the current document. I have been able to place the "File Name" into the current file and that works great. But I want to now place current file metadata, like 'Description' into the current file. How do I do this - is it from "Text Variables" and how?
I know where it is (in File Info). My questions is: "How do I place 'Current Document' information into the Current Document?
EXAMPLE: open up a text field anywhere in the document. then, have InDesign place into that text field information about the current document - "Description" for instance, from the Current Document Metadata.
Similar Messages
-
About insert into MDSYS.SDO_GEOM_METADATA_TABLE
Hi all,
I'm newbie with Oracle Spatial.
I would like to know what values can I define to columns SDO_LB and SDO_UB
for the dim element for SRID 8292 when I insert into table
MDSYS.SDO_GEOM_METADATA_TABLE.
I found the following example:
INSERT INTO MDSYS.SDO_GEOM_METADATA_TABLE
SDO_OWNER, SDO_TABLE_NAME, SDO_COLUMN_NAME,
SDO_DIMINFO,
SDO_SRID)
VALUES('PROJUSER', 'LOCAL', 'CD_LOCAL',
MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X', 500000, 600000, 0.05),
MDSYS.SDO_DIM_ELEMENT('Y', 7000000, 7020000, 0.05)),
8292);But I don't know if this insert is correct and the spatial index
is valid for SRID 8292.
Thank you very much!!!
[]´sHi,
8292 is a Geographic system, so this is the correct entry for metadata:
insert into user_sdo_geom_metadata values ( ...,
SDO_DIM_ARRAY(SDO_DIM_ELEMENT('X', -180, 180, .05),
SDO_DIM_ELEMENT('Y', -90, 90, .05)), 8292);
And you should never insert directly into the MDSYS.SDO_GEOM_METADATA_TABLE table.
You should always insert into USER_SDO_GEOM_METADATA view.
siva -
XML document convert into String and Insert into Database
Hello all,
In the FIle to File Scenario I want to send the data to the Reciever System in xml Document and convert into String and insert into Database.
Please can you tell me exact way how to send it.
Thanks & Regards,
RajHI,
As per my understanding your scenario is File to file where you will get output fiel in XML format.
Now that XMl payload need to be passed as single string in the database via XI.
You cauld do this but you need to imply some manipulations such as
With the help of standard API you need to concatenate the XML tags and create the structre along with the data.
For e.g. in your outpuf file the XML structre contain data as
<field1>ABCD</field1>
Then in mapping
The source field will be mappeda s concat(<field1>) + value of Source field "ABCD" + concat(</field1>) to the target field.
This is the way that you could achive the requirments else there is no direct way avaialble for it.
thanks
Swarup -
how do I save and insert into mail a scanned document?
Welcome to Apple Discussions
You want to "attach" it not insert it. Save the document - note the name and location. From that location you can drag one or more files into the message wherever you want the attachments to appear. You can also click the Attach icon in the toolbar, or choose File > Attach Files.
If a recipient is using Mail or another email application that retains the order of the contents of your message, the recipient sees the attachment in the same location where you inserted it. -
How to a composition from project insert into the current composition?
How to a composition(specific name) from current project insert into the current composition?
Good point about checking the name of the current comp, but then you don't need to enter the loop if the name ofthe object you find is the name of the current comp:
function insertComp(name)
var proj = app.project;
var comp = proj.activeItem;
if ( comp != null && comp instanceof CompItem)
var foundIt = null;
var curItem;
if(comp.name != name)
for(var a=1; a<=proj.numItems && foundIt == null; a++)
curItem = proj.item(a);
if(curItem instanceof CompItem && curItem.name == name)
foundIt = curItem;
if (foundIt != null)
app.beginUndoGroup("Insert Comp");
try
comp.layers.add(foundIt);
alert("All done!");
catch (err)
alert(err);
app.endUndoGroup();
else
alert("Not found");
else
alert("Can't add item to itself.");
else
alert("Open a comp first."); -
Strange behaviour on text insert into a HTML pane
Hi all,
I am trying to fix a problem on inserting a span tag into an existing html page (in an EDITABLE JEditorPane).
The behaviour:
Assuming the cells in a table (3 rows, 2 columns) are numbered from 1 to 6, with cell one being the top left most, cell 2 top right, cell 3 middle left, etc.
1. Inserting the text "<span></span>" in cell 4 causes during any attempt to later type into cell 5 the characters to be appended instead into cell 4, directly after the close span tag.
2. The insertion in the first place behaves strange. If I have the caret positioned for cell 5 so that I can insert there
(via the function void javax.swing.text.html.HTMLEditorKit.insertHTML(HTML Document doc, int offset, String html, int popDepth, int pushDepth, Tag insertTag) )
even though the caret position is visible in cell 5, the insertion seems to take place in cell 4.
I can sort of compensate for this by adding 1 to the offset. However, then when inserting into a line of text, for example, "the quick red fox jumped over the lazy dog"
I insert directly before the 'j' in 'jumped', the insertion looks like this "the quick red fox j<span>..</span>umped over the lazy dog"
So that is no solution.
IMPORTANT! Just to prove it is not the span tag causing the trouble, if this span tag already exists in a cell on 'Load' of the html file, the strange behaviour is not observed.
Something is going wrong here. It is me? Or is it a bug?
Please help!!
Here is a test app, and the test html you can use (place in current directory).
Please test like this:
1. run application (the html should be loaded into the pane)
2. the span tag is programmed to automatically insert at cell 4 (by using the +1 method on the insert)
3. another span tag was already existing in the html file, at cell 8
4. Attempt to type into cell 5
result: the text appears instead at cell 4
5. Type into cell 9
result: the text correctly is entered into cell 9
See the difference!!
Help!
The test java app:
package small.test;
import java.awt.BorderLayout;
import java.awt.Container;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.StringReader;
import javax.swing.JEditorPane;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.SwingUtilities;
import javax.swing.text.JTextComponent;
import javax.swing.text.html.HTML;
import javax.swing.text.html.HTMLDocument;
import javax.swing.text.html.HTMLEditorKit;
import javax.swing.text.html.parser.ParserDelegator;
public class HtmlInsertTest extends JEditorPane
public HtmlInsertTest()
public static void main(String args[])
JFrame frame = new JFrame("Loading/Saving Example");
Container content = frame.getContentPane();
frame.setSize(600, 600);
final HtmlInsertTest editorPane = new HtmlInsertTest();
editorPane.setEditable(true);
JScrollPane scrollPane = new JScrollPane(editorPane);
content.add(scrollPane, BorderLayout.CENTER);
editorPane.setEditorKit(new HTMLEditorKit());
JPanel panel = new JPanel();
content.add(panel, BorderLayout.SOUTH);
frame.setSize(600, 600);
doLoadCommand(editorPane);
editorPane.insertHTML("<span>inserted text</span>", 84);
frame.setVisible(true);
public static String getHTML()
return
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">"+
"<HTML>"+ "<HEAD>"+
" <META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=utf-8\">"+
" <TITLE></TITLE>"+
"</HEAD>"+
"<BODY LANG=\"en-AU\" DIR=\"LTR\">"+
"<P STYLE=\"margin-bottom: 0cm\">This is a test xhtml document. "+
" </P>"+
" <P STYLE=\"margin-bottom: 0cm\">"+
" </P>"+
" <P STYLE=\"margin-bottom: 0cm\">Here is a table:</P>"+
" <P STYLE=\"margin-bottom: 0cm\">"+
" </P>"+
" <p></p>"+
" <TABLE WIDTH=100% BORDER=1 BORDERCOLOR=\"#000000\" CELLPADDING=4 CELLSPACING=0>"+
" <TR VALIGN=TOP>"+
" <TD WIDTH=50%>"+
" <P>It has</P>"+
" </TD>"+
" <TD WIDTH=50%>"+
" <P>2 columns</P>"+
" </TD>"+
" </TR>"+
" <TR VALIGN=TOP>"+
" <TD WIDTH=50%><P>And 4 rows</P></TD>"+
" <TD WIDTH=50%><P></P></TD>"+
" </TR>"+
" <TR VALIGN=TOP>"+
" <TD WIDTH=50%><P></P></TD>"+
" <TD WIDTH=50%><P></P></TD>"+
" </TR>"+
" <TR VALIGN=TOP>"+
" <TD WIDTH=50%><P></P></TD>"+
" <TD WIDTH=50%><P><span>existing text</span></P></TD>"+
" </TR>"+
" <TR VALIGN=TOP>"+
" <TD WIDTH=50%><P></P></TD>"+
" <TD WIDTH=50%><P></P></TD>"+
" </TR>"+
" </TABLE>"+
" <P STYLE=\"margin-bottom: 0cm\">"+
" </P>"+
" <P STYLE=\"margin-bottom: 0cm\">"+
" </P>"+
" <P STYLE=\"margin-bottom: 0cm\">"+
" </P>"+
" <P STYLE=\"margin-bottom: 0cm\">We will test the drag and drop"+
" functionality with this document. "+
" </P>"+
" <P STYLE=\"margin-bottom: 0cm\">It will be loaded with the hlml editor.</P>"+
" <P STYLE=\"margin-bottom: 0cm\">"+
" </P>"+
" <P STYLE=\"margin-bottom: 0cm\">"+
" </P>"+
" </BODY>"+
" </HTML>";
public static void doLoadCommand(JTextComponent textComponent)
StringReader reader = null;
try
System.out.println("Loading");
reader = new StringReader(getHTML());
// Create empty HTMLDocument to read into
HTMLEditorKit htmlKit = new HTMLEditorKit();
HTMLDocument htmlDoc = (HTMLDocument)htmlKit.createDefaultDocument();
// Create parser (javax.swing.text.html.parser.ParserDelegator)
HTMLEditorKit.Parser parser = new ParserDelegator();
// Get parser callback from document
HTMLEditorKit.ParserCallback callback = htmlDoc.getReader(0);
// Load it (true means to ignore character set)
parser.parse(reader, callback, true);
// Replace document
textComponent.setDocument(htmlDoc);
System.out.println("Loaded");
catch (Exception exception)
System.out.println("Load oops");
exception.printStackTrace();
finally
if (reader != null)
reader.close();
public void insertHTML(String text, int offset)
SwingUtilities.invokeLater(new insertAction(this, text, offset));
class insertAction implements Runnable
String text = "";
int offset = 0;
JEditorPane jEditorPane1 = null;
public insertAction(JEditorPane _jEditorPane1, String _text, int _offset)
jEditorPane1 = _jEditorPane1;
text = _text;
offset = _offset;
@Override
public void run()
HTMLDocument doc = (HTMLDocument)jEditorPane1.getDocument();
HTMLEditorKit kit = (HTMLEditorKit)jEditorPane1.getEditorKit();
try
System.out.println("reading from string reader");
kit.insertHTML( doc,
offset,//+1
text,
0,//0
0,//0
HTML.Tag.SPAN);
System.out.println(jEditorPane1.getText());
catch (Exception e)
System.out.println("error inserting html: " + e);
}Edited by: svaens on Jul 16, 2009 6:34 PM
fix another stuffed up attempt at a SSCCE.Well, I know nothing about HTML in JEditorPanes. I have never been able to figure out how insertions work.
My comment was a warning to others. Some people (like me) avoid answering posting of this type for reasons given in the JavaRanch link. Others will answer anyway. Other might first check the other site to see if they are wasting there time, but they can only do that if a link was posted with the original question.
The only suggestion I have is to repost the question, (since this posting is now completely off topic) making sure to then respond to this posting stating that a fresh question has been asked so you don't get a discussion going on in two places. -
How to pass the chinese input insert into DB
hi guys,
i am the new one in developing the multilingual software.
let me explain :
the tools used are :
Jboss 4.0.4 , MySQL, Eclipse.
user key in the chinese or other languages[like greek] in the jsp page. then will uses <form .......... method="post" action="create_user_confirm.jsp"> to redirect the page to create_user_confirm.jsp . In this page request.getParameter is used to get those input and send them to java code to insert into DB.
my difficulty now is from input jsp page to create_user_confirm.jsp page, i couldnt send the chinese word (greek or spanish) to the 2nd page by using request.getParameter("").it shows me the funny symbols below are some of code of my jsp pages.
nput.jsp
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ page import="java.util.Locale"%>
<%@ page import="org.apache.commons.codec.binary.Base64"%>
<%
Locale.setDefault(Locale.SIMPLIFIED_CHINESE);
try {
%>
<jsp:include page="/top.jsp" />
<p class="headline"><%=mpmservice.getLang(user.getLang(), "create_user_title")%></p>
<form name="operatordetails" id="operatordetails" method="post" action="create_user_confirm.jsp">
<input type=hidden name=s value="<%=request.getParameter("s")%>">
<table class="infotable" id="report">
<tr>
<td class="left"><%=mpmservice.getLang(user.getLang(), "create_user_label_name")%></td>
<td class="middle" colspan="2"><input class="middle" name="name" type="text" id="name" size="35" value="<%=name%>" /></td>
</tr>
<tr>
<td colspan="4" style="height: 23px">
<p style="border-bottom: gray 1px solid;"> </p>
</td>
</tr>
<tr>
<td class="left"><%=mpmservice.getLang(user.getLang(), "create_user_label_description")%></td>
<td class="middle" colspan="2"><input class="middle" name="description" type="text" id="description" size="35" value="<%=description%>" /></td>
</tr>
<tr>
<td colspan="4" style="height: 23px">
<p style="border-bottom: gray 1px solid;"> </p>
</td>
</tr>
<tr>
<td class="left"><%=mpmservice.getLang(user.getLang(), "create_user_label_phone_number")%></td>
<td class="middle" colspan="2"><input class="middle" name="phonenumber" type="text" id="phonenumber" size="35" value="<%=phonenumber %>" /></td>
</tr>
<tr>
<td colspan="4" style="height: 23px">
<p style="border-bottom: gray 1px solid;"> </p>
</td>
</tr>
<tr>
<td class="left"><%=mpmservice.getLang(user.getLang(), "create_user_label_password")%></td>
<td class="middle" colspan="2"><input class="middle"name="password1" type="password" id="password1" size="35" /></td>
</tr>
<tr>
<td colspan="4" style="height: 23px">
<p style="border-bottom: gray 1px solid;"> </p>
</td>
</tr>
<tr>
<td class="left"><%=mpmservice.getLang(user.getLang(), "create_user_label_passwordrepeat")%></td>
<td class="middle" colspan="2"><input class="middle" name="password2" type="password" id="password2" size="35" /></td>
</tr>
<tr>
<td colspan="4" style="height: 23px">
<p style="border-bottom: gray 1px solid;"> </p>
</td>
</tr>
<tr>
<td class="left"><%=mpmservice.getLang(user.getLang(), "create_user_label_privilege")%></td>
<td class="middle" colspan="2"><select class="middle" name="privilege" id="privilege">
<tr>
<td class="left"> </td>
<td class="halfmiddle">
<input class="halfmiddle" name="Create" type="submit" id="Create" value="<%=mpmservice.getLang(user.getLang(), "create_user")%>" />
</td>
<td class="halfmiddle">
<input class="halfmiddle" name="Cancel" type="button" id="Cancel" value="<%=mpmservice.getLang(user.getLang(), "cancel")%>" onClick="location='create_user.jsp?s=<%=request.getParameter("s")%>&msg=&name=&description=&phonenumber='" />
</td>
<td class="right"> </td>
</tr>
</table>
</form>
<jsp:include page="/bottom.jsp" />
<% } %>
create_user_confirm.jsp
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ page import="javax.naming.Context"%>
<%@ page import="javax.naming.InitialContext"%>
<%@ page import="java.util.Locale"%>
<%@ page import="org.apache.commons.codec.binary.Base64"%>
<%
Locale.setDefault(Locale.SIMPLIFIED_CHINESE);
try {
if (ok) {
String name = request.getParameter("name");
String description = request.getParameter("description");
String phonenumber = request.getParameter("phonenumber");
String password1 = request.getParameter("password1");
String password2 = request.getParameter("password2");
String[] privilege = request.getParameterValues("privilege");
if (name == null)
name = "";
if (description == null)
description = "";
if (phonenumber == null)
phonenumber = "";
if (password1 == null)
password1 = "";
if (password2 == null)
password2 = "";
LSUser user1 = null;
%>
<jsp:include page="/top.jsp" />
<p class="headline"><%=mpmservice.getLang(user.getLang(), "create_user_title")%></p>
<form name="operatordetails" id="operatordetails" method="post" action="create_user_do.jsp">
<input type=hidden name=s value="<%=request.getParameter("s")%>">
<input type=hidden name=name value="<%=name%>">
<input type=hidden name=description value="<%=description%>">
<input type=hidden name=password1 value="<%=password1%>">
<input type=hidden name=phonenumber value="<%=phonenumber%>">
<input type=hidden name=msg value="<%=message%>">
<table class="infotable" id="report">
<tr>
<td class="left"><%=mpmservice.getLang(user.getLang(), "create_user_label_name")%></td>
<td class="middle" colspan="2"><%=name%></td>
<td class="right"> </td>
</tr>
<tr>
<td colspan="4" style="height: 23px">
<p style="border-bottom: gray 1px solid;"> </p>
</td>
</tr>
<tr>
<td class="left"><%=mpmservice.getLang(user.getLang(), "create_user_label_description")%></td>
<td class="middle" colspan="2"><%=description%></td>
<td class="right"> </td>
</tr>
<tr>
<td colspan="4" style="height: 23px">
<p style="border-bottom: gray 1px solid;"> </p>
</td>
</tr>
<% if(!phonenumber.equals("")) { %>
<tr>
<td class="left"><%=mpmservice.getLang(user.getLang(), "create_user_label_phone_number")%></td>
<td class="middle" colspan="2"><%=request.getParameter("phonenumber")%></td>
<td class="right"> </td>
</tr>
<tr>
<td colspan="4" style="height: 23px">
<p style="border-bottom: gray 1px solid;"> </p>
</td>
</tr>
<% } %>
<tr>
<td colspan="4" style="height: 23px">
<p style="border-bottom: gray 1px solid;"> </p>
</td>
</tr>
<tr>
<td class="left"> </td>
<td class="halfmiddle">
<input class="halfmiddle" name="Create" type="submit" id="Create" value="<%=mpmservice.getLang(user.getLang(), "create_user")%>" />
</td>
<td class="halfmiddle">
<input class="halfmiddle" name="Cancel" type="button" id="Cancel" value="<%=mpmservice.getLang(user.getLang(), "cancel")%>" onClick="location='create_user.jsp?s=<%=request.getParameter("s")%>&msg=<%=message%>&name=<%=name%>&description=<%=description%>&phonenumber=<%=request.getParameter("phonenumber")%><%=privStr%>'" />
</td>
<td class="right"> </td>
</tr>
</table>
</form>
<jsp:include page="/bottom.jsp" />
<% } %>
i really appreciate whoever reply this post. thanks a lot.hi skalster,
thanks for your reply. currently i use Jboss to make the connection and the configuration to mySQL. the code as such :
<datasources>
<local-tx-datasource>
<jndi-name>RTA_DS</jndi-name>
<connection-url>jdbc:mysql://localhost:3306/jbossdb</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>root</user-name>
<password></password>
<min-pool-size>5</min-pool-size>
<max-pool-size>20</max-pool-size>
<metadata>
<type-mapping>mySQL</type-mapping>
</metadata>
</local-tx-datasource>
</datasources>so whatever there is a insertion or retrieval, the system will call entity bean and there is no DB configuration on my code side. all done by Jboss. but now i am more concern on chinese word or other languages which are able to pass the chinese parameter within jsp pages. now i am facing the problem which user key in the chinese or other language's input,it is fail to pass to another jsp (create_user_confirm.jsp) to do the validation. it appears as those funny character from input.jsp to create_user_confirm.jsp by using request.getparameter(). any idea to solve this matter?the source code of the 2 jsp files are at the previous message. i really thanks for your reply.
have a nice day -
hi,guruvulu
this is the program...............to insert the data into sap r/3 table
but record is not inserting....any commit i have to write in my program?
Created on Feb 20, 2007
TODO To change the template for this generated file go to
Window - Preferences - Java - Code Style - Code Templates
package comm;
@author sapusr006
TODO To change the template for this generated type comment go to
Window - Preferences - Java - Code Style - Code Templates
Example2.java
Property of SAP AG, Walldorf
(c) Copyright SAP AG, Walldorf, 2000-2005.
All rights reserved.
//import java.sql.Connection;
//import java.sql.PreparedStatement;
import com.sap.mw.jco.IFunctionTemplate;
import com.sap.mw.jco.IRepository;
import com.sap.mw.jco.JCO;
@version 1.0
@author SAP AG, Walldorf
public class Fm {
// The MySAP.com system we gonna be using
static final String SID = "R3";
// static String query="insert into BAPI_COMPANYCODE_GETLIST values(?,?)";
// The repository we will be using
IRepository repository;
//ESTABLISHING A CONNECTION TO SAP
public Fm()
try {
JCO.addClientPool( SID, // Alias for this pool
10, // Max. number of connections
"800", // SAP client
"RFCTEST", // userid
"welcome", // password
"EN", // language
"10.10.88.170", // host name
"01" );
// Create a new repository
// The repository caches the function and structure definitions
// to be used for all calls to the system SID. The creation of
// redundant instances cause performance and memory waste.
repository = JCO.createRepository("MYRepository", SID);
catch (JCO.Exception ex) {
System.out.println("Caught an exception: \n" + ex);
// RETRIEVES AND DISPLAY A ZHR INFOTYPE OPERATION
public void salesOrders()
JCO.Client client = null;
try {
// Get a function template from the repository
//System.out.println("goes to sales order");
IFunctionTemplate ftemplate = repository.getFunctionTemplate("ZHR_INFOTYPE_OPERATION");
System.out.println("hai");
if(ftemplate != null) {
// Create a function from the template
JCO.Function function = ftemplate.getFunction();
JCO.ParameterList paralist=function.getImportParameterList();
paralist.setValue("0000000011","PERNR");
paralist.setValue("UPD","ACTIO");
paralist.setValue("A","TCLAS");
System.out.println("hello");
paralist.setValue("20061215","BEGDA");
System.out.println("hello");
paralist.setValue("20061215","ENDDA");
paralist.setValue("1","OBJPS");
paralist.setValue("LTA","SUBTY");
System.out.println("SETTING VALUES");
// Get a client from the pool
client = JCO.getClient(SID);
System.out.println("goes to sales order");
//function.getImportParameterList().setValue("QUERY_TABLE","ZHRJ2EETEST");
//EXECUTING THE FUNCTION
client.execute(function);
System.out.println("after exeucting the function");
// NO OF IMPORT PARAMS IT DISPLAY
//STRUCTURE
JCO.Structure returnStructure =
function.getExportParameterList().getStructure("RETURN");
String structure=returnStructure.toString();
System.out.println(structure);
JCO.Table sales_orders = function.getTableParameterList().getTable("PROPOSED_VALUES");
System.out.println("after function");
System.out.println("proposed111"+sales_orders.getNumRows());
sales_orders.firstRow();
sales_orders.appendRows(3);
sales_orders.setValue("0582","INFTY");
sales_orders.setValue("P0582-AMTEX","FNAME");
sales_orders.setValue("200.00","FVAL");
sales_orders.nextRow();
sales_orders.setValue("0582","INFTY");
sales_orders.setValue("P0582-JBGDT","FNAME");
sales_orders.setValue("20061215","FVAL");
sales_orders.nextRow();
sales_orders.setValue("0582","INFTY");
sales_orders.setValue("P0582-JENDT","FNAME");
sales_orders.setValue("20061215","FVAL");
System.out.println("proposed222"+sales_orders.getNumRows());
/*for (int i = 0; i <sales_orders.getNumRows(); i++) {
sales_orders.setRow(i);
System.out.println(sales_orders.getString("INFTY"));
JCO.Table sales_orders1 = function.getTableParameterList().getTable("MODIFIED_KEYS");
System.out.println("modified"+sales_orders1.getNumRows());
sales_orders1.setRow(1);
sales_orders1.appendRows(1);
sales_orders1.setValue("0000000011","PERNR");
sales_orders1.setValue("0582","INFTY");
sales_orders1.setValue("LTA","SUBTY");
sales_orders1.setValue("1","OBJPS");
sales_orders1.setValue("20061215","BEGDA");
sales_orders1.setValue("20061215","ENDDA");
System.out.println("modified222"+sales_orders1.getNumRows());
System.out.println("execute222"+sales_orders1.getNumRows());
for (int i = 0; i <sales_orders1.getNumRows(); i++) {
sales_orders.setRow(i);
System.out.println("hia"+sales_orders1.getString("SUBTY"));
System.out.println("NO OF ROWS ARE:---"+ sales_orders.getNumRows());
String fieldName[]=new String[sales_orders.getFieldCount()];
System.out.println("THE COLUMNS IN THE TABLE ARE:--"+sales_orders.getFieldCount());
// sales_orders.firstRow();
//COLUMNS NAMES
System.out.println(fieldName.length);
for (int iCtrst = 0;iCtrst < sales_orders1.getFieldCount();iCtrst++) {
fieldName[iCtrst] = sales_orders1.getName(iCtrst);
System.out.println(fieldName[iCtrst]);
if (sales_orders.getNumRows() > 0) {
// Loop over all rows
do {
System.out.println("----
//int r=1;
// Loop over all columns in the current row
for (JCO.FieldIterator e = sales_orders.fields(); e.hasMoreElements();)
JCO.Field field = e.nextField();
String compcode=field.getString();
//pst.setString(r,compcode);
System.out.println(field.getName() + ":\t" + field.getString());
// r++;
}//for
// i=pst.executeUpdate();
} while(sales_orders.nextRow());
else {
System.out.println("No results found");
if (sales_orders1.getNumRows() > 0) {
// Loop over all rows
do {
System.out.println("----
//int r=1;
// Loop over all columns in the current row
for (JCO.FieldIterator e = sales_orders1.fields(); e.hasMoreElements();)
JCO.Field field1 = e.nextField();
//String compcode=field1.getString();
//pst.setString(r,compcode);
System.out.println(field1.getName() + ":\t" + field1.getString());
// r++;
}//for
// i=pst.executeUpdate();
} while(sales_orders1.nextRow());
else {
System.out.println("No results found");
System.out.println("modified"+sales_orders1.getNumRows());
System.out.println("modified"+sales_orders.getNumRows());
//if
/* if(i>=1)
System.out.println("\t\t\tUpdated ORACLE successfully");
else {
System.out.println("FUNCTION MODULE not found in backend system.");
}//if
catch (JCO.AbapException ex) {
System.out.println("Caught an exception: \n" + ex);
}catch(Exception en){en.printStackTrace();}
finally {
JCO.releaseClient(client);
protected void cleanUp() {
JCO.removeClientPool(SID);
public static void main(String[] argv)
Fm e=new Fm();
// e.systemInfo();
e.salesOrders();
e.cleanUp();
output:
TABLE: MODIFIED_KEYS
TABLE: PROPOSED_VALUES
IMPORT ACTIO
IMPORT BEGDA
IMPORT DIALOG_MODE
IMPORT ENDDA
IMPORT LUW_MODE
IMPORT MASSN
IMPORT NO_ENQUEUE
IMPORT NO_EXISTENCE_CHECK
IMPORT OBJPS
IMPORT PERNR
IMPORT PERSG
IMPORT PERSK
IMPORT PLANS
IMPORT SEQNR
IMPORT SPRPS
IMPORT SUBTY
IMPORT TCLAS
IMPORT WERKS
EXPORT HR_RETURN
EXPORT RETURN
EXPORT RETURN1
appending
NO OF ROWS ARE:---3
THE COLUMNS IN THE TABLE ARE:--4
INFTY: 0582
FNAME: P0582-AMTEX
FVAL: 200.00
SEQNR: 00
INFTY: 0582
FNAME: P0582-JBGDT
FVAL: 20061215
SEQNR: 00
INFTY: 0582
FNAME: P0582-JENDT
FVAL: 20061215
SEQNR: 00
PERNR: 00000011
INFTY: 0582
SUBTY: LTA
OBJPS: 1
SPRPS:
ENDDA: 2006-12-15
BEGDA: 2006-12-15
SEQNR: 000hi jagadesh,
ur code is very length to see.
see the following code ,
JCO.Function objFunction =
this
.objIRepository
.getFunctionTemplate("BAPI_MATERIAL_AVAILABILITY")
.getFunction();
objFunction.getImportParameterList().setValue(strPlant, "PLANT");
objFunction.getImportParameterList().setValue(strMaterial, "MATERIAL");
objFunction.getImportParameterList().setValue(strQuantity, "UNIT");
this.objClient.execute(objFunction);
JCO.Structure ret =
objFunction.getExportParameterList().getStructure("RETURN");
String strRetMsg = ret.getString("MESSAGE");
System.out.println(strRetMsg); // it will tell whether record is inserted or not
/*JCO.Function objFunction1 =
this
.objIRepository
.getFunctionTemplate("BAPI_TRANSACTION_COMMIT")
.getFunction();
objFunction1.setValue("",WAIT);
objClient.execute(objFunction1);*/
CHECK THE RETURN MSG .IT WILL TELL THE PROBLEM
give me points if it is useful
regards
Guru
Message was edited by:
Guruvulu Bojja
Message was edited by:
Guruvulu Bojja
Message was edited by:
Guruvulu Bojja -
Hallo,
We have the problem that subscriptions cannot be sent. In defaultTrace I have found following entry:
#1.5 #32B150008004002400001641000710B80004539FE52B4274#1217846116565#com.sapportals.wcm.repository.service.subscription.wcm.SubscriptionsOpenSQL#sap.com/irj#com.sapportals.wcm.repository.service.subscription.wcm.SubscriptionsOpenSQL#LI01736#118449##iscp63.isc.aok.de_LFP_399377450#LI01736#03186780621111ddb4c432b150008004#SAPEngine_Application_Thread[impl:3]_10##0#0#Fatal##Plain###Cannot unsubscribe user. Context: ResourceContext: user=LI01736, creationTime=1217846116420, locale=de. User: LI01736. ID: 50cdd784-51ac-2810-2393-ea9709f50de3. Recipient: com.sapportals.wcm.util.channels.wcm.Recipient@ce9b7f70. Step: Executing SQL INSERT. . Trying to rollback transaction.#
#1.5 #32B150008004002400001643000710B80004539FE52B989A#1217846116586#com.sap.sql.jdbc.common.StatementAnalyzerImpl#sap.com/irj#com.sap.sql.jdbc.common.StatementAnalyzerImpl#LI01736#118449##iscp63.isc.aok.de_LFP_399377450#LI01736#03186780621111ddb4c432b150008004#SAPEngine_Application_Thread[impl:3]_10##0#0#Error#1#/System/Database/sql/jdbc/common#Java#com.sap.sql_0019##Exception of type com.sap.sql.log.OpenSQLException caught: The SQL statement "INSERT INTO "KMC_SUB_RCPT" ("ID","RECIPIENT","RCPTTYPE","UNSUBSCRIBED") VALUES ('50cdd784-51ac-2810-2393-ea9709f50de3','LI01736','0','X')" contains the semantics error[s]: - 1:27 - the column >>ID<< is undefined in the current scope
[EXCEPTION]
#3#com.sap.sql.log.OpenSQLException#The SQL statement "INSERT INTO "KMC_SUB_RCPT" ("ID","RECIPIENT","RCPTTYPE","UNSUBSCRIBED") VALUES ('50cdd784-51ac-2810-2393-ea9709f50de3','LI01736','0','X')" contains the semantics error[s]: - 1:27 - the column >>ID<< is undefined in the current scope
#com.sap.sql.log.OpenSQLException: The SQL statement "INSERT INTO "KMC_SUB_RCPT" ("ID","RECIPIENT","RCPTTYPE","UNSUBSCRIBED") VALUES ('50cdd784-51ac-2810-2393-ea9709f50de3','LI01736','0','X')" contains the semantics error[s]: - 1:27 - the column >>ID<< is undefined in the current scope
at com.sap.sql.jdbc.common.StatementAnalyzerImpl.check(StatementAnalyzerImpl.java:38)
at com.sap.sql.jdbc.common.StatementAnalyzerImpl.preprepareStatement(StatementAnalyzerImpl.java:101)
at com.sap.sql.jdbc.common.StatementAnalyzerImpl.preprepareStatement(StatementAnalyzerImpl.java:87)
at com.sap.sql.jdbc.common.CommonStatementImpl.executeUpdate(CommonStatementImpl.java:159)
at com.sap.engine.services.dbpool.wrappers.StatementWrapper.executeUpdate(StatementWrapper.java:162)
at com.sapportals.wcm.repository.service.subscription.wcm.SubscriptionsOpenSQL$SqlCommand.executeUpdate(SubscriptionsOpenSQL.java:3834)
at com.sapportals.wcm.repository.service.subscription.wcm.SubscriptionsOpenSQL.unsubscribe(SubscriptionsOpenSQL.java:2127)
at com.sapportals.wcm.repository.service.subscription.wcm.SubscriptionManager.unsubscribe(SubscriptionManager.java:3226)
at com.sapportals.wcm.repository.service.subscription.wcm.SubscriptionManager.unsubscribe(SubscriptionManager.java:3205)
at com.sapportals.wcm.repository.service.subscription.wcm.ActionInboxItemProducer.executeItemAction(ActionInboxItemProducer.java:222)
at com.sapportals.wcm.service.actioninbox.wcm.ActionInboxService.executeItemAction(ActionInboxService.java:610)
at com.sapportals.wcm.service.actioninbox.wcm.ActionInboxService.executeItemActions(ActionInboxService.java:1221)
at com.sapportals.wcm.control.actioninbox.ActionInboxDetailsControl.onClick(ActionInboxDetailsControl.java:396)
Any Idea?
Regards,
GerhardStatement statement = connection.createStatement();
//createing a statement object
String query= "INSERT INTO table......"
output.append("\nSending query:" + connection.nativeSQL(query));
int result = statement.executeUpdate(query);//updates database wit record
if (result==1)
output.append("\ninsertation successfull");
JOptionPane.showMessageDialog(null,"Insertation successfull ",
JOptionPane.INFORMATION_MESSAGE);
else
output.append("\ninsertation unsuccessfull");
JOptionPane.showMessageDialog(null,"Insertation unsuccessfull",
JOptionPane.WARNING_MESSAGE);
statement.close();
have left out the trys and catches and some other bits and pieces that i dont think ud need its the bare bones but it might help or at least give u an idea. have used this code before to do something similar. -
Diffrence between backend insert and front end insert into a table.
I am developing a conversion program for tax exemption. For this program only ZX_EXEMPTIONS table is used to populate the data and we got confirmation from Oracle also regarding this.For inserting the data into this table we are taking the max of tax_exemption_id which is pk for this table and adding one to it and inserting into the table. But problem here is after inserting from back end we are not able to insert from front end.
It seems backend data is holding the tax_exemption_id which is suppose to reserve by front end data.Please explain the different behavior of populating of tax_exemption_id from front end and back end.Hi,
i think the problem is that you are using max-value + 1 for tax_exemption_id. But as ZX_EXEMPTIONS is using sequence ZX_EXEMPTIONS_S
for primary key generation, you encounter situation that you are increasing PK Id for this table without increasing sequence value.
When trying to insert rows from front end - which probably uses sequence value - it tries to use a sequence value already used by your backend
process (which generated it by Maxvalue + 1) and would then encounter a primary key violation.
I think you should use sequence mentioned above to generate your PK Ids in backend process as well. And before doing so, check current value
of ZX_EXEMPTIONS_S, as you might need to rebuild the sequence in order to select nextval sucessfully for both frontend and backend.
Regards -
Reading special characters from a flat file and inserting into DB
I'm reading data with special characters like . etc from a flat file , assigning the data to variable in my anonymous block and inserting into my DB. But the show up as inverted ? s. Any clues about how to do this?
If i try to do the insert directly it works. It seems like the error occurs when reading this data into a variable
thanks for the help
Lalit Bhatialalit, this is probably an character set problem, the default on Database creation tends to be 7bit Ascii which does not support special characters, it's been a while since I set up a db in this way, but you need to change settings in oracle.ini. The db will need to be restarted for this. Also, to check current settings try:
select * from NLS_DATABASE_PARAMETERS
You want an 8bit, unicode or multibyte character set. Sorry I cannot remember moer off the top of my head, try searching on NLS or character set -
Error when inserting into dynamically created filename-file
Howry
Am am receiving the following error when i am trying to insert into a file that have a dynamic filename (through declared variable, as date etc.).
I presume it is trying to look for the target file with the same name as the dynamic value passed through by the variable, but cannot find it- can anyone tell me how i can rather create the file as appose to insert into an already created file..?
Your help in this regard is much appreciated.
Here is the error:
ODI-1217: Session SAPO_hlr_suburbs (1577001) fails with return code 7000.
ODI-1226: Step 6_Ins_final fails after 1 attempt(s).
ODI-1240: Flow 6_Ins_final fails while performing a Integration operation. This flow loads target table #l_date.unl.
ODI-1228: Task 6_Ins_final (Integration) fails on the target FILE connection SAPO_HLR_SUBURBS.
Caused By: java.sql.SQLException: File C:\Files\Gero work\ODI In Files\SAPO_HLR_SUBURBS/2012-01-24 12:06:13.463.unl was not found
at com.sunopsis.jdbc.driver.file.FileConnection.prepareForWriting(FileConnection.java:339)
at com.sunopsis.jdbc.driver.file.impl.commands.CommandInsert.execute(CommandInsert.java:50)
at com.sunopsis.jdbc.driver.file.CommandExecutor.executeCommand(CommandExecutor.java:33)
at com.sunopsis.jdbc.driver.file.FilePreparedStatement.executeUpdate(FilePreparedStatement.java:138)
at com.sunopsis.sql.SnpsQuery.executeUpdate(SnpsQuery.java:665)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.executeUpdate(SnpSessTaskSql.java:3218)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execStdOrders(SnpSessTaskSql.java:1785)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java:2805)
at com.sunopsis.dwg.dbobj.SnpSessTaskSqlI.treatTaskTrt(SnpSessTaskSqlI.java:68)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2515)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:534)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:449)
at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:1954)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:322)
at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:224)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:246)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:237)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:794)
at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:114)
at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)
at java.lang.Thread.run(Thread.java:619)What operating system are you using?
The name of your file has the time within it , you cant have a filename with ':' in it on Windows.
Try using ALPHANUMERIC datatype for the variable and pull the current datetime as a char with something like :
select to_char( sysdate ,'YYYY-MM_DD HHMISS') from dual -
XML Data Inserts into Tables???
hi there,
will i be able to an insertXML call onto a table wherein i need to just insert a few node values into couple of fields in the table and leave the other fields unpopulated? - aka - i need to grab the node values from the XML file and then store it to respective fields in the table with the insertXML call - something like::
OracleXMLSave.insertXML(value-of(node1), value-of(node2)) table1.field1, table1.field2;
is something like the above statement possible?
Thanks..
nullIf your XML Document looks like:
<ROWSET>
<ROW>
<FIELD1>val-1</FIELD1>
<FIELD12>val-12</FIELD12>
</ROW>
</ROWSET>
it will insert into just those two
fields, the rest will be null for
the purposes of the insert. -
Hi,
I should remember this but . . . bug with t-sql using Insert Into on a temp table. It is unhappy with fields I'm trying to insert.
It's probably the fact that I'm trying to using some default data w/ aliases for a couple of the fields.
Have a look at code please, and tell me how to correct. Thanks!
DECLARE @OrderNo varchar(6)
USE tempdb;
set @OrderNo = '909773' ;
IF OBJECT_ID ('#tmpNCGLITEMS') IS NOT NULL --how to get this to work with SSMS w/o reloading the qry window. i.e. how to release to delete????
DROP TABLE #tmpNCGLItems
use DEV_ORDERS;
SELECT distinct od.lline as OrdLine, od.ldrcolor as ClrCode, od.ldrspec as SpecCode, ad.Addon_Mod_GL_Acct as ncGLCode
INTO #tmpNCGLItems
FROM OODETL od
INNER JOIN [Dev_Products].[dbo].[Addon_Master] ad on od.lfg = ad.Addon_Mod_Mod_Code_ID AND ad.Addon_Mod_A_C_D_ID = 'C'
WHERE od.LOrder = @OrderNo and ad.Addon_Mod_GL_Acct is not null
select * from #tmpNCGLItems
USE tempdb;
IF OBJECT_ID ('#tmpNCGLITEMS1') IS NOT NULL
DROP TABLE #tmpNCGLItems1
USE DEV_ORDERS;
CREATE TABLE [dbo].[#tmpNCGLItems1](
[OrdLine] [char](4) NOT NULL,
[ClrCode] [char](6) NULL,
[SpecCode] [varchar](6) NULL,
[ClrUPorDiscAmt] money NULL, [SpecUPorDiscAmt] money NULL,
[ncGLCode] [varchar](10) NULL, [lPrice] money Null
) ON [PRIMARY]
--insert into below is failing. Says fields don't match----Msg 213, Level 16, State 1, Line 33
--Insert Error: Column name or number of supplied values does not match table definition.
--but. . . I think I have 7 fields and I think the datatypes match?
INSERT INTO #tmpNCGLItems1
SELECT ordLine, ClrCode, SpecCode, 0 as [ClrUPorDiscAmt], 0 as [SpecUPorDiscAmt], ncGLCode,
SUM(od.lextendprice) as lPrice
FROM #tmpNCGLItems tmp JOIN OODETL od on tmp.OrdLine = od.lline
WHERE od.lorder = @OrderNo
GROUP BY ordLine, ClrCode, SpecCode, NcGLCode>> I should remember this but . . . bug with T-SQL using Insert Into on a temp table. It is unhappy with fields [sic] I'm trying to insert. It's probably the fact that I'm trying to using some default data w/ aliases for a couple
of the fields [sic: columns are not fields]. <<
Temp tables are how a bad programmer fakes a scratch tape so his SQL can look like magnetic tape files. We do not like to materialize data on the disk unless we have to.
And data element do not change names from table to table in a schema! Get rid of the aliases, even tho they are closer to ISO-11179 than the base table crap.
But you are an old FORTRAN programmer! Your "OODETL” is six uppercase letters as required by FORTRAN I; an SQL programmer would have used something like “Order_Details” instead. The mix of camelCase, FORTRAN and several other non-SQL languages is scary.
Why did you use MONEY? It is not portable and the math is wrong. Google it! Why do you think that “<something>_code_id” makes any sense? A data element can be a “<something>_code” or a “<something>_id” but never that hybrid disaster.
I would do this with VIEWs so that I know the data is always current.
CREATE VIEW NC_GL_Items (..)
AS
SELECT DISTINCT OD.l_line, OD.ldr_color, OD.ldr_spec,
AD.addon_mod_gl_acct
FROM Oodetl AS OD,
Addon_Master AS AD
WHERE ..;
The SELECT DISTINCT should not be there. An account should not be NULL, etc. Why do you have more nulls in one table than entire accounting systems? Why do you set integer zero to an amount, which should be a decimal for money?
This is a crazy quilt that is clearly a bitch to maintain or even read. Can you clean it up or are you screwed?
--CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
in Sets / Trees and Hierarchies in SQL -
ORA-07445 in the alert log when inserting into table with XMLType column
I'm trying to insert an xml-document into a table with a schema-based XMLType column. When I try to insert a row (using plsql-developer) - oracle is busy for a few seconds and then the connection to oracle is lost.
Below you''ll find the following to recreate the problem:
a) contents from the alert log
b) create script for the table
c) the before-insert trigger
d) the xml-schema
e) code for registering the schema
f) the test program
g) platform information
Alert Log:
Fri Aug 17 00:44:11 2007
Errors in file /oracle/app/oracle/product/10.2.0/db_1/admin/dntspilot2/udump/dntspilot2_ora_13807.trc:
ORA-07445: exception encountered: core dump [SIGSEGV] [Address not mapped to object] [475177] [] [] []
Create script for the table:
CREATE TABLE "DNTSB"."SIGNATURETABLE"
( "XML_DOCUMENT" "SYS"."XMLTYPE" ,
"TS" TIMESTAMP (6) WITH TIME ZONE NOT NULL ENABLE
) XMLTYPE COLUMN "XML_DOCUMENT" XMLSCHEMA "http://www.sporfori.fo/schemas/www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd" ELEMENT "Object"
ROWDEPENDENCIES ;
Before-insert trigger:
create or replace trigger BIS_SIGNATURETABLE
before insert on signaturetable
for each row
declare
-- local variables here
l_sigtab_rec signaturetable%rowtype;
begin
if (:new.xml_document is not null) then
:new.xml_document.schemavalidate();
end if;
l_sigtab_rec.xml_document := :new.xml_document;
end BIS_SIGNATURETABLE2;
XML-Schema (xmldsig-core-schema.xsd):
=====================================================================================
<?xml version="1.0" encoding="utf-8"?>
<!-- Schema for XML Signatures
http://www.w3.org/2000/09/xmldsig#
$Revision: 1.1 $ on $Date: 2002/02/08 20:32:26 $ by $Author: reagle $
Copyright 2001 The Internet Society and W3C (Massachusetts Institute
of Technology, Institut National de Recherche en Informatique et en
Automatique, Keio University). All Rights Reserved.
http://www.w3.org/Consortium/Legal/
This document is governed by the W3C Software License [1] as described
in the FAQ [2].
[1] http://www.w3.org/Consortium/Legal/copyright-software-19980720
[2] http://www.w3.org/Consortium/Legal/IPR-FAQ-20000620.html#DTD
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:xdb="http://xmlns.oracle.com/xdb"
targetNamespace="http://www.w3.org/2000/09/xmldsig#" version="0.1" elementFormDefault="qualified">
<!-- Basic Types Defined for Signatures -->
<xs:simpleType name="CryptoBinary">
<xs:restriction base="xs:base64Binary">
</xs:restriction>
</xs:simpleType>
<!-- Start Signature -->
<xs:element name="Signature" type="ds:SignatureType"/>
<xs:complexType name="SignatureType">
<xs:sequence>
<xs:element ref="ds:SignedInfo"/>
<xs:element ref="ds:SignatureValue"/>
<xs:element ref="ds:KeyInfo" minOccurs="0"/>
<xs:element ref="ds:Object" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="Id" type="xs:ID" use="optional"/>
</xs:complexType>
<xs:element name="SignatureValue" type="ds:SignatureValueType"/>
<xs:complexType name="SignatureValueType">
<xs:simpleContent>
<xs:extension base="xs:base64Binary">
<xs:attribute name="Id" type="xs:ID" use="optional"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<!-- Start SignedInfo -->
<xs:element name="SignedInfo" type="ds:SignedInfoType"/>
<xs:complexType name="SignedInfoType">
<xs:sequence>
<xs:element ref="ds:CanonicalizationMethod"/>
<xs:element ref="ds:SignatureMethod"/>
<xs:element ref="ds:Reference" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="Id" type="xs:ID" use="optional"/>
</xs:complexType>
<xs:element name="CanonicalizationMethod" type="ds:CanonicalizationMethodType"/>
<xs:complexType name="CanonicalizationMethodType" mixed="true">
<xs:sequence>
<xs:any namespace="##any" minOccurs="0" maxOccurs="unbounded"/>
<!-- (0,unbounded) elements from (1,1) namespace -->
</xs:sequence>
<xs:attribute name="Algorithm" type="xs:anyURI" use="required"/>
</xs:complexType>
<xs:element name="SignatureMethod" type="ds:SignatureMethodType"/>
<xs:complexType name="SignatureMethodType" mixed="true">
<xs:sequence>
<xs:element name="HMACOutputLength" minOccurs="0" type="ds:HMACOutputLengthType"/>
<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
<!-- (0,unbounded) elements from (1,1) external namespace -->
</xs:sequence>
<xs:attribute name="Algorithm" type="xs:anyURI" use="required"/>
</xs:complexType>
<!-- Start Reference -->
<xs:element name="Reference" type="ds:ReferenceType"/>
<xs:complexType name="ReferenceType">
<xs:sequence>
<xs:element ref="ds:Transforms" minOccurs="0"/>
<xs:element ref="ds:DigestMethod"/>
<xs:element ref="ds:DigestValue"/>
</xs:sequence>
<xs:attribute name="Id" type="xs:ID" use="optional"/>
<xs:attribute name="URI" type="xs:anyURI" use="optional"/>
<xs:attribute name="Type" type="xs:anyURI" use="optional"/>
</xs:complexType>
<xs:element name="Transforms" type="ds:TransformsType"/>
<xs:complexType name="TransformsType">
<xs:sequence>
<xs:element ref="ds:Transform" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:element name="Transform" type="ds:TransformType"/>
<xs:complexType name="TransformType" mixed="true">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:any namespace="##other" processContents="lax"/>
<!-- (1,1) elements from (0,unbounded) namespaces -->
<xs:element name="XPath" type="xs:string"/>
</xs:choice>
<xs:attribute name="Algorithm" type="xs:anyURI" use="required"/>
</xs:complexType>
<!-- End Reference -->
<xs:element name="DigestMethod" type="ds:DigestMethodType"/>
<xs:complexType name="DigestMethodType" mixed="true">
<xs:sequence>
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="Algorithm" type="xs:anyURI" use="required"/>
</xs:complexType>
<xs:element name="DigestValue" type="ds:DigestValueType"/>
<xs:simpleType name="DigestValueType">
<xs:restriction base="xs:base64Binary"/>
</xs:simpleType>
<!-- End SignedInfo -->
<!-- Start KeyInfo -->
<xs:element name="KeyInfo" type="ds:KeyInfoType"/>
<xs:complexType name="KeyInfoType" mixed="true">
<xs:choice maxOccurs="unbounded">
<xs:element ref="ds:KeyName"/>
<xs:element ref="ds:KeyValue"/>
<xs:element ref="ds:RetrievalMethod"/>
<xs:element ref="ds:X509Data"/>
<xs:element ref="ds:PGPData"/>
<xs:element ref="ds:SPKIData"/>
<xs:element ref="ds:MgmtData"/>
<xs:any processContents="lax" namespace="##other"/>
<!-- (1,1) elements from (0,unbounded) namespaces -->
</xs:choice>
<xs:attribute name="Id" type="xs:ID" use="optional"/>
</xs:complexType>
<xs:element name="KeyName" type="xs:string"/>
<xs:element name="MgmtData" type="xs:string"/>
<xs:element name="KeyValue" type="ds:KeyValueType"/>
<xs:complexType name="KeyValueType" mixed="true">
<xs:choice>
<xs:element ref="ds:DSAKeyValue"/>
<xs:element ref="ds:RSAKeyValue"/>
<xs:any namespace="##other" processContents="lax"/>
</xs:choice>
</xs:complexType>
<xs:element name="RetrievalMethod" type="ds:RetrievalMethodType"/>
<xs:complexType name="RetrievalMethodType">
<xs:sequence>
<xs:element ref="ds:Transforms" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="URI" type="xs:anyURI"/>
<xs:attribute name="Type" type="xs:anyURI" use="optional"/>
</xs:complexType>
<!-- Start X509Data -->
<xs:element name="X509Data" type="ds:X509DataType"/>
<xs:complexType name="X509DataType">
<xs:sequence maxOccurs="unbounded">
<xs:choice>
<xs:element name="X509IssuerSerial" type="ds:X509IssuerSerialType"/>
<xs:element name="X509SKI" type="xs:base64Binary"/>
<xs:element name="X509SubjectName" type="xs:string"/>
<xs:element name="X509Certificate" type="xs:base64Binary"/>
<xs:element name="X509CRL" type="xs:base64Binary"/>
<xs:any namespace="##other" processContents="lax"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
<xs:complexType name="X509IssuerSerialType">
<xs:sequence>
<xs:element name="X509IssuerName" type="xs:string"/>
<xs:element name="X509SerialNumber" type="xs:integer"/>
</xs:sequence>
</xs:complexType>
<!-- End X509Data -->
<!-- Begin PGPData -->
<xs:element name="PGPData" type="ds:PGPDataType"/>
<xs:complexType name="PGPDataType">
<xs:choice>
<xs:sequence>
<xs:element name="PGPKeyID" type="xs:base64Binary"/>
<xs:element name="PGPKeyPacket" type="xs:base64Binary" minOccurs="0"/>
<xs:any namespace="##other" processContents="lax" minOccurs="0"
maxOccurs="unbounded"/>
</xs:sequence>
<xs:sequence>
<xs:element name="PGPKeyPacket" type="xs:base64Binary"/>
<xs:any namespace="##other" processContents="lax" minOccurs="0"
maxOccurs="unbounded"/>
</xs:sequence>
</xs:choice>
</xs:complexType>
<!-- End PGPData -->
<!-- Begin SPKIData -->
<xs:element name="SPKIData" type="ds:SPKIDataType"/>
<xs:complexType name="SPKIDataType">
<xs:sequence maxOccurs="unbounded">
<xs:element name="SPKISexp" type="xs:base64Binary"/>
<xs:any namespace="##other" processContents="lax" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<!-- End SPKIData -->
<!-- End KeyInfo -->
<!-- Start Object (Manifest, SignatureProperty) -->
<xs:element name="Object" type="ds:ObjectType"/>
<xs:complexType name="ObjectType" mixed="true">
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:any namespace="##any" processContents="lax"/>
</xs:sequence>
<xs:attribute name="Id" type="xs:ID" use="optional"/>
<xs:attribute name="MimeType" type="xs:string" use="optional"/> <!-- add a grep facet -->
<xs:attribute name="Encoding" type="xs:anyURI" use="optional"/>
</xs:complexType>
<xs:element name="Manifest" type="ds:ManifestType"/>
<xs:complexType name="ManifestType">
<xs:sequence>
<xs:element ref="ds:Reference" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="Id" type="xs:ID" use="optional"/>
</xs:complexType>
<xs:element name="SignatureProperties" type="ds:SignaturePropertiesType"/>
<xs:complexType name="SignaturePropertiesType">
<xs:sequence>
<xs:element ref="ds:SignatureProperty" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="Id" type="xs:ID" use="optional"/>
</xs:complexType>
<xs:element name="SignatureProperty" type="ds:SignaturePropertyType"/>
<xs:complexType name="SignaturePropertyType" mixed="true">
<xs:choice maxOccurs="unbounded">
<xs:any namespace="##other" processContents="lax"/>
<!-- (1,1) elements from (1,unbounded) namespaces -->
</xs:choice>
<xs:attribute name="Target" type="xs:anyURI" use="required"/>
<xs:attribute name="Id" type="xs:ID" use="optional"/>
</xs:complexType>
<!-- End Object (Manifest, SignatureProperty) -->
<!-- Start Algorithm Parameters -->
<xs:simpleType name="HMACOutputLengthType">
<xs:restriction base="xs:integer"/>
</xs:simpleType>
<!-- Start KeyValue Element-types -->
<xs:element name="DSAKeyValue" type="ds:DSAKeyValueType"/>
<xs:complexType name="DSAKeyValueType">
<xs:sequence>
<xs:sequence minOccurs="0">
<xs:element name="P" type="ds:CryptoBinary"/>
<xs:element name="Q" type="ds:CryptoBinary"/>
</xs:sequence>
<xs:element name="G" type="ds:CryptoBinary" minOccurs="0"/>
<xs:element name="Y" type="ds:CryptoBinary"/>
<xs:element name="J" type="ds:CryptoBinary" minOccurs="0"/>
<xs:sequence minOccurs="0">
<xs:element name="Seed" type="ds:CryptoBinary"/>
<xs:element name="PgenCounter" type="ds:CryptoBinary"/>
</xs:sequence>
</xs:sequence>
</xs:complexType>
<xs:element name="RSAKeyValue" type="ds:RSAKeyValueType"/>
<xs:complexType name="RSAKeyValueType">
<xs:sequence>
<xs:element name="Modulus" type="ds:CryptoBinary"/>
<xs:element name="Exponent" type="ds:CryptoBinary"/>
</xs:sequence>
</xs:complexType>
<!-- End KeyValue Element-types -->
<!-- End Signature -->
</xs:schema>
===============================================================================
Code for registering the xml-schema
begin
dbms_xmlschema.deleteSchema('http://xmlns.oracle.com/xdb/schemas/DNTSB/www.sporfori.fo/schemas/www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd',
dbms_xmlschema.DELETE_CASCADE_FORCE);
end;
begin
DBMS_XMLSCHEMA.REGISTERURI(
schemaurl => 'http://www.sporfori.fo/schemas/www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd',
schemadocuri => 'http://www.sporfori.fo/schemas/www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd',
local => TRUE,
gentypes => TRUE,
genbean => FALSE,
gentables => TRUE,
force => FALSE,
owner => 'DNTSB',
options => 0);
end;
Test program
-- Created on 17-07-2006 by EEJ
declare
XML_TEXT3 CLOB := '<Object xmlns="http://www.w3.org/2000/09/xmldsig#">
<SignatureProperties>
<SignatureProperty Target="">
<Timestamp xmlns="http://www.sporfori.fo/schemas/dnts/general/2006/11/14">2007-05-10T12:00:00-05:00</Timestamp>
</SignatureProperty>
</SignatureProperties>
</Object>';
xmldoc xmltype;
begin
xmldoc := xmltype(xml_text3);
insert into signaturetable
(xml_document, ts)
values
(xmldoc, current_timestamp);
end;
Platform information
Operating system:
-bash-3.00$ uname -a
SunOS dntsdb 5.10 Generic_125101-09 i86pc i386 i86pc
SQLPlus:
SQL*Plus: Release 10.2.0.3.0 - Production on Fri Aug 17 00:15:13 2007
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
Enter password:
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
With the Partitioning and Data Mining options
Kind Regards,
EyðunYou should report this in a service request on http://metalink.oracle.com.
It is a shame that you put all the effort here to describe your problem, but on the other hand you can now also copy & paste the question to Oracle Support.
Because you are using 10.2.0.3; I am guessing that you have a valid service contract...
Maybe you are looking for
-
So after purchasing my new Xserve which i will be using as my company's primary mail server. i own a domain hosted by my ISP, and I have a static IP. I have also purchased a sonicwall pro 2040 firewall and have opened up the ports needed for the mail
-
Problem when Activating Design-Configuration objects
Hi Everyone, We are facing a strange error in our XI system. When we are trying to activate any design/configuration object, we get an error, which states: <b>ERROR com.sap.aii.utilxi.swing.toolkit.ExceptionDialog: Throwable Thrown: MESSAGE ID: com.s
-
Problem: Plugging an LED-display into my MBP 15"
Hello! I recently bought a BenQ G2222HDL 21.5" LED Monitor and I have encountered some problems when trying to connect it to my MBP via the Mini DisplayPort to DVI-adapter. My MBP (spring 2010) won't find the display but when I try to connect the dis
-
How to add new system call in solaris ?
Hi, I want to add new system call in solaris. please inform me steps for adding new system call in solaris. Thanks in advance, Mahantesh.
-
Problem with the installation of Muse
I install Muse and it doesn't work. In the top I can only quit or close Muse. I cannot open a document or have a new document. it seems that it's incomplete and I install it 2 times and it's still the same. Other apps work.