Error in reading the XML file
Hi,
I am trying to read the values of the node of XML file. The structure of the XML file is:
<?xml version = "1.0"?>
<DOCUMENT>
<LANGUAGE_TRANS>
<TRANSLATION>
<CODE>3</CODE>
<VALUE>Please select a number</VALUE>
</TRANSLATION>
<TRANSLATION>
<CODE>5</CODE>
<VALUE>Patni</VALUE>
</TRANSLATION>
<TRANSLATION>
<CODE>6</CODE>
<VALUE>Status Messages</VALUE>
</TRANSLATION>
<TRANSLATION>
<CODE>7</CODE>
<VALUE>Progress</VALUE>
</TRANSLATION>
<TRANSLATION>
<CODE>8</CODE>
<VALUE>Create Data Files...</VALUE>
</TRANSLATION>
<TRANSLATION>
<CODE>9</CODE>
<VALUE>OK</VALUE>
</TRANSLATION>
</LANGUAGE_TRANS>
</DOCUMENT>
I have written the code to read the value of the code from the XML file. When I run the code as written below. It doesnot give any error or exception. The node name returned is CODE as desired but the Node value returned is null which is not the desired result. Can anyone please help me to find where I am going wrong. Thanks a lot.
Regards,
Shweta
import java.net.*;
import java.util.*;
import oracle.xml.parser.v2.*;
import org.w3c.dom.*;
import org.xml.sax.SAXException;
public class MergeXMLTest
private static XMLDocument mDoc;
public MergeXMLTest () {
try {
// Get an instance of the parser
DOMParser lParser = new DOMParser();
// Generate a URL from the filename for UPDATE.XML file.
URL lUrl = createURL("mot.xml");
System.out.println("after creating the URL object ");
lParser.setErrorStream(System.out);
lParser.showWarnings(true);
lParser.parse(lUrl);
mDoc = lParser.getDocument();
System.out.println("after creating the URL object "+mDoc);
lParser.reset();
} catch (Exception e) {
e.printStackTrace();
} // end catch block
} // End of constructor
public void merge() throws DOMException {
try {
NodeList lTrans1 = this.mDoc.getElementsByTagName("CODE");
if(lTrans1.getLength()>0) {
Node lTransTag1 = lTrans1.item(0);
System.out.println("lTrans1.item(0).getNodeName : " + lTrans1.item(0).getNodeName());
System.out.println("lTrans1.item(0).getNodeValue : " + lTrans1.item(0).getNodeValue());
} catch (Exception e) {
System.out.println("Exception "+e);
e.printStackTrace();
} catch (Throwable t) {
System.out.println("Exception "+t);
public static URL createURL(String pFileName) throws MalformedURLException {
URL url = null;
Block of code to create a URL object from the file name
that is passed as parameter.
try {
url = new URL(pFileName);
} catch (MalformedURLException ex) {
File f = new File(pFileName);
String path = f.getAbsolutePath();
String fs = System.getProperty("file.separator");
System.out.println(" path of file : "+path +"separator " +fs);
if (fs.length() == 1) {
char sep = fs.charAt(0);
if (sep != '/')
path = path.replace(sep, '/');
if (path.charAt(0) != '/')
path = '/' + path;
path = "file://" + path;
System.out.println("path is : "+path);
// Try again, if this throws an exception we just raise it up
url = new URL(path);
} // End catch block
return url;
} // end method create URL
public static void main (String args[]) {
MergeXMLTest mXML = new MergeXMLTest();
mXML.merge();
}
see my answer here: http://forum.java.sun.com/thread.jsp?forum=34&thread=304647
ps. if you know a little of XPath, this is why text() is a special kind of node()...
Similar Messages
-
B2B - Email with XML attachment - Error in reading the xml file
Hello,
We have a requirement where an application sends an email with an xml attachment to a Lotus Notes (IMAP) mail box. I have configured the Partner, Agreements and Listening Channel to pick up the file from the mail box. Looks like when B2B is trying to read / store attachment, it errors out, there is no instance in B2B created. Looking at the logs, the file content is not read as XML, instead it seems like a text. When B2B tries to read the attachment it is not xml, there are no error messages as well.
The "Content type" in the Listening Channel is set to blank, so B2B can decide appropriate content type. Should this be set?
Could some one tell me what is wrong, not sure what is missing in the configuration.
Thanks,
Venkatesh
Here is the log in Trace 32.
[2013-03-18T19:03:34.212-05:00] [AdminServer] [NOTIFICATION] [] [oracle.soa.b2b.engine] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@e4012] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [APP: soa-infra] Repository:: getReceivingEndPointList: Delivery channel Id:CHANNEL_uGzsvLy-5972197188599763240
[2013-03-18T19:03:34.212-05:00] [AdminServer] [NOTIFICATION] [] [oracle.soa.b2b.engine] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@e4012] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [APP: soa-infra] Repository:: getReceivingEndPointList: name = host value = abcapp1.abc.com
[2013-03-18T19:03:34.212-05:00] [AdminServer] [NOTIFICATION] [] [oracle.soa.b2b.engine] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@e4012] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [APP: soa-infra] Repository:: getReceivingEndPointList: name = password value = ******
[2013-03-18T19:03:34.212-05:00] [AdminServer] [NOTIFICATION] [] [oracle.soa.b2b.engine] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@e4012] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [APP: soa-infra] Repository:: getReceivingEndPointList: name = user value = IDropshipabcTest
[2013-03-18T19:03:34.212-05:00] [AdminServer] [NOTIFICATION] [] [oracle.soa.b2b.engine] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@e4012] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [APP: soa-infra] Repository:: getReceivingEndPointList: name = polling_interval value = 60
[2013-03-18T19:03:34.212-05:00] [AdminServer] [NOTIFICATION] [] [oracle.soa.b2b.engine] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@e4012] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [APP: soa-infra] Repository:: getReceivingEndPointList: name = content-type value = null
[2013-03-18T19:03:34.212-05:00] [AdminServer] [NOTIFICATION] [] [oracle.soa.b2b.engine] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@e4012] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [APP: soa-infra] Repository:: getReceivingEndPointList: name = send as attachment value = null
[2013-03-18T19:03:34.212-05:00] [AdminServer] [NOTIFICATION] [] [oracle.soa.b2b.engine] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@e4012] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [APP: soa-infra] Repository:: getReceivingEndPointList: name = folder value = null
[2013-03-18T19:03:34.212-05:00] [AdminServer] [NOTIFICATION] [] [oracle.soa.b2b.engine] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@e4012] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [APP: soa-infra] Repository:: getReceivingEndPointList: name = email-id value = [email protected]
[2013-03-18T19:03:34.212-05:00] [AdminServer] [NOTIFICATION] [] [oracle.soa.b2b.engine] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@e4012] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [APP: soa-infra] Repository:: getReceivingEndPointList: name = subject value = null
[2013-03-18T19:03:34.212-05:00] [AdminServer] [NOTIFICATION] [] [oracle.soa.b2b.engine] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@e4012] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [APP: soa-infra] Repository:: getReceivingEndPointList: name = dateformat value = null
[2013-03-18T19:03:34.212-05:00] [AdminServer] [NOTIFICATION] [] [oracle.soa.b2b.engine] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@e4012] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [APP: soa-infra] Repository:: getReceivingEndPointList: name = eMail-server value = IMAP
[2013-03-18T19:03:34.212-05:00] [AdminServer] [NOTIFICATION] [] [oracle.soa.b2b.engine] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@e4012] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [APP: soa-infra] Repository:: getReceivingEndPointList: Putting imap://[email protected]
[2013-03-18T19:03:34.212-05:00] [AdminServer] [NOTIFICATION] [] [oracle.soa.b2b.engine] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@e4012] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [APP: soa-infra] Repository:: put: Putting imap://[email protected] for delivery channel CHANNEL_uGzsvLy-5972197188599763240
[2013-03-18T19:03:34.212-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.engine] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@e4012] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [SRC_CLASS: oracle.tip.b2b.system.DiagnosticService] [APP: soa-infra] [SRC_METHOD: synchedLog_J] Engine: addEndpoint: Adding endpoint...channel name abc_EmailVendor_LC
[2013-03-18T19:03:34.212-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.engine] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@e4012] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [SRC_CLASS: oracle.tip.b2b.system.DiagnosticService] [APP: soa-infra] [SRC_METHOD: synchedLog_J] Engine: addEndpoint: Endpoint url imap://[email protected]
[2013-03-18T19:03:34.212-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.engine] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@e4012] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [SRC_CLASS: oracle.tip.b2b.system.DiagnosticService] [APP: soa-infra] [SRC_METHOD: synchedLog_J] Engine: addEndpoint: Endpoint url imap://[email protected]
[2013-03-18T19:03:34.212-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.engine] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@e4012] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [SRC_CLASS: oracle.tip.b2b.system.DiagnosticService] [APP: soa-infra] [SRC_METHOD: synchedLog_J] Engine: addEndpoint: This is NOT a listening internal delivery channel imap://[email protected]
[2013-03-18T19:03:34.212-05:00] [AdminServer] [TRACE:32] [] [oracle.soa.b2b.engine] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@e4012] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [SRC_CLASS: oracle.tip.b2b.system.DiagnosticService] [APP: soa-infra] [SRC_METHOD: log] TransportLogger Init....
[2013-03-18T19:03:34.212-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.transport] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@e4012] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [SRC_CLASS: oracle.tip.b2b.transport.basic.TransportLogger] [APP: soa-infra] [SRC_METHOD: log] TransportProperties.TransportProperties():smtp.receiver.user=IDropshipTest;smtp.receiver.polling_interval=60;channelId=CHANNEL_uGzsvLy-5972197188599763240;[email protected];user=IDropshipTest;internal=false;smtp.receiver.password=******;polling_interval=60;smtp.receiver.protocol=imap;password=******;eMail-server=IMAP;host=abcapp1.abc.com;
[2013-03-18T19:03:34.212-05:00] [AdminServer] [TRACE:32] [] [oracle.soa.b2b.engine] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@169d2b1] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [SRC_CLASS: oracle.tip.b2b.system.DiagnosticService] [APP: soa-infra] [SRC_METHOD: log] B2BTransport.init(url) Endpoint = sftp://w108p-dmzftp01:22//Dev/Local/VEN-Dropship/FoamCraft url parameter = imap://[email protected]
[2013-03-18T19:03:34.212-05:00] [AdminServer] [TRACE:32] [] [oracle.soa.b2b.engine] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@169d2b1] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [SRC_CLASS: oracle.tip.b2b.system.DiagnosticService] [APP: soa-infra] [SRC_METHOD: log] B2BTransport.init(url) Endpoint = sftp://w108p-dmzftp01:22//Dev/Local/VEN-Dropship/JoyCarpets url parameter = imap://[email protected]
[2013-03-18T19:03:34.212-05:00] [AdminServer] [TRACE:32] [] [oracle.soa.b2b.engine] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@169d2b1] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [SRC_CLASS: oracle.tip.b2b.system.DiagnosticService] [APP: soa-infra] [SRC_METHOD: log] B2BTransport.init(url) Endpoint = sftp://w108p-dmzftp01:22//Dev/Local/VEN-Dropship/JoyCarpets/OrderResults url parameter = imap://[email protected]
[2013-03-18T19:03:34.212-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.engine] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@e4012] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [SRC_CLASS: oracle.tip.b2b.system.DiagnosticService] [APP: soa-infra] [SRC_METHOD: synchedLog_J] Engine: addEndpoint: Added new endpoint.
[2013-03-18T19:03:34.212-05:00] [AdminServer] [TRACE:32] [] [oracle.soa.b2b.engine] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@169d2b1] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [SRC_CLASS: oracle.tip.b2b.system.DiagnosticService] [APP: soa-infra] [SRC_METHOD: log] B2BTransport.init(url) Endpoint = imap://[email protected] url parameter = imap://[email protected]
[2013-03-18T19:03:34.212-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.engine] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@e4012] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [SRC_CLASS: oracle.tip.b2b.system.DiagnosticService] [APP: soa-infra] [SRC_METHOD: synchedLog_J] Engine: addEndpoint: Exit
[2013-03-18T19:03:34.212-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.transport] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@169d2b1] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [SRC_CLASS: oracle.tip.b2b.transport.basic.TransportLogger] [APP: soa-infra] [SRC_METHOD: log] SMTPReceiver.init() started ....
[2013-03-18T19:03:34.212-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.engine] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@e4012] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [SRC_CLASS: oracle.tip.b2b.system.DiagnosticService] [APP: soa-infra] [SRC_METHOD: synchedLog_J] Engine: handleUpdateChannelEvent: Exit
[2013-03-18T19:03:34.212-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.engine] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@e4012] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [SRC_CLASS: oracle.tip.b2b.system.DiagnosticService] [APP: soa-infra] [SRC_METHOD: synchedLog_J] Engine: processEvents: Exit
[2013-03-18T19:03:34.259-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.transport] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@169d2b1] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [SRC_CLASS: oracle.tip.b2b.transport.basic.TransportLogger] [APP: soa-infra] [SRC_METHOD: log] IMAPMonitor.setPollingInterval: polling time 60
[2013-03-18T19:03:34.259-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.transport] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@169d2b1] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [SRC_CLASS: oracle.tip.b2b.transport.basic.TransportLogger] [APP: soa-infra] [SRC_METHOD: log] SMTPReceiver.init() completed.
[2013-03-18T19:03:34.259-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.transport] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@169d2b1] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [SRC_CLASS: oracle.tip.b2b.transport.basic.TransportLogger] [APP: soa-infra] [SRC_METHOD: log] [IPT_SmtpRecPollingStatus] IMAPMonitor is up polling at 60 sec interval ...
[2013-03-18T19:03:34.259-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.transport] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@169d2b1] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [SRC_CLASS: oracle.tip.b2b.transport.basic.TransportLogger] [APP: soa-infra] [SRC_METHOD: log] IMAPMonitor.run shutdown is false, continuing
[2013-03-18T19:03:34.259-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.transport] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@169d2b1] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [SRC_CLASS: oracle.tip.b2b.transport.basic.TransportLogger] [APP: soa-infra] [SRC_METHOD: log] Total number of messages = 2
[2013-03-18T19:03:34.259-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.transport] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@169d2b1] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [SRC_CLASS: oracle.tip.b2b.transport.basic.TransportLogger] [APP: soa-infra] [SRC_METHOD: log] Number of new messages =0
[2013-03-18T19:03:34.259-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.transport] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@169d2b1] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [SRC_CLASS: oracle.tip.b2b.transport.basic.TransportLogger] [APP: soa-infra] [SRC_METHOD: log] Number of unread messages =0
[2013-03-18T19:03:34.259-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.transport] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@169d2b1] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [SRC_CLASS: oracle.tip.b2b.transport.basic.TransportLogger] [APP: soa-infra] [SRC_METHOD: log] Number of messages to be processed by IMAPMonitor = 2
[2013-03-18T19:03:34.259-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.transport] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@169d2b1] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [SRC_CLASS: oracle.tip.b2b.transport.basic.TransportLogger] [APP: soa-infra] [SRC_METHOD: log] IMAPMonitor.convertMailToTransport(): Converting message ...
[2013-03-18T19:03:34.446-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.transport] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@169d2b1] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [SRC_CLASS: oracle.tip.b2b.transport.basic.TransportLogger] [APP: soa-infra] [SRC_METHOD: log] IMAPMonitor.convertMailToTransport(): Message Type = BINARY
[2013-03-18T19:03:34.446-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.transport] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@169d2b1] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [SRC_CLASS: oracle.tip.b2b.transport.basic.TransportLogger] [APP: soa-infra] [SRC_METHOD: log] IMAPMonitor: Headers Importance - High
[2013-03-18T19:03:34.446-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.transport] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@169d2b1] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [SRC_CLASS: oracle.tip.b2b.transport.basic.TransportLogger] [APP: soa-infra] [SRC_METHOD: log] IMAPMonitor: Headers Subject - Inventory Quantity On Hand Update for 266219 as of 20130318 at 18:54
[2013-03-18T19:03:34.446-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.transport] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@169d2b1] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [SRC_CLASS: oracle.tip.b2b.transport.basic.TransportLogger] [APP: soa-infra] [SRC_METHOD: log] IMAPMonitor: Headers Auto-Submitted - auto-generated
[2013-03-18T19:03:34.446-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.transport] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@169d2b1] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [SRC_CLASS: oracle.tip.b2b.transport.basic.TransportLogger] [APP: soa-infra] [SRC_METHOD: log] IMAPMonitor: Headers To - [email protected]
[2013-03-18T19:03:34.446-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.transport] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@169d2b1] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [SRC_CLASS: oracle.tip.b2b.transport.basic.TransportLogger] [APP: soa-infra] [SRC_METHOD: log] IMAPMonitor: Headers Message-ID - <[email protected]>
[2013-03-18T19:03:34.446-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.transport] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@169d2b1] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [SRC_CLASS: oracle.tip.b2b.transport.basic.TransportLogger] [APP: soa-infra] [SRC_METHOD: log] IMAPMonitor: Headers Sender - [email protected]
[2013-03-18T19:03:34.446-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.transport] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@169d2b1] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [SRC_CLASS: oracle.tip.b2b.transport.basic.TransportLogger] [APP: soa-infra] [SRC_METHOD: log] IMAPMonitor: Headers Date - Mon, 18 Mar 2013 18:54:35 -0500
[2013-03-18T19:03:34.446-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.transport] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@169d2b1] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [SRC_CLASS: oracle.tip.b2b.transport.basic.TransportLogger] [APP: soa-infra] [SRC_METHOD: log] IMAPMonitor: Headers X-MIMETrack - Serialize by IMAP Server on abcAPP1/abc(Release 8.5.1|September 28, 2009) at[[
03/18/2013 19:03:33
[2013-03-18T19:03:34.446-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.transport] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@169d2b1] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [SRC_CLASS: oracle.tip.b2b.transport.basic.TransportLogger] [APP: soa-infra] [SRC_METHOD: log] IMAPMonitor: Headers MIME-Version - 1.0
[2013-03-18T19:03:34.446-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.transport] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@169d2b1] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [SRC_CLASS: oracle.tip.b2b.transport.basic.TransportLogger] [APP: soa-infra] [SRC_METHOD: log] IMAPMonitor: Headers Content-type - multipart/mixed; [[
Boundary="0__=09BBF1A1DF10DC2F8f9e8a93df938690918c09BBF1A1DF10DC2F"
[2013-03-18T19:03:34.446-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.transport] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@169d2b1] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [SRC_CLASS: oracle.tip.b2b.transport.basic.TransportLogger] [APP: soa-infra] [SRC_METHOD: log] IMAPMonitor: Headers Content-Disposition - inline
[2013-03-18T19:03:34.509-05:00] [AdminServer] [TRACE:32] [] [oracle.soa.b2b.engine] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@169d2b1] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [SRC_CLASS: oracle.tip.b2b.system.DiagnosticService] [APP: soa-infra] [SRC_METHOD: log] COntentHandler backcompat: true
[2013-03-18T19:03:34.509-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.transport] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@169d2b1] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [SRC_CLASS: oracle.tip.b2b.transport.basic.TransportLogger] [APP: soa-infra] [SRC_METHOD: log] IMAPMonitor: MultiPart Message
[2013-03-18T19:03:34.509-05:00] [AdminServer] [TRACE:32] [] [oracle.soa.b2b.engine] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@169d2b1] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [SRC_CLASS: oracle.tip.b2b.system.DiagnosticService] [APP: soa-infra] [SRC_METHOD: log] COntentHandler backcompat: true
[2013-03-18T19:03:34.509-05:00] [AdminServer] [TRACE:32] [] [oracle.soa.b2b.engine] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@169d2b1] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [SRC_CLASS: oracle.tip.b2b.system.DiagnosticService] [APP: soa-infra] [SRC_METHOD: log] COntentHandler backcompat: true
[2013-03-18T19:03:34.556-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.transport] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@169d2b1] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-52575d59:13d7daec7d5:-8000-000000000000d14d,0] [SRC_CLASS: oracle.tip.b2b.transport.basic.TransportLogger] [APP: soa-infra] [SRC_METHOD: log] IMAPMonitor.saveAttachment(): PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiID8+DQo8SW52ZW50b3J5VXBkYXRl[[
IHhtbG5zOnhzaT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEtaW5zdGFuY2UiDQp4
c2k6c2NoZW1hTG9jYXRpb249Imh0dHA6Ly93d3cuZXhhbXBsZS5vcmcgSW52ZW50b3J5VXBkYXRl
LnhzZCINCnhtbG5zPSJodHRwOi8vd3d3LmV4YW1wbGUub3JnIj4NCjxEYXRlPjIwMTMtMDMtMTg8
L0RhdGU+DQo8VGltZT4xODo1NDo0NDwvVGltZT4NCjxUeXBlPiBGdWxsIDwvVHlwZT4NCjxWZW5k
b3JJRD4yNjYyMTk8L1ZlbmRvcklEPg0KPEl0ZW0+DQo8U2t1PjQ8L1NrdT4NCjxRdWFudGl0eT4w
PC9RdWFudGl0eT4NCjxDb3N0PjE1LjU8L0Nvc3Q+DQo8TmV3Q29zdD4xNS41PC9OZXdDb3N0Pg0K
PE5ld0Nvc3RFZmZEYXRlPjIwMTMtMDMtMTg8L05ld0Nvc3RFZmZEYXRlPg0KPFN0YXR1cz4NCjxT
Caused by: java.sql.SQLException: ORA-01461: can bind a LONG value only for insert into a LONG column
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:457)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:889)Thanks Anuj,
After setting the property, I am no longer receiving the error, however, still fails with a different error, "Exception occurs in conversion from mail to TransportMessage. Please make sure the message sent is in correct format." and "TransportMessage cannot be created from mail. Skip this mail."
The error appears after / while, executing, IMAPMonitor.saveAttachment():
Is this a problem with the attachment or the email?
here is the log,
[2013-03-19T09:16:23.264-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.transport] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@11c2050] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-67aaafb8:13d82f27adb:-8000-0000000000000204,1:26833] [SRC_CLASS: oracle.tip.b2b.transport.basic.TransportLogger] [APP: soa-infra] [SRC_METHOD: log] IMAPMonitor.run(): IMAPMonitor goes to sleep for 60 secs ...
[2013-03-19T09:17:23.266-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.transport] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@11c2050] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-67aaafb8:13d82f27adb:-8000-0000000000000204,1:26833] [SRC_CLASS: oracle.tip.b2b.transport.basic.TransportLogger] [APP: soa-infra] [SRC_METHOD: log] IMAPMonitor.run: wake up. shutdown_ = false
[2013-03-19T09:17:23.266-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.transport] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@11c2050] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-67aaafb8:13d82f27adb:-8000-0000000000000204,1:26833] [SRC_CLASS: oracle.tip.b2b.transport.basic.TransportLogger] [APP: soa-infra] [SRC_METHOD: log] IMAPMonitor.run shutdown is false, continuing
[2013-03-19T09:17:23.313-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.transport] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@11c2050] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-67aaafb8:13d82f27adb:-8000-0000000000000204,1:26833] [SRC_CLASS: oracle.tip.b2b.transport.basic.TransportLogger] [APP: soa-infra] [SRC_METHOD: log] Total number of messages = 1
[2013-03-19T09:17:23.313-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.transport] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@11c2050] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-67aaafb8:13d82f27adb:-8000-0000000000000204,1:26833] [SRC_CLASS: oracle.tip.b2b.transport.basic.TransportLogger] [APP: soa-infra] [SRC_METHOD: log] Number of new messages =0
[2013-03-19T09:17:23.329-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.transport] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@11c2050] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-67aaafb8:13d82f27adb:-8000-0000000000000204,1:26833] [SRC_CLASS: oracle.tip.b2b.transport.basic.TransportLogger] [APP: soa-infra] [SRC_METHOD: log] Number of unread messages =0
[2013-03-19T09:17:23.329-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.transport] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@11c2050] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-67aaafb8:13d82f27adb:-8000-0000000000000204,1:26833] [SRC_CLASS: oracle.tip.b2b.transport.basic.TransportLogger] [APP: soa-infra] [SRC_METHOD: log] Number of messages to be processed by IMAPMonitor = 1
[2013-03-19T09:17:23.329-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.transport] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@11c2050] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-67aaafb8:13d82f27adb:-8000-0000000000000204,1:26833] [SRC_CLASS: oracle.tip.b2b.transport.basic.TransportLogger] [APP: soa-infra] [SRC_METHOD: log] IMAPMonitor.convertMailToTransport(): Converting message ...
[2013-03-19T09:17:23.516-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.transport] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@11c2050] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-67aaafb8:13d82f27adb:-8000-0000000000000204,1:26833] [SRC_CLASS: oracle.tip.b2b.transport.basic.TransportLogger] [APP: soa-infra] [SRC_METHOD: log] IMAPMonitor.convertMailToTransport(): Message Type = BINARY
[2013-03-19T09:17:23.516-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.transport] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@11c2050] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-67aaafb8:13d82f27adb:-8000-0000000000000204,1:26833] [SRC_CLASS: oracle.tip.b2b.transport.basic.TransportLogger] [APP: soa-infra] [SRC_METHOD: log] IMAPMonitor: Headers Subject - Inventory Quantity On Hand Update for 266219 as of 20130319 at 09:07
[2013-03-19T09:17:23.516-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.transport] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@11c2050] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-67aaafb8:13d82f27adb:-8000-0000000000000204,1:26833] [SRC_CLASS: oracle.tip.b2b.transport.basic.TransportLogger] [APP: soa-infra] [SRC_METHOD: log] IMAPMonitor: Headers To - [email protected]
[2013-03-19T09:17:23.516-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.transport] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@11c2050] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-67aaafb8:13d82f27adb:-8000-0000000000000204,1:26833] [SRC_CLASS: oracle.tip.b2b.transport.basic.TransportLogger] [APP: soa-infra] [SRC_METHOD: log] IMAPMonitor: Headers Message-ID - <[email protected]main>
[2013-03-19T09:17:23.516-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.transport] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@11c2050] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-67aaafb8:13d82f27adb:-8000-0000000000000204,1:26833] [SRC_CLASS: oracle.tip.b2b.transport.basic.TransportLogger] [APP: soa-infra] [SRC_METHOD: log] IMAPMonitor: Headers Date - Tue, 19 Mar 2013 09:07:29 -0500
[2013-03-19T09:17:23.516-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.transport] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@11c2050] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-67aaafb8:13d82f27adb:-8000-0000000000000204,1:26833] [SRC_CLASS: oracle.tip.b2b.transport.basic.TransportLogger] [APP: soa-infra] [SRC_METHOD: log] IMAPMonitor: Headers Sender - [email protected]
[2013-03-19T09:17:23.516-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.transport] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@11c2050] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-67aaafb8:13d82f27adb:-8000-0000000000000204,1:26833] [SRC_CLASS: oracle.tip.b2b.transport.basic.TransportLogger] [APP: soa-infra] [SRC_METHOD: log] IMAPMonitor: Headers From - [email protected]
[2013-03-19T09:17:23.516-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.transport] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@11c2050] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-67aaafb8:13d82f27adb:-8000-0000000000000204,1:26833] [SRC_CLASS: oracle.tip.b2b.transport.basic.TransportLogger] [APP: soa-infra] [SRC_METHOD: log] IMAPMonitor: Headers Content-type - multipart/mixed; [[
Boundary="0__=09BBF1A0DFDE15CA8f9e8a93df938690918c09BBF1A0DFDE15CA"
[2013-03-19T09:17:23.516-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.transport] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@11c2050] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-67aaafb8:13d82f27adb:-8000-0000000000000204,1:26833] [SRC_CLASS: oracle.tip.b2b.transport.basic.TransportLogger] [APP: soa-infra] [SRC_METHOD: log] IMAPMonitor: Headers Content-Disposition - inline
[2013-03-19T09:17:23.516-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.transport] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@11c2050] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-67aaafb8:13d82f27adb:-8000-0000000000000204,1:26833] [SRC_CLASS: oracle.tip.b2b.transport.basic.TransportLogger] [APP: soa-infra] [SRC_METHOD: log] IMAPMonitor: Headers MIME-Version - 1.0
[2013-03-19T09:17:23.516-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.transport] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@11c2050] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-67aaafb8:13d82f27adb:-8000-0000000000000204,1:26833] [SRC_CLASS: oracle.tip.b2b.transport.basic.TransportLogger] [APP: soa-infra] [SRC_METHOD: log] IMAPMonitor: Headers Auto-Submitted - auto-generated
[2013-03-19T09:17:23.516-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.transport] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@11c2050] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-67aaafb8:13d82f27adb:-8000-0000000000000204,1:26833] [SRC_CLASS: oracle.tip.b2b.transport.basic.TransportLogger] [APP: soa-infra] [SRC_METHOD: log] IMAPMonitor: Headers X-MIMETrack - Itemize by Agent Manager on abcAPP1/abc(Release 8.5.1|September 28, 2009) at[[
03/19/2013 09:07:29,CD-MIME by IMAP Server on abcAPP1/abc(Release 8.5.1|September 28, 2009) at
03/19/2013 09:17:21,CD-MIME complete at 03/19/2013 09:17:21,Itemize by IMAP Server on abcAPP1/abc(Release 8.5.1|September 28, 2009) at
03/19/2013 09:17:22
[2013-03-19T09:17:23.563-05:00] [AdminServer] [TRACE:32] [] [oracle.soa.b2b.engine] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@11c2050] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-67aaafb8:13d82f27adb:-8000-0000000000000204,1:26833] [SRC_CLASS: oracle.tip.b2b.system.DiagnosticService] [APP: soa-infra] [SRC_METHOD: log] COntentHandler backcompat: true
[2013-03-19T09:17:23.563-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.transport] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@11c2050] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-67aaafb8:13d82f27adb:-8000-0000000000000204,1:26833] [SRC_CLASS: oracle.tip.b2b.transport.basic.TransportLogger] [APP: soa-infra] [SRC_METHOD: log] IMAPMonitor: MultiPart Message
[2013-03-19T09:17:23.563-05:00] [AdminServer] [TRACE:32] [] [oracle.soa.b2b.engine] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@11c2050] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-67aaafb8:13d82f27adb:-8000-0000000000000204,1:26833] [SRC_CLASS: oracle.tip.b2b.system.DiagnosticService] [APP: soa-infra] [SRC_METHOD: log] COntentHandler backcompat: true
[2013-03-19T09:17:23.563-05:00] [AdminServer] [TRACE:32] [] [oracle.soa.b2b.engine] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@11c2050] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-67aaafb8:13d82f27adb:-8000-0000000000000204,1:26833] [SRC_CLASS: oracle.tip.b2b.system.DiagnosticService] [APP: soa-infra] [SRC_METHOD: log] COntentHandler backcompat: true
*[2013-03-19T09:17:23.563-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.transport] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@11c2050] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-67aaafb8:13d82f27adb:-8000-0000000000000204,1:26833] [SRC_CLASS: oracle.tip.b2b.transport.basic.TransportLogger] [APP: soa-infra] [SRC_METHOD: log] IMAPMonitor.saveAttachment(): AttachDir=C:\Oracle\Middleware\home_11gR1\user_projects\domains\mysoa_domain\servers\AdminServer\AttachmentHandler*
*[2013-03-19T09:17:23.563-05:00] [AdminServer] [ERROR] [] [oracle.soa.b2b.transport] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@11c2050] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-67aaafb8:13d82f27adb:-8000-0000000000000204,1:26833] [APP: soa-infra] [IPT_SmtpRecConversionError] Exception occurs in conversion from mail to TransportMessage. Please make sure the message sent is in correct format.*
*[2013-03-19T09:17:23.563-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.transport] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@11c2050] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-67aaafb8:13d82f27adb:-8000-0000000000000204,1:26833] [SRC_CLASS: oracle.tip.b2b.transport.basic.TransportLogger] [APP: soa-infra] [SRC_METHOD: log] IMAPMonitor: TransportMessage cannot be created from mail. Skip this mail.*
*[2013-03-19T09:17:23.579-05:00] [AdminServer] [TRACE] [] [oracle.soa.b2b.transport] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@11c2050] [userId: <anonymous>] [ecid: 54ec404c68bbfb80:-67aaafb8:13d82f27adb:-8000-0000000000000204,1:26833] [SRC_CLASS: oracle.tip.b2b.transport.basic.TransportLogger] [APP: soa-infra] [SRC_METHOD: log] IMAPMonitor.run(): IMAPMonitor goes to sleep for 60 secs ...*
Thanks,
Venkatesh -
Reading the xml file in customized table.
Hi Experts ,
I have a requirement to read the xml file in one "z" table . Can anyone let me know the exact steps .
Thank you
AshutoshHi Ashutosh,
1. First read the file in BINARY MODE into an XSTRING.
2. Then use the method create_istream_xstring to create the input stream
3. Then you need to create the document tree and the parser
4. Once your Document tree and your parser are created now can use the document tree to access individual elements.
Some Class interfaces that maybe helpful to you are as follows: if_ixml_node, if_ixml_node_iterator, if_ixml_element....etc
DATA:o_ixml TYPE REF TO if_ixml,
o_streamfactory TYPE REF TO if_ixml_stream_factory,
o_istream TYPE REF TO if_ixml_istream.
o_parser TYPE REF TO if_ixml_parser
o_document TYPE REF TO if_ixml_document
o_ixml = cl_ixml=>create( ).
o_istream = o_streamfactory->create_istream_xstring( string = <give the xstring name here>).
o_document = o_ixml->create_document( ).
o_parser = o_ixml->create_parser( stream_factory = o_streamfactory
istream = o_istream
document = o_document ).
You can make the final code as dynamic as possible to read into an internal table.
Regards
-Joe -
Error while running the XML file using XML Publisher Desktop
Hi All,
We have successfully loaded the XML file using XML Publisher Desktop.But when we try to preview it using the PDF format we are getting the following error.
Font Dir: C:\Program Files\Oracle\XML Publisher Desktop\Template Builder for Word\fonts
Run XDO Start
RTFProcessor setLocale: en-us
FOProcessor setData: C:\Documents and Settings\smanmadh\Desktop\ProductCompensationDT.xml
FOProcessor setLocale: en-us
java.lang.NullPointerException
at oracle.apps.xdo.template.fo.area.PageNumber.formatString(PageNumber.java:104)
at oracle.apps.xdo.template.fo.IDManager.registerId(IDManager.java:44)
at oracle.apps.xdo.template.fo.area.AreaTree.registerLastPageJoinSeq(AreaTree.java:1106)
at oracle.apps.xdo.template.fo.area.AreaTree.incrementJoinSequenceIndex(AreaTree.java:219)
at oracle.apps.xdo.template.fo.area.AreaTree.registerLastPageDocument(AreaTree.java:1089)
at oracle.apps.xdo.template.fo.area.AreaTree.forceOutput(AreaTree.java:471)
at oracle.apps.xdo.template.fo.elements.FORoot.end(FORoot.java:58)
at oracle.apps.xdo.template.fo.FOHandler.endElement(FOHandler.java:386)
at oracle.xml.parser.v2.XMLContentHandler.endElement(XMLContentHandler.java:196)
at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1212)
at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:301)
at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:268)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:149)
at oracle.apps.xdo.template.fo.FOProcessingEngine.process(FOProcessingEngine.java:279)
at oracle.apps.xdo.template.FOProcessor.generate(FOProcessor.java:1022)
at RTF2PDF.runRTFto(RTF2PDF.java:626)
at RTF2PDF.runXDO(RTF2PDF.java:460)
at RTF2PDF.main(RTF2PDF.java:251)
Any pointers will be of great help.
Thanks in Advance
Sudeep.2¢
I had a similar error which when I searched, came up with this thread.
My issue was resolved after I discovered that my RTF template was not really RTF. It was sill in MS Word DOC format. This was discovered by reviewing two templates in NOTEPAD. The MS-DOC files have a lot of "special" characters in them. My RTF was not really RTF.
After doing a SAVE AS - RTF format, then the preview worked as expected.
Just Sharing...
--Tim -
Error while downloading the xml file
i am having a internal table which contains data in xml format but i am unable to download the data into local system by using 'GUI_DOWNLOAD' fn. module
its error its showing is as :
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
A name contained an invalid character. Error processing resource 'file:///D:/XX.XML'. Line 4, Position 4
MOD/><RPTSX/><MANDT/><SYPSY/><SYSID/><SAPRL/></T682><T682><KVEWE>A</KV...hello Durairaj,
i am fwd the code go thru it and check why the xml file is not downloading,
and after downloading the file i want that file to be in displayed in .pdf.
REPORT ZCCSV_TO_XML.
DATA : BEGIN OF TABLE OCCURS 0,
TABNAME(15) TYPE C,
END OF TABLE.
DATA : BEGIN OF HEADER_NAMTAB OCCURS 0,
NAMTAB TYPE STRING,
END OF HEADER_NAMTAB.
DATA : BEGIN OF CONVERT_ITAB_TO_XML OCCURS 0,
FIELDNAME(255) TYPE C,
END OF CONVERT_ITAB_TO_XML .
DATA : BEGIN OF CONVERT_XML_TO_ITAB OCCURS 0,
FIELDNAME(255) TYPE C,
END OF CONVERT_XML_TO_ITAB.
DATA DREF TYPE REF TO DATA.
DATA TNAME LIKE DD02L-TABNAME.
DATA BEGIN OF ZDFIES OCCURS 0.
INCLUDE STRUCTURE DFIES.
DATA END OF ZDFIES.
DATA: xml_out TYPE string .
DATA: xml_TO_ITAB TYPE string .
data : wa_indx type indx.
DATA : DETAIL(30).
DATA : DATA1 TYPE STRING.
DATA : COMMA . "VALUE ','.
DATA : DBTAB1(15) TYPE C.
FIELD-SYMBOLS: <ITAB> TYPE ANY TABLE,
<WA> TYPE ANY,
<WA1> TYPE ANY .
SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME,
SKIP 1.
PARAMETERS : SPOOL RADIOBUTTON GROUP rad1 DEFAULT 'X',
CSV RADIOBUTTON GROUP rad1 ,
XMLTOPDF RADIOBUTTON GROUP rad1.
SELECTION-SCREEN : SKIP 1,
END OF BLOCK b1.
TABLE-TABNAME = 'T681'.
APPEND TABLE.
TABLE-TABNAME = 'T682'.
APPEND TABLE.
IF SPOOL = 'X'.
PERFORM SPOOL.
ELSEIF CSV = 'X'.
PERFORM CSV.
ELSEIF XMLTOPDF = 'X'.
PERFORM XMLTOPDF.
ENDIF.
*& Form CSV
form CSV .
LOOP AT TABLE.
dbtab1 = TABLE-TABNAME.
TNAME = dbtab1.
PERFORM GETFIELDS.
LOOP AT HEADER_NAMTAB.
WRITE: HEADER_NAMTAB-NAMTAB, COMMA.
ENDLOOP.
PERFORM GET_DETAIL_LIST.
ENDLOOP.
endform. " CSV
form XMLTOPDF .
LOOP AT TABLE.
PERFORM GET_DETAIL_LIST.
ENDLOOP.
endform. " XMLTOPDF
GETTING THE HEADER OF THE TABLE *
FORM GETFIELDS.
REFRESH HEADER_NAMTAB.
CALL FUNCTION 'GET_FIELDTAB'
EXPORTING
LANGU = SY-LANGU
ONLY = SPACE
TABNAME = TNAME
WITHTEXT = 'X'
TABLES
FIELDTAB = ZDFIES
EXCEPTIONS
INTERNAL_ERROR = 01
NO_TEXTS_FOUND = 02
TABLE_HAS_NO_FIELDS = 03
TABLE_NOT_ACTIV = 04.
CASE SY-SUBRC.
WHEN 0.
LOOP AT ZDFIES.
HEADER_NAMTAB-NAMTAB = ZDFIES-SCRTEXT_M.
APPEND HEADER_NAMTAB.
ENDLOOP.
WHEN OTHERS.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-SUBRC.
ENDCASE.
ENDFORM. " GETFIELEDS
*& Form GET_DETAIL_LIST
form GET_DETAIL_LIST .
CREATE DATA DREF TYPE STANDARD TABLE OF (TABLE)
WITH NON-UNIQUE DEFAULT KEY.
ASSIGN DREF->* TO <ITAB> .
SELECT * FROM (TABLE) INTO TABLE <ITAB>.
CALL TRANSFORMATION ('ID')
SOURCE tab = <ITAB>[]
RESULT XML xml_out.
Convert to TABLE
CALL FUNCTION 'HR_EFI_CONVERT_STRING_TO_TABLE'
EXPORTING
i_string = xml_out
i_tabline_length = 100
TABLES
et_table = CONVERT_ITAB_TO_XML.
Download
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filetype = 'ASC'
filename = 'D:\XX.XML'
TABLES
data_tab = CONVERT_ITAB_TO_XML
endform. -
Open Dataset for XML not reading the XML file, Returning Code 8.
Dear all,
Im trying to open an XML file using Open Dataset, since i have to execute this report in background and GUI_upload doesnt work in background.
The XML file is available in my C:\, say, C:\xmlfile.xml.
But the open dataset is not reading any value into the g_xml_line . it is returning sy-subrc = 8.
Below is my code for that, can anybody help me out to resolve.
DATA : lv_filename LIKE rlgrap-filename.
CLEAR: lv_filename.
lv_filename = p_input.
OPEN DATASET lv_filename FOR INPUT IN BINARY MODE.
IF sy-subrc ne 0.
WRITE:/ 'invalid file'.
else.
DO.
READ DATASET lv_filename INTO g_xml_line.
IF sy-subrc EQ 0.
APPEND g_xml_line TO g_xml_table.
ELSE.
EXIT.
ENDIF.
ENDDO.
CLOSE DATASET lv_filename.
ENDIF.
TYPES: BEGIN OF t_xml_line,
data(256) TYPE x,
END OF t_xml_line.
DATA: g_xml_table TYPE TABLE OF t_xml_line,
g_xml_line TYPE t_xml_line,
g_xml_table_size TYPE i.
GET REFERENCE OF gt_person INTO gs_result_xml-value.
gs_result_xml-name = 'IPIX'.
APPEND gs_result_xml TO gt_result_xml.
Perform the XSLT stylesheet
TRY.
CALL TRANSFORMATION zaum_manh_sync_rpt
SOURCE XML g_xml_table
RESULT (gt_result_xml).
CATCH cx_root INTO gs_rif_ex.
gs_var_text = gs_rif_ex->get_text( ).
MESSAGE gs_var_text TYPE 'E'.
ENDTRY.
Kindly suggest me a solution. Points assured
regs,
rajaAfter saving the file , below is the code i wrote, but it gives a runtime error with message
No roll storage space of length 3788808 available for internal storage.
***Coding****
PARAMETERS: p_file TYPE pathintern LOWER CASE DEFAULT '/usr/sap/DEV/SYS/global/XMLABAP2.XML'.
DATA : lv_filename LIKE rlgrap-filename.
CLEAR: lv_filename.
lv_filename = p_file.
DATA: l_fname TYPE filename-fileintern. " File name
*GET THE FILENAME FROM THE APPLICATION SERVER
CALL FUNCTION '/SAPDMC/LSM_F4_SERVER_FILE'
EXPORTING
directory = p_file
filemask = '*'
IMPORTING
serverfile = l_fname
EXCEPTIONS
canceled_by_user = 1
OTHERS = 2.
IF sy-subrc NE 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
*/usr/sap/DEV/SYS/global/substanc
lv_filename = l_fname.
OPEN DATASET lv_filename FOR INPUT IN BINARY MODE.
IF sy-subrc NE 0.
WRITE:/ 'invalid file'.
ELSE.
DO.
READ DATASET lv_filename INTO g_xml_line.
IF sy-subrc EQ 0.
APPEND g_xml_line TO g_xml_table.
ELSE.
EXIT.
ENDIF.
ENDDO.
CLOSE DATASET lv_filename.
ENDIF. -
Hi Gurus,
I am dier need of one of the xml issue which I am facing right now.
I am reading one of the xml file which is like this
<?xml version="1.0" encoding="UTF-8" ?>
- <GEBIZ_ORDER xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <HEADER>
<MINISTRY_CODE>RPO</MINISTRY_CODE>
<DEPARTMENT_CODE>000</DEPARTMENT_CODE>
<ORDER_CODE>RPO000EPO11000953</ORDER_CODE>
<EXTERNAL_SYSTEM_CODE>E</EXTERNAL_SYSTEM_CODE>
<AMENDMENT_NUMBER>0</AMENDMENT_NUMBER>
<VARIATION_NUMBER>0</VARIATION_NUMBER>
<DESCRIPTION>Purchase Order for Air tickets for SOT to Korea (from 17th - 26th Sep 2011) off PC(RPO000ECN11000100)for SAS</DESCRIPTION>
<STATUS>NEW</STATUS>
<STATUS_DATE>2011-07-08T16:57:39</STATUS_DATE>
<PAYMENT_TERMS xsi:nil="true" />
<BILL_TO>One-Stop Centre, 9 Woodlands Avenue 9, S(738964)</BILL_TO>
<JUSTIFICATION>Please refer to attached approval email.</JUSTIFICATION>
<CREATE_TIMESTAMP>2011-07-08T16:57:39</CREATE_TIMESTAMP>
<TERMINATE_REASON xsi:nil="true" />
<TERMINATE_TIMESTAMP xsi:nil="true" />
<ORDER_TYPE>1</ORDER_TYPE>
- <FINANCIAL_SYSTEM>
<SUB_BUSINESS_UNIT>RPS01</SUB_BUSINESS_UNIT>
</FINANCIAL_SYSTEM>
- <SUPPLIER>
<CODE>200003048E</CODE>
<NAME>Safe2Travel Pte Ltd</NAME>
<GST_NUMBER>20-0003048-E</GST_NUMBER>
<CONTACT_NAME>ONG PEI LENG</CONTACT_NAME>
<CONTACT_PHONE>68233103</CONTACT_PHONE>
<CONTACT_EMAIL>[email protected]</CONTACT_EMAIL>
<CONTACT_FAX>68221636</CONTACT_FAX>
- <SITES>
- <SITE>
<ID>1</ID>
<NAME>ravel Pte Ltd</NAME>
<PHONE>68233013</PHONE>
<PHONE_EXTENSION xsi:nil="true" />
<FAX>68221636</FAX>
<EMAIL>[email protected]</EMAIL>
<ADDRESS_LINE1>10 Eunos Road 8</ADDRESS_LINE1>
<ADDRESS_LINE2>#08-03 (North Lobby)</ADDRESS_LINE2>
<ADDRESS_LINE3>Singapore Post Centre</ADDRESS_LINE3>
<COUNTRY_CODE>SG</COUNTRY_CODE>
<PROVINCE xsi:nil="true" />
<STATE xsi:nil="true" />
<CITY xsi:nil="true" />
<AREA_CODE xsi:nil="true" />
<ZIP>408600</ZIP>
<REGION_CODE xsi:nil="true" />
</SITE>
- <SITE>
<ID>2</ID>
<NAME>ravel Pte Ltd</NAME>
<PHONE>62208866</PHONE>
<PHONE_EXTENSION xsi:nil="true" />
<FAX>62265578</FAX>
<EMAIL>[email protected]</EMAIL>
<ADDRESS_LINE1>3 Lim Teck Kim Road</ADDRESS_LINE1>
<ADDRESS_LINE2>#02-02</ADDRESS_LINE2>
<ADDRESS_LINE3>Singapore Technologies Building</ADDRESS_LINE3>
<COUNTRY_CODE>SG</COUNTRY_CODE>
<PROVINCE xsi:nil="true" />
<STATE xsi:nil="true" />
<CITY xsi:nil="true" />
<AREA_CODE xsi:nil="true" />
<ZIP>088934</ZIP>
<REGION_CODE xsi:nil="true" />
</SITE>
- <SITE>
<ID>3</ID>
<NAME>Safe2Travel Pte Ltd</NAME>
<PHONE>62208866</PHONE>
<PHONE_EXTENSION xsi:nil="true" />
<FAX>62265578</FAX>
<EMAIL>[email protected]</EMAIL>
<ADDRESS_LINE1>3 Lim Teck Kim Road</ADDRESS_LINE1>
<ADDRESS_LINE2>#02-02</ADDRESS_LINE2>
<ADDRESS_LINE3>Singapore Technologies Building</ADDRESS_LINE3>
<COUNTRY_CODE>SG</COUNTRY_CODE>
<PROVINCE xsi:nil="true" />
<STATE xsi:nil="true" />
<CITY xsi:nil="true" />
<AREA_CODE xsi:nil="true" />
<ZIP>088934</ZIP>
<REGION_CODE xsi:nil="true" />
</SITE>
</SITES>
</SUPPLIER>
- <USER>
<CODE>JOYCE SOON</CODE>
<NAME>JOYCE SOON</NAME>
<ORGANISATION_NAME>Republic Polytechnic</ORGANISATION_NAME>
</USER>
- <FUND_COMMIT_AMOUNT>
<CURRENCY_CODE>SGD</CURRENCY_CODE>
<CURRENCY_RATE>1</CURRENCY_RATE>
<CURRENCY_RATE_DATE>1900-01-01T00:00:00</CURRENCY_RATE_DATE>
<CURRENCY_RATE_TYPE>BOOK</CURRENCY_RATE_TYPE>
<CURRENCY_AMOUNT>21551.4</CURRENCY_AMOUNT>
</FUND_COMMIT_AMOUNT>
- <PERIOD_CONTRACT>
<CODE>RPO000ECN11000100</CODE>
<AGENCY_CODE>RPO000</AGENCY_CODE>
<ADMIN_FEE_SGD_AMOUNT>0</ADMIN_FEE_SGD_AMOUNT>
</PERIOD_CONTRACT>
- <BUYER>
<ORGANISATION_CODE>1</ORGANISATION_CODE>
<ORGANISATION_NAME>Republic Polytechnic</ORGANISATION_NAME>
<NAME>Sally Ang</NAME>
<PHONE>31001711</PHONE>
<FAX>64151310</FAX>
<EMAIL>[email protected]</EMAIL>
</BUYER>
<APPROVING_OFFICERS />
</HEADER>
- <ITEMS>
- <ITEM>
<LINE_NUMBER>1</LINE_NUMBER>
<STATUS>NEW</STATUS>
<STATUS_DATE>2011-07-08T16:57:39</STATUS_DATE>
<DESCRIPTION>Return Air Ticket including Airport Taxes and Fuel Surcharges (2 staff and 24 students)</DESCRIPTION>
<UNIT_OF_MEASURE>PAX</UNIT_OF_MEASURE>
<QUANTITY>26</QUANTITY>
<LINE_TYPE>SERVICES</LINE_TYPE>
<UNIT_PRICE>828.9</UNIT_PRICE>
<PRICE_UNIT>1</PRICE_UNIT>
<TOTAL_AMOUNT>21551.4</TOTAL_AMOUNT>
<MATERIAL_MASTER_CODE xsi:nil="true" />
<MATERIAL_GROUP_CODE xsi:nil="true" />
<PLANT_CODE xsi:nil="true" />
<ITEM_CATEGORY_CODE xsi:nil="true" />
<ADMIN_FEE_SGD_AMOUNT>0</ADMIN_FEE_SGD_AMOUNT>
<INSTRUCTION_TO_SUPPLIER>Purchase of goods/services is subject to the Terms & Conditions found in www.rp.sg/purchase and/or in the ITQ/ITT Specifications. Please liaise with the Contact Person for delivery details. Invoice MUST be addressed to the Contact Person. PO number MUST be included in the Description field under e-Invoice Details section at Vendor@Gov.</INSTRUCTION_TO_SUPPLIER>
<PERIOD_CONTRACT_LINE_NUMBER>1</PERIOD_CONTRACT_LINE_NUMBER>
<GOODS_INSPECT_FLAG>N</GOODS_INSPECT_FLAG>
- <PURCHASE_REQUEST>
<CODE>RPO000EPR11000465</CODE>
<LINE_NUMBER>1</LINE_NUMBER>
</PURCHASE_REQUEST>
- <PART_NUMBER_INFORMATION>
<NATO_STOCK_NUMBER xsi:nil="true" />
<MANUFACTURER_PART_NUMBER xsi:nil="true" />
<PART_NUMBER xsi:nil="true" />
<CAGE_CODE xsi:nil="true" />
<CAGE_NAME xsi:nil="true" />
<ITEM_CONDITION xsi:nil="true" />
<MINIMUM_SHELF_LIFE xsi:nil="true" />
<SHELF_LIFE_REMAINING xsi:nil="true" />
<CERTIFICATE_OF_CONFORMANCE xsi:nil="true" />
<EXPORT_LICENSE xsi:nil="true" />
</PART_NUMBER_INFORMATION>
- <LOCATIONS>
- <LOCATION>
<LINE_NUMBER>1</LINE_NUMBER>
<STATUS>NEW</STATUS>
<STATUS_DATE>2011-07-08T16:57:39</STATUS_DATE>
<QUANTITY>26</QUANTITY>
<DELIVERY_DESTINATION>Republic Polytechnic, One-Stop Centre, 9 Woodlands Avenue 9, S(738964)</DELIVERY_DESTINATION>
<DELIVERY_DATE>2011-07-11T00:00:00</DELIVERY_DATE>
<DELIVERY_TERMS>LOC</DELIVERY_TERMS>
<PORT_OF_ORIGIN>-</PORT_OF_ORIGIN>
- <RECIPIENT>
<CODE>OSC</CODE>
<NAME>One Stop Centre</NAME>
<PHONE>65103000</PHONE>
<EMAIL>[email protected]</EMAIL>
</RECIPIENT>
- <DISTRIBUTIONS>
- <DISTRIBUTION>
<LINE_NUMBER>1</LINE_NUMBER>
<STATUS>NEW</STATUS>
<STATUS_DATE>2011-07-08T16:57:39</STATUS_DATE>
<QUANTITY>26</QUANTITY>
<CHART_OF_ACCOUNT>1/G01/3SAS/020/220908/0000/0000/0000</CHART_OF_ACCOUNT>
<PROJECT_DISTRIBUTION xsi:nil="true" />
</DISTRIBUTION>
</DISTRIBUTIONS>
</LOCATION>
</LOCATIONS>
</ITEM>
</ITEMS>
</GEBIZ_ORDER>I was able to read this kind of file structure but due to some constraints now they added supplier sites and increment that one which will be like variable kind of thing now.
And below mentioned is the script which I am using right now for reading that xml file
PROCEDURE XGBZPROD.XGBZ_PUR_ORD_XMLTAG_PROC(P_XML_FILE IN VARCHAR2, P_FOLDER_NAME IN VARCHAR2)
IS
lv_supp_file XMLTYPE;
lv_hdr_error VARCHAR2(240);
lv_line_error VARCHAR2(240);
lv_line_loc_err VARCHAR2(240);
lv_dist_err VARCHAR2(240);
l_file_name VARCHAR2(300);
l_folder_name VARCHAR2(300);
lv_sysdate DATE := sysdate;
BEGIN
l_file_name := p_xml_file;
l_folder_name := p_folder_name;
-- this clause to check whether is xml file or NODATA FILE.
IF upper(substr(l_file_name,instr(l_file_name,'.',1)+1,3)) ='XML' THEN
lv_supp_file := xmltype( bfilename('XMLDIR',P_XML_FILE), nls_charset_id('AL32UTF8'));
dbms_output.put_line('P_XML_FILE '||P_XML_FILE);
-- Initially insert data into 11g table
-- This is to read xml datafile
INSERT INTO XGBZ_PO_XML_DETAILS
(ministry_code ,
department_code ,
order_code ,
external_system_code ,
amendment_number ,
variation_number ,
description ,
status ,
status_date ,
payment_terms ,
bill_to ,
justification ,
create_timestamp ,
terminate_reason ,
terminate_timestamp ,
order_type ,
sub_business_unit ,
cost_center_group ,
buyer_code ,
financial_system_order_code ,
user_nric ,
supplier_code ,
supplier_name ,
gst_number ,
contact_name ,
contact_phone ,
contact_email ,
contact_fax ,
supp_site_id ,
supp_site_name ,
supp_site_phone ,
supp_sit_phone_ext ,
supp_site_fax ,
supp_site_email ,
supp_site_add_line1 ,
supp_site_add_line2 ,
supp_site_add_line3 ,
supp_site_country_code ,
supp_site_province ,
supp_site_state ,
supp_site_city ,
supp_site_area_code ,
supp_site_zip ,
supp_site_region_code ,
user_code ,
user_name ,
user_org_name ,
currency_code ,
currency_rate ,
currency_rate_date ,
currency_rate_type ,
currency_amount ,
tx_field_2 ,
agency_code ,
admin_fee_sgd ,
buyer_orgn_code ,
buyer_orgn_name ,
buyer_name ,
buyer_phone ,
buyer_fax ,
buyer_email ,
ao_code ,
ao_name ,
line_no ,
line_status ,
line_status_date ,
line_description ,
unit_of_measure ,
line_qty ,
line_type ,
unit_price ,
line_total_amount ,
material_master_code ,
material_group_code ,
item_category_code ,
line_admin_fee_sgd_amt ,
instruction_supplier ,
period_contract_line_no ,
goods_inspect_flag ,
pr_code ,
pr_line_number ,
nato_stock_number ,
manufacturer_part_no ,
part_number ,
cage_code ,
cage_name ,
item_condition ,
minimum_shelf_life ,
shelf_life_remaining ,
cert_of_conformance ,
export_license ,
line_location_no ,
line_loc_status ,
line_loc_status_date ,
line_loc_qty ,
delivery_destination ,
delivery_date ,
delivery_terms ,
port_of_origin ,
recipient_code ,
recipient_name ,
recipient_phone ,
recipient_email ,
dist_line_no ,
dist_line_status ,
dist_line_status_date ,
dist_line_qty ,
chart_of_account ,
project_distribution
SELECT --Header Data
ministry_code ,
department_code ,
order_code ,
external_system_code ,
amendment_number ,
variation_number ,
description ,
status ,
status_date ,
payment_terms ,
bill_to ,
justification ,
create_timestamp ,
terminate_reason ,
terminate_timestamp ,
order_type ,
sub_business_unit ,
cost_center_group ,
buyer_code ,
financial_system_order_code ,
user_nric ,
supplier_code ,
supplier_name ,
gst_number ,
contact_name ,
contact_phone ,
contact_email ,
contact_fax ,
supp_site_id ,
supp_site_name ,
supp_site_phone ,
supp_sit_phone_ext ,
supp_site_fax ,
supp_site_email ,
supp_site_add_line1 ,
supp_site_add_line2 ,
supp_site_add_line3 ,
supp_site_country_code ,
supp_site_province ,
supp_site_state ,
supp_site_city ,
supp_site_area_code ,
supp_site_zip ,
supp_site_region_code ,
user_code ,
user_name ,
user_org_name ,
currency_code ,
currency_rate ,
currency_rate_date ,
currency_rate_type ,
currency_amount ,
tx_field_2 ,
agency_code ,
admin_fee_sgd ,
buyer_orgn_code ,
buyer_orgn_name ,
buyer_name ,
buyer_phone ,
buyer_fax ,
buyer_email ,
ao_code ,
ao_name ,
line_no ,
line_status ,
line_status_date ,
line_description ,
unit_of_measure ,
line_qty ,
line_type ,
unit_price ,
line_total_amount ,
material_master_code ,
material_group_code ,
item_category_code ,
line_admin_fee_sgd_amt ,
instruction_supplier ,
period_contract_line_no ,
goods_inspect_flag ,
pr_code ,
pr_line_number ,
nato_stock_number ,
manufacturer_part_no ,
part_number ,
cage_code ,
cage_name ,
item_condition ,
minimum_shelf_life ,
shelf_life_remaining ,
cert_of_conformance ,
export_license ,
line_location_no ,
line_loc_status ,
line_loc_status_date ,
line_loc_qty ,
delivery_destination ,
delivery_date ,
delivery_terms ,
port_of_origin ,
recipient_code ,
recipient_name ,
recipient_phone ,
recipient_email ,
dist_line_no ,
dist_line_status ,
dist_line_status_date ,
dist_line_qty ,
chart_of_account ,
project_distribution
FROM XMLTable('/GEBIZ_ORDER'
passing lv_supp_file
columns
ministry_code VARCHAR2(3) path 'HEADER/MINISTRY_CODE',
department_code VARCHAR2(3) path 'HEADER/DEPARTMENT_CODE',
order_code VARCHAR2(17 ) path 'HEADER/ORDER_CODE',
external_system_code VARCHAR2(1) path 'HEADER/EXTERNAL_SYSTEM_CODE',
amendment_number VARCHAR2(5) path 'HEADER/AMENDMENT_NUMBER' ,
variation_number VARCHAR2(5) path 'HEADER/VARIATION_NUMBER',
description VARCHAR2(500) path 'HEADER/DESCRIPTION',
status VARCHAR2(500) path 'HEADER/STATUS',
status_date VARCHAR2(24) path 'HEADER/STATUS_DATE',
payment_terms VARCHAR2(400) path 'HEADER/PAYMENT_TERMS',
bill_to VARCHAR2(200) path 'HEADER/BILL_TO',
justification VARCHAR2(400) path 'HEADER/JUSTIFICATION',
create_timestamp VARCHAR2(24) path 'HEADER/CREATE_TIMESTAMP',
terminate_reason VARCHAR2(400) path 'HEADER/TERMINATE_REASON',
terminate_timestamp VARCHAR2(24) path 'HEADER/TERMINATE_TIMESTAMP',
order_type VARCHAR2(2 ) path 'HEADER/ORDER_TYPE',
sub_business_unit VARCHAR2(5 ) path 'HEADER/FINANCIAL_SYSTEM/SUB_BUSINESS_UNIT',
cost_center_group VARCHAR2(20 ) path 'HEADER/FINANCIAL_SYSTEM/NFS/COST_CENTER_GROUP',
buyer_code VARCHAR2(30 ) path 'HEADER/FINANCIAL_SYSTEM/NFS/BUYER_CODE',
financial_system_order_code VARCHAR2(20 ) path 'HEADER/FINANCIAL_SYSTEM/NFS/FINANCIAL_SYSTEM_ORDER_CODE',
user_nric VARCHAR2(9 ) path 'HEADER/FINANCIAL_SYSTEM/NFS/USER_NRIC',
supplier_code VARCHAR2(10) path 'HEADER/SUPPLIER/CODE',
supplier_name VARCHAR2(140) path 'HEADER/SUPPLIER/NAME' ,
gst_number VARCHAR2(30 ) path 'HEADER/SUPPLIER/GST_NUMBER',
contact_name VARCHAR2(140 ) path 'HEADER/SUPPLIER/CONTACT_NAME',
contact_phone VARCHAR2(23 ) path 'HEADER/SUPPLIER/CONTACT_PHONE',
contact_email VARCHAR2(100) path 'HEADER/SUPPLIER/CONTACT_EMAIL',
contact_fax VARCHAR2(23 ) path 'HEADER/SUPPLIER/CONTACT_FAX',
supp_site_id NUMBER path 'HEADER/SUPPLIER/SITES/SITE/ID',
supp_site_name VARCHAR2(140) path 'HEADER/SUPPLIER/SITES/SITE/NAME',
supp_site_phone VARCHAR2(23) path 'HEADER/SUPPLIER/SITES/SITE/PHONE',
supp_sit_phone_ext VARCHAR2(4 ) path 'HEADER/SUPPLIER/SITES/SITE/PHONE_EXTENSION',
supp_site_fax VARCHAR2(23 ) path 'HEADER/SUPPLIER/SITES/SITE/FAX',
supp_site_email VARCHAR2(100 ) path 'HEADER/SUPPLIER/SITES/SITE/EMAIL',
supp_site_add_line1 VARCHAR2(254 ) path 'HEADER/SUPPLIER/SITES/SITE/ADDRESS_LINE1',
supp_site_add_line2 VARCHAR2(35 ) path 'HEADER/SUPPLIER/SITES/SITE/ADDRESS_LINE2',
supp_site_add_line3 VARCHAR2(35 ) path 'HEADER/SUPPLIER/SITES/SITE/ADDRESS_LINE3',
supp_site_country_code VARCHAR2(2 ) path 'HEADER/SUPPLIER/SITES/SITE/COUNTRY_CODE',
supp_site_province VARCHAR2(25 ) path 'HEADER/SUPPLIER/SITES/SITE/PROVINCE',
supp_site_state VARCHAR2(25 ) path 'HEADER/SUPPLIER/SITES/SITE/STATE',
supp_site_city VARCHAR2(25 ) path 'HEADER/SUPPLIER/SITES/SITE/CITY',
supp_site_area_code VARCHAR2(10 ) path 'HEADER/SUPPLIER/SITES/SITE/AREA_CODE',
supp_site_zip VARCHAR2(20 ) path 'HEADER/SUPPLIER/SITES/SITE/ZIP',
supp_site_region_code VARCHAR2(3 ) path 'HEADER/SUPPLIER/SITES/SITE/REGION_CODE',
user_code VARCHAR2(16 ) path 'HEADER/USER/CODE',
user_name VARCHAR2(25 ) path 'HEADER/USER/NAME',
user_org_name VARCHAR2(95 ) path 'HEADER/USER/ORGANISATION_NAME',
currency_code VARCHAR2(3 ) path 'HEADER/FUND_COMMIT_AMOUNT/CURRENCY_CODE',
currency_rate NUMBER path 'HEADER/FUND_COMMIT_AMOUNT/CURRENCY_RATE',
currency_rate_date VARCHAR2(24) path 'HEADER/FUND_COMMIT_AMOUNT/CURRENCY_RATE_DATE',
currency_rate_type VARCHAR2(5 ) path 'HEADER/FUND_COMMIT_AMOUNT/CURRENCY_RATE_TYPE',
currency_amount NUMBER path 'HEADER/FUND_COMMIT_AMOUNT/CURRENCY_AMOUNT',
tx_field_2 VARCHAR2(17 ) path 'HEADER/PERIOD_CONTRACT/CODE',
agency_code VARCHAR2(6 ) path 'HEADER/PERIOD_CONTRACT/AGENCY_CODE',
admin_fee_sgd NUMBER path 'HEADER/PERIOD_CONTRACT/ADMIN_FEE_SGD_AMOUNT' ,
buyer_orgn_code VARCHAR2(5 ) path 'HEADER/BUYER/ORGANISATION_CODE',
buyer_orgn_name VARCHAR2(95 ) path 'HEADER/BUYER/ORGANISATION_NAME',
buyer_name VARCHAR2(80 ) path 'HEADER/BUYER/NAME',
buyer_phone VARCHAR2(23 ) path 'HEADER/BUYER/PHONE',
buyer_fax VARCHAR2(23 ) path 'HEADER/BUYER/FAX',
buyer_email VARCHAR2(100 ) path 'HEADER/BUYER/EMAIL',
ao_code VARCHAR2(16 ) path 'HEADER/APPROVING_OFFICERS/APPROVING_OFFICER/CODE',
ao_name VARCHAR2(40 ) path 'HEADER/APPROVING_OFFICERS/APPROVING_OFFICER/NAME',
items XMLTYPE path 'ITEMS'
) x1,
XMLTABLE('/ITEMS/ITEM'
passing x1.items
columns
line_no VARCHAR2(5) path 'LINE_NUMBER',
line_status VARCHAR2(15) path 'STATUS',
line_status_date VARCHAR2(24) path 'STATUS_DATE',
line_description VARCHAR2(500) path 'DESCRIPTION',
unit_of_measure VARCHAR2(3) path 'UNIT_OF_MEASURE',
line_qty NUMBER path 'QUANTITY',
line_type VARCHAR2(20) path 'LINE_TYPE',
unit_price NUMBER path 'UNIT_PRICE',
line_total_amount NUMBER path 'TOTAL_AMOUNT',
material_master_code VARCHAR2(20) path 'MATERIAL_MASTER_CODE',
material_group_code VARCHAR2(10) path 'MATERIAL_GROUP_CODE',
item_category_code VARCHAR2(18) path 'ITEM_CATEGORY_CODE',
line_admin_fee_sgd_amt NUMBER path 'ADMIN_FEE_SGD_AMOUNT',
instruction_supplier VARCHAR2(400) path 'INSTRUCTION_TO_SUPPLIER',
period_contract_line_no NUMBER path 'PERIOD_CONTRACT_LINE_NUMBER',
goods_inspect_flag VARCHAR2(1) path 'GOODS_INSPECT_FLAG',
pr_code VARCHAR2(17) path 'PURCHASE_REQUEST/CODE',
pr_line_number VARCHAR2(5) path 'PURCHASE_REQUEST/LINE_NUMBER',
nato_stock_number VARCHAR2(14) path 'PART_NUMBER_INFORMATION/NATO_STOCK_NUMBER',
manufacturer_part_no VARCHAR2(32) path 'PART_NUMBER_INFORMATION/MANUFACTURE_PART_NUMBER',
part_number VARCHAR2(200) path 'PART_NUMBER_INFORMATION/PART_NUMBER',
cage_code VARCHAR2(10) path 'PART_NUMBER_INFORMATION/CAGE_CODE',
cage_name VARCHAR2(140) path 'PART_NUMBER_INFORMATION/CAGE_NAME',
item_condition VARCHAR2(1) path 'PART_NUMBER_INFORMATION/ITEM_CONDITION' ,
minimum_shelf_life NUMBER path 'PART_NUMBER_INFORMATION/MINIMUM_SHELF_LIFE',
shelf_life_remaining VARCHAR2(3) path 'PART_NUMBER_INFORMATION/SHELF_LIFE_REMAINING',
cert_of_conformance VARCHAR2(1000) path 'PART_NUMBER_INFORMATION/CERTIFICATE_OF_CONFORMANCE',
export_license VARCHAR2(3) path 'PART_NUMBER_INFORMATION/EXPORT_LICENSE',
locations XMLTYPE path 'LOCATIONS'
)x2,
XMLTABLE('/LOCATIONS/LOCATION'
passing x2.locations
columns
line_location_no NUMBER path 'LINE_NUMBER',
line_loc_status VARCHAR2(15) path 'STATUS',
line_loc_status_date VARCHAR2(24) path 'STATUS_DATE',
line_loc_qty NUMBER path 'QUANTITY',
delivery_destination VARCHAR2(1000) path 'DELIVERY_DESTINATION',
delivery_date VARCHAR2(24) path 'DELIVERY_DATE',
delivery_terms VARCHAR2(3) path 'DELIVERY_TERMS',
port_of_origin VARCHAR2(150) path 'PORT_OF_ORIGIN',
recipient_code VARCHAR2(16 ) path 'RECIPIENT/CODE',
recipient_name VARCHAR2(40 ) path 'RECIPIENT/NAME',
recipient_phone VARCHAR2(23 ) path 'RECIPIENT/PHONE',
recipient_email VARCHAR2(100 ) path 'RECIPIENT/EMAIL',
distributions XMLTYPE path 'DISTRIBUTIONS'
)x3,
XMLTABLE('/DISTRIBUTIONS/DISTRIBUTION'
passing x3.distributions
columns
dist_line_no NUMBER path 'LINE_NUMBER',
dist_line_status VARCHAR2(15) path 'STATUS',
dist_line_status_date VARCHAR2(24) path 'STATUS_DATE',
dist_line_qty NUMBER path 'QUANTITY',
chart_of_account VARCHAR2(420) path 'CHART_OF_ACCOUNT',
project_distribution VARCHAR2(4000) path 'PROJECT_DISTRIBUTION'
)x4;
end;As there is change in requirement now I need to read the multiple supplier sites at the header level. Current this is my structure please give an idea how to read the mulitple sites as one record, probably i can increase the supplier site columns at table level so as to capture second site level information.
But if in case if i receive that time it should not fail please provide some good solution for this issue.
Thanks in advance for your help.
Regards
NagendraHi odie,
Thanks for your response. But here my supplier site will always be maxiumum 2 times and minimum 1 time. My thinking is to fit this one in the existing code by repeating the supplier site only like this
supp_site_id NUMBER path 'HEADER/SUPPLIER/SITES/SITE/ID',
supp_site_name VARCHAR2(140) path 'HEADER/SUPPLIER/SITES/SITE/NAME',
supp_site_phone VARCHAR2(23) path 'HEADER/SUPPLIER/SITES/SITE/PHONE',
supp_sit_phone_ext VARCHAR2(4 ) path 'HEADER/SUPPLIER/SITES/SITE/PHONE_EXTENSION',
supp_site_fax VARCHAR2(23 ) path 'HEADER/SUPPLIER/SITES/SITE/FAX',
supp_site_email VARCHAR2(100 ) path 'HEADER/SUPPLIER/SITES/SITE/EMAIL',
supp_site_add_line1 VARCHAR2(254 ) path 'HEADER/SUPPLIER/SITES/SITE/ADDRESS_LINE1',
supp_site_add_line2 VARCHAR2(35 ) path 'HEADER/SUPPLIER/SITES/SITE/ADDRESS_LINE2',
supp_site_add_line3 VARCHAR2(35 ) path 'HEADER/SUPPLIER/SITES/SITE/ADDRESS_LINE3',
supp_site_country_code VARCHAR2(2 ) path 'HEADER/SUPPLIER/SITES/SITE/COUNTRY_CODE',
supp_site_province VARCHAR2(25 ) path 'HEADER/SUPPLIER/SITES/SITE/PROVINCE',
supp_site_state VARCHAR2(25 ) path 'HEADER/SUPPLIER/SITES/SITE/STATE',
supp_site_city VARCHAR2(25 ) path 'HEADER/SUPPLIER/SITES/SITE/CITY',
supp_site_area_code VARCHAR2(10 ) path 'HEADER/SUPPLIER/SITES/SITE/AREA_CODE',
supp_site_zip VARCHAR2(20 ) path 'HEADER/SUPPLIER/SITES/SITE/ZIP',
supp_site_region_code VARCHAR2(3 ) path 'HEADER/SUPPLIER/SITES/SITE/REGION_CODE',
supp_site_id2 NUMBER path 'HEADER/SUPPLIER/SITES/SITE/ID',
supp_site_name2 VARCHAR2(140) path 'HEADER/SUPPLIER/SITES/SITE/NAME',
supp_site_phone2 VARCHAR2(23) path 'HEADER/SUPPLIER/SITES/SITE/PHONE',
supp_sit_phone_ext2 VARCHAR2(4 ) path 'HEADER/SUPPLIER/SITES/SITE/PHONE_EXTENSION',
supp_site_fax2 VARCHAR2(23 ) path 'HEADER/SUPPLIER/SITES/SITE/FAX',
supp_site_email2 VARCHAR2(100 ) path 'HEADER/SUPPLIER/SITES/SITE/EMAIL',
supp_site_add_line1_2 VARCHAR2(254 ) path 'HEADER/SUPPLIER/SITES/SITE/ADDRESS_LINE1',
supp_site_add_line2_2 VARCHAR2(35 ) path 'HEADER/SUPPLIER/SITES/SITE/ADDRESS_LINE2',
supp_site_add_line3_2 VARCHAR2(35 ) path 'HEADER/SUPPLIER/SITES/SITE/ADDRESS_LINE3',
supp_site_country_code_2 VARCHAR2(2 ) path 'HEADER/SUPPLIER/SITES/SITE/COUNTRY_CODE',
supp_site_province_2 VARCHAR2(25 ) path 'HEADER/SUPPLIER/SITES/SITE/PROVINCE',
supp_site_state_2 VARCHAR2(25 ) path 'HEADER/SUPPLIER/SITES/SITE/STATE',
supp_site_city_2 VARCHAR2(25 ) path 'HEADER/SUPPLIER/SITES/SITE/CITY',
supp_site_area_code_2 VARCHAR2(10 ) path 'HEADER/SUPPLIER/SITES/SITE/AREA_CODE',
supp_site_zip_2 VARCHAR2(20 ) path 'HEADER/SUPPLIER/SITES/SITE/ZIP',
supp_site_region_code_2 VARCHAR2(3 ) path 'HEADER/SUPPLIER/SITES/SITE/REGION_CODE',As this table I am being used in many areas, it will be problem for me if try to go for different levels of tables. Or else can it be possible to read only once
I mean only the first in the xml tags and leave the second xml. As there is not much significant for the second one.
I appreciate your ideas on this, as the structure we are following is to rigid so I don't have much options to explore, please provide me your inputs in this context.
Thanks for your help.
Regards
Nagendra
Edited by: 838961 on Jul 13, 2011 1:43 AM -
Error while opening the XML file
Hi all,
i'am trying to download data from internal table to XML file with root node and its
corresponding child nodes.i have written the program in this way.
tables: mara.
include bcciixml_decl.
include bcciixml_impl.
parameters: p_matnr like mara-matnr.
start-of-selection.
data: piXML type ref to if_ixml,
pDocument type ref to if_ixml_document,
pStreamFactory type ref to if_ixml_stream_factory,
pIStream type ref to if_ixml_istream,
pParser type ref to if_ixml_parser,
pNode type ref to if_ixml_node,
pText type ref to if_ixml_text,
string type string,
count type i,
index type i,
totalSize type i,
dsn(40) type C,
xstr type xstring.
types: begin of it_mara,
matnr like mara-matnr,
ernam like mara-ernam,
aenam like mara-aenam,
vpsta like mara-vpsta,
end of it_mara.
data: itab_mara type table of it_mara.
select matnr ernam aenam vpsta from mara into table itab_mara where
matnr = p_matnr.
types: begin of xml_line,
data(256) type X,
end of xml_line.
data: xml_table type table of xml_line.
parameters: filename like rlgrap-filename.
pixml = cl_ixml=>create( ).
*-- create the initial document
pDocument = pixml->create_document( ).
pStreamFactory = pixml->create_stream_factory( ).
*-- create an input stream for the table
*pIStream = pStreamFactory->create_istream_itable( table = xml_table
size = totalSize ).
pParser = piXML->create_parser( stream_factory = pStreamFactory
istream = pIStream
document = pDocument ).
data: pOStream type ref to if_ixml_ostream.
pOStream = pStreamFactory->create_ostream_itable( table = xml_table ).
call method pDocument->render( ostream = pOStream ).
*-- how many bytes were written to the table?
totalSize = pOStream->get_num_written_raw( ).
*-- write the XML document back to the frontend
concatenate filename '.out' into filename.
condense filename no-gaps.
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
BIN_FILESIZE = totalSize
FILENAME = filename
FILETYPE = 'BIN'
TABLES
DATA_TAB = itab_mara
EXCEPTIONS
OTHERS = 11
IF SY-SUBRC <> 0.
ENDIF.
*-- print the whole DOM tree as a list...
pNode = pDocument.
perform print_node using pNode.
FORM print_node *
form print_node using value(pNode) type ref to if_ixml_node.
data: indent type i.
data: pText type ref to if_ixml_text.
data: string type string.
indent = pNode->get_height( ) * 2.
case pnode->get_type( ).
when if_ixml_node=>co_node_element.
string = pNode->get_name( ).
write: at /indent '<', string, '> '.
when if_ixml_node=>co_node_text.
pText ?= pNode->query_interface( ixml_iid_text ).
if pText->ws_only( ) is initial.
string = pNode->get_value( ).
write: at /indent string.
endif.
endcase.
pNode = pNode->get_first_child( ).
while not pNode is initial.
perform print_node using pNode.
pNode = pNode->get_next( ).
endwhile.
endform.
but when open the XML file which i created on the desktop it shows the following error.
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.
XML document must have a top level element. Error processing resource 'file:///C:/Documents and Settings/anilda/Desktop/sim...
how to rectify this error.
Regards,
satish.You are going to need to provide more details about this shell script file you are executing and the environment it is in. Beyond being on a Windows box, you have provided none of those details.
If the SQL statement will execute cleanly in SQLDeveloper but not your script, then the issue lies in the script. How do you know the error is that SQL statement? Can your script even "select * from dual;" successfully?
Also, SQLDeveloper (which I don't use) may contain its own libraries for accessing the DB. You probably should consider upgrading to a SQL*Plus client that is at least the same version or later as your database.
Note:
As I recall, xmlgen in 9.2 is now a synonym for dbms_xmlgen. You should change the package name accordingly [url http://docs.oracle.com/cd/B10501_01/appdev.920/a96612/d_xmlge2.htm#1010709]dbms_xmlgen.getXML -
When I am reading an XML file in a folder I am getting extra characters like squares before and after each and every character of the XML file.
Why is this so.I thought they are spaces and trimmed it but i didnt work.I replaced thinking as escape characters and that also did not work.But when I am prionting the ASCII value of the first character of the file I am getting -17.
Please can anyone help me out of this.
Thanks,
Sravanthipublic class Example()
File file = new File("C:/SCTMUnZip/"+files);
System.out.println("Files inside the directory:::"+files[i]);
String filedata = getContentsofFile(file);
if(file.getName().contains(".xml"))
InputStreamReader reader = new InputStreamReader(new FileInputStream("C:/SCTMUnZip/"+files[i]+"/"));
System.out.println("Encoding Style:::"+reader.getEncoding());
byte[] filebytes = filedata.getBytes("UTF-16");//byte[] utf8String = Encoding.UTF8.GetBytes(srcString);
System.out.println("This is a XML File...");
file1.setMStrFileName(files[i]);
file1.setMPFileData(filebytes);
//file1.setMStrFileName(files[i]);
/*Pattern pattern = Pattern.compile("[^]");
Matcher matcher = pattern.matcher(filedata);
String str = matcher.replaceAll("");
filedata = str;
System.out.print(str);*/
else
System.out.println("This is a normal file...");
file1.setMStrFileName(files[i]);
file1.setMPFileData(filedata.getBytes());
static public String getContentsofFile(File file)
StringBuilder filecontents = new StringBuilder();
try
BufferedReader input = new BufferedReader(new FileReader(file));
try
String line = null; //not declared within while loop
* readLine is a bit quirky :
* it returns the content of a line MINUS the newline.
* it returns null only for the END of the stream.
* it returns an empty String if two newlines appear in a row.
while (( line = input.readLine()) != null){
filecontents.append(line);
filecontents.append(System.getProperty("line.separator"));
finally {
input.close();
catch (IOException ex){
ex.printStackTrace();
return filecontents.toString();
The files in the folder are log.txt and output.xml(has UTF-16 as the encoding style in the first line).log.txt is read fine but output.xml is not. -
Getting error while running the XML file using XML Publisher Desktop
Hi all,
We have successfully loaded the XML file using XML Publisher Desktop. But when we preview the same using PDF format we are getting the following error.
Font Dir: C:\Program Files\Oracle\XML Publisher Desktop\Template Builder for Word\fonts
Run XDO Start
RTFProcessor setLocale: en-us
FOProcessor setData: C:\Documents and Settings\smanmadh\Desktop\ProductCompensationDT.xml
FOProcessor setLocale: en-us
java.lang.NullPointerException
at oracle.apps.xdo.template.fo.area.PageNumber.formatString(PageNumber.java:104)
at oracle.apps.xdo.template.fo.IDManager.registerId(IDManager.java:44)
at oracle.apps.xdo.template.fo.area.AreaTree.registerLastPageJoinSeq(AreaTree.java:1106)
at oracle.apps.xdo.template.fo.area.AreaTree.incrementJoinSequenceIndex(AreaTree.java:219)
at oracle.apps.xdo.template.fo.area.AreaTree.registerLastPageDocument(AreaTree.java:1089)
at oracle.apps.xdo.template.fo.area.AreaTree.forceOutput(AreaTree.java:471)
at oracle.apps.xdo.template.fo.elements.FORoot.end(FORoot.java:58)
at oracle.apps.xdo.template.fo.FOHandler.endElement(FOHandler.java:386)
at oracle.xml.parser.v2.XMLContentHandler.endElement(XMLContentHandler.java:196)
at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1212)
at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:301)
at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:268)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:149)
at oracle.apps.xdo.template.fo.FOProcessingEngine.process(FOProcessingEngine.java:279)
at oracle.apps.xdo.template.FOProcessor.generate(FOProcessor.java:1022)
at RTF2PDF.runRTFto(RTF2PDF.java:626)
at RTF2PDF.runXDO(RTF2PDF.java:460)
at RTF2PDF.main(RTF2PDF.java:251)
Thanks in Advance.
Sudeep.This is BI related. You will get a quicker answer from the BI Publisher forum
BI Publisher -
Problems with and tags while reading the xml file
Hi
I am using the xml files in my project. The project uses Tomcat, JMS. The project is divided into some components which communicate with each oher thru JMS. The component for which I am responsible gets a dcoument object from the JMS which is a processed xml of the following format (the processing is done by the DBMS_XMLGEN package of oracle)
<?xml version="1.0" encoding="UTF-8"?>
<root>
<filename>157_1000000001</filename>
<querydata>
<tabdata>
<tabinfo>Tab-id3</tabinfo>
<queryset>
<query name="Fax">
select a.ARLN_NAME,d.TICKETED_ORIGIN,d.TICKETED_DESTINATION, d.ENDORSEMENTS,to_char(d.DATE_OF_ISSUE,'DDMONYY') as DATE_OF_ISSUE ,d.EXCHANGE_DOC_TYPE,
d.PASSENGER_NAME,d.ORIG_ISS_AIRLINE,d.ORIG_DOC_NO,d.ORIG_PLACE_OF_ISSUE,
to_char(d.ORIG_DATE_OF_ISSUE,'DDMONYY'),d.ORIG_ISSUE_AGENT,d.CUR_OF_SALE,d.GROSS_FARE,d.EQUIV_CUR_OF_SALE,d.EQUIV_FARE,
d.PANDA_DEAL_CODE,d.ISI,d.reporting_date
from airline_master a,ticket_main d,ticket_conj e where d.doc_no = e.doc_no and d.iss_airline = e.iss_airline
and e.conj_doc_no = (select DOC_NO from TICKET_CONJ where CONJ_DOC_NO = 1000000001 and ISS_AIRLINE = 157)
and e.ISS_AIRLINE = 157 and d.iss_airline = a.ARLN_NUM_CODE
</query>
</queryset>
</tabdata>
</querydata>
the function on my side is like this
private void processMessage(ObjectMessage objmessage)
Document XMLreqObject = (Document) objmessage.getObject();
Element root = XMLreqObject.getRootElement();
String resultFilename = root.getChildText("filename");
Element tabSet = root.getChild("querydata");//doesnt work
ArrayList tabSetlist = new ArrayList(tabSet.getChildren ("tabdata"));//doesnt work
The code commented with "doesnt work", is not working. What must be the problem ?
Thanks in Advance
MartinOkay. Your original example XML didn't include < or > which was rather confusing if that particular feature was supposed to be the cause of the problem. Also calling them "tags" was rather confusing since "tags" is the term for the things that come at the beginning and of an element, like this:<data>...</data>Anyway, I assume your theory is that documents that don't have < in a text element process correctly and documents that do have < in a text element get "stuck" in the parser? Well, from your original description the process appears to be:
1. Create XML
2. Parse it into a Document
3. Send the Document via JMS
4. Receive the Document via JMS
5. Process it.
And it's step 4 that is "stuck"? That would be my guess based on the code you posted. -
Error while encrypting the xml file using asymmetric cipher...pls help
i am encryption the xml file using asymmetric cyper....
in one class , i am generating private key and public key using "RSA" algorithm..using 1024 byte initialization...
it is generating properly...
and after that in second class i am encrypting the xml file using "DESede" algorithm and i am using public key of above class..
but i am getting exceptione :
java.security.InvalidKeyException: Invalid key length: 162 bytes
at com.sun.crypto.provider.DESedeCipher.engineGetKeySize(DashoA6275)
at javax.crypto.Cipher.init(DashoA6275)
at XmlEncryption.getEncryptedData(XmlEncryption.java:147)
at XmlEncryption.encryptCompleteXmlFile(XmlEncryption.java:123)
at demoXmlEncApp.simulateBookSellersEnd(demoXmlEncApp.java:72)
at demoXmlEncApp.main(demoXmlEncApp.java:29)
so, what is that ?
i want to use RSA algo for key generatiion and DESede for cipher initialization .
is there any site for where source code of xml file encryption using asymmetric cipher is available?
pls, help me.....Sachin,
What sabre150 is trying to explain to you, is that encrypting data (such as an XML file) is a 2-step process. In the first step, you generate a symmetric key (such as DES, 3DES, AES) and encrypt your file with this key (and the appropriate mode and padding).
In order to ensure that your encrypted data cannot be decrypted by unauthorized individuals, you now need to protect the symmetric key. Encrypting your symmetric key with another symmetric key does not solve the problem, since you have a chain of symmetric keys that need to be encrypted into infinity.
Cryptographers solve this problem by encrypting the symmetric key with an asymmetric key, such as as RSA. To perform this second step, you generate an RSA key-pair, encrypt the symmetric key you generated in step 1 with the Public key of the RSA key-pair, and give the recipient of the encrypted XML file, access to the Private key of the RSA key-pair as well as the encrypted symmetric key.
The recipient, then uses the RSA Private key to decrypt the symmetric key first, and then uses the "plaintext" symmetric key to decrypt the XML file.
What sabre150 was also attempting to explain to you, is the traditional way of transporting an encrypted "blob" that consists of data + symmetric key. With a modern key-management system, combining the two would be unnecessary. -
Error while validating the xml file
Hello All,
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
dbf.setValidating(false);
DocumentBuilder db = dbf.newDocumentBuilder();
doc = db.parse(new ByteArrayInputStream(xmlString.getBytes()));
In this code even though I have set the validation of instance of DocumentBuilderFactory to false it still tries to validate the xml file using the dtd. How do I avoid the validation of the xml file by the dtd file ?.
Is anybody having any suggestions for that ?.
Help needed urgently.
Thanks and regards,
SachinThanks for the prompt help. Is there any other way instead of removing the DTD line ?. Because the xml is coming as a string and removing the dtd and then adding it will unneccesary hamper performance. Do you any other way in which even though I don't remove the line I get the output without removing the dtd line ?.
thanks and regards,
Sachin -
Hi,
I have created a data server in the topology manager for xsd file with the below paramters in url
jdbc:snps:xml?d=E:\ODI\Ibrm_gl_data.xsd&s=GLDATA&dod=true
And successfully imported the metada from xsd file in to a model.
I have written the below command in the odi procedure on target tab to load the data from xml file in to the schema.
LOAD FILE "E:\ODI\test.xml" ON SCHEMA GLDATA REPLACE AUTO_UNLOCK READONLY
When i execute the procedure iam getting the below error.
ODI-1228: Task IMPORT_XML (Procedure) fails on the target XML connection BRM_XSD.
Caused By: java.sql.SQLException: class org.xml.sax.SAXException
Found PCDATA in element Element-0065 values ({_DATA=4})
Iam using the ODI version11.1.1.3
Can any one help me in trouble shooting this issue?
Thanks in advance
Balaji TKCould it be related to support issue described in Doc ID 1462171.1 ?
-
I am getting error while converting the xml file to pdf
Hi all,
I am getting the error
"Runtime exception when processing target-field mapping /ns0:MT_payment_rec/payment_rec/companycode; root message: Exception:[ExceptionConverter: java.io.IOException: The document has no pages.] in class com.sap.xi.tf._MM_Payment_Advice_ method calculate[a, com.sap.aii.mappingtool.tf7.rt.Context@2e0d7679]"
I followed below blog for converting xml to pdf
http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/1940
in this blog they mentioned source & target path, but I read the values directly Through sender communication channel with out giving the source and target path in udf(calling the java code from imported archive, and excuted for converting xml to pdf file),
but i am getting above error,
Is there any possibility to return the converted pdf values to target field through udf
Pls help me.Hi
Can u tell us what is the function of the UDF in your case ?
Apart from Converting the given input xml to pdf output, I dont see there is any other functionality within the UDF .. and the XMLTOPDF Class requires the two inputs to be passed when it is instantiated in the code
and now if you don't pass those parameters, it's going to throw an IO exception
Regards
Krishna
Maybe you are looking for
-
I have a ThinkServer RD530 and am wanting to upgrade the RAM. I currently have two 8GB RDIMMS that I would like to continue using while adding two 16 GB RDIMMS. I have reviewed the memory rules from the HMM but have been unable to confirm either wa
-
i lost my phone and i got an unlocked 4s from my gf she used it before an its still connected to her icloud is there a way i can restore my icloud back up to replace hers without messing up the unlock also my latest backup isnt showing on my pc help
-
Has CS5 changed the way it saves a legacy file? (3.0.eps)
We have been saving files for opening in a sign layout and vinyl cutting program (FlexiSign) for years as a version 3.eps. Since upgrading to CS5, the very old version of Flexisign we have been using can no longer even see the file as a choice to ope
-
Text and graphic highlights are "ugly"
Whenever a text button or a custom button is highlighted, the highlight has white on the edges. I cannot get any combination of overlay mask or custom button with built in highlight to look properly. Any ideas or suggestions?
-
Anyconnect: unable to connect to host by hostname through VPN
VPN AnyConnect is connected successfull. DNS-lookup (for private and public hosts) is successfull. Ping hosts by IP is successfull. Problem: Ping or connect private hosts by hostname is failed (but sometimes works). When I try to connect VPN using ot