XML and MIME

I'm having a problem with the new JSE8 application server. We have an AJAX application that uses the Google maps API to retrieve some XML data via this type code (javascript):
var request = GXmlHttp.create();
request.open('GET', '/maps/%tempFile%', true);
request.onreadystatechange = function() {
if (request.readyState == 4) {
alert("request="+request.toString+".");
alert("request.status="+request.status+".");
alert("request.responseXML="+request.responseXML+".");
alert("request.responseText="+request.responseText+".");
alert("request.statusText="+request.statusText+".");
var xmlDoc = request.responseXML;
The problem is that the request.responseXML is null because the application server is returning the XML file as a text file instead of an XML file (so the request.responseText has the data in it).
The problem is that I can't figure out how to set a MIME type so the application server knows to return it as XML. Help!

Yes, we used a properly formatted XML document. I managed to fix it by using a weird workaround...checking the request.responseText length in case the data was read in that way instead of into the request.responseXML structure. Then, I used the Google GXml parse function to stick it in an XML structure for further processing, as shown below. I'm still confused why the Applicaton server did not return it as an XML structure in the first place, though.
// Read the data from maps.xml
var request = GXmlHttp.create();
request.open('GET', '/maps/branch.xml', true);
request.onreadystatechange = function() {
if (request.readyState == 4) {
var xmlDoc = null;
var textLength = parseFloat(request.responseText.length);
if (textLength > 0) {
xmlDoc = GXml.parse(request.responseText);
else {
xmlDoc = request.responseXML;
// obtain the array of markers and loop through it
var markers = xmlDoc.documentElement.getElementsByTagName("branch");

Similar Messages

  • Mime-type tag in web.xml and attachment download

    i have set a mime-type in web.xml as below:
    <mime-mapping>
         <extension>xls</extension>
         <mime-type>application/vnd.ms-excel</mime-type>
    </mime-mapping>
    And i have a simple jsp that only shows a table and i am making this jsp to get downloaded as an excel attachment. To make it possible i have written the following line in the JSP:
    response.setHeader( "content-disposition", "attachment; filename=myexcel.xls" );
    But i am not setting the content type first by writing:
    response.setContentType( "application/vnd.ms-excel" );
    since i have already mentioned the appropriate mime-type for excel files in web.xml.
    I am using both mozilla and IE. Both are showing file download dialog. But IE is able to correctly identify the type of the attachment and opens it up with Microsoft Excel whereas mozilla fails to identify the type, assumes it to be an HTML document and opens it up in a new window of IE.
    mozilla works fine only when i set the content type in the JSP itself. But IE works in all conditions even without having the mime-type tag in web.xml.
    If i have already specified the mime-type for particular type of file in web.xml, is there any requirement to set the content type again in the JSP/servlet?
    Please help. I even changed the mime-type for .xls (excel) files in web.xml and made it text/plain, but still the same thing is happening. IE is always showing the correct file type where as mozilla is taking it as an HTML document.
    i am using weblogic server 8.1.

    the web xml mime type setting are for static files served by the server...
    if you print a file directly to the output of the servlet, you must set the mime type, so DO write :
    response.setContentType( "application/vnd.ms-excel" );
    IE "works fine" because it also uses the file extension to decide the mime type... but in the absolute, it's a wrong behaviour

  • Web Applications and MIME Types

    Hi,
    I am using WL Server 5.1, Service Pack 4 with the Sun JDK 1.3 on RedHat
    Linux 6.2. I woiuld like to deploy my application as a web application. I
    have created the web.xml file, etc. as per teh specification, and things
    work as expected for the most part: I can server up plain HTML, JSPs, etc.
    without a problem. I do have one major problem however: I cannot seem to
    serve up GIFs, PDFs, etc. I believe I have correctly specified the MIME
    mappings in my web.xml file. Is there something I am missing here? I'd
    appreciate any help in this regard. I am attaching my web.xml file for those
    who'd like to look at it.
    TIA,
    Prashanth
    [web.xml]

    Bjorn,
    I am re-attaching the web.xml file. I think I do have the necessary
    specifications in it. Just to be safe, I have put all the mime mappings in
    the weblogic.properties file as well, still to no avail. Interestingly
    enough, things work perfectly well when I deploy it the default weblogic
    way.
    Thanks,
    Prashanth
    "Björn Brenander" <[email protected]> wrote in message
    news:[email protected]..
    Prashanth Nandavanam wrote:
    Hi,
    I am using WL Server 5.1, Service Pack 4 with the Sun JDK 1.3 on
    RedHat
    Linux 6.2. I woiuld like to deploy my application as a web application.I
    have created the web.xml file, etc. as per teh specification, and things
    work as expected for the most part: I can server up plain HTML, JSPs,etc.
    without a problem. I do have one major problem however: I cannot seem to
    serve up GIFs, PDFs, etc. I believe I have correctly specified the MIME
    mappings in my web.xml file. Is there something I am missing here? I'd
    appreciate any help in this regard. I am attaching my web.xml file forthose
    who'd like to look at it.
    TIA,
    Prashanth
    ÿþ<Prashahth: your attachment seems to have disappeared somewhere.
    For some reason, my web applications didn't know how to serve plain
    HTML, so I added
    <mime-mapping>
    <extension>html</extension>
    <mime-type>text/html</mime-type>
    </mime-mapping>
    to my web.xml, and it worked.
    I find this behaviour quite strange, since the manual says that the
    mappings defined in weblogic.properties should propagate to web
    applications.
    Regards,
    Björn Brenander[web.xml]

  • Multiple plugtmp-1 plugtmp-2 etc. in local\temp folder stay , crossdomain.xml and other files containing visited websitenames created while private browsing

    OS = Windows 7
    When I visit a site like youtube whith private browsing enabled and with the add-on named "shockwave flash" in firefox add-on list installed and activate the flashplayer by going to a video the following files are created in the folder C:\Users\MyUserName\AppData\Local\Temp\plugtmp-1
    plugin-crossdomain.xml
    plugin-strings-nl_NL-vflLqJ7vu.xlb
    The contents of plugin-crossdomain contain both the "youtube.com" adress as "s.ytimg.com" and is as follows:
    <?xml version="1.0"?>
    <!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
    -<cross-domain-policy> <allow-access-from domain="s.ytimg.com"/> <allow-access-from domain="*.youtube.com"/> </cross-domain-policy>
    The contents of the other file I will spare you cause I think those are less common when I visit other sites but I certainly don't trust the file. The crossdomain.xml I see when I visit most other flashpayer sites as well.
    I've also noticed multiple plugin-crossdomain-1.xml and onwards in numbers, I just clicked a youtube video to test, got 6 of them in my temp plus a file named "plugin-read2" (no more NL file cause I changed my country, don't know how youtube knows where I'm from, but that's another subject, don't like that either). I just noticed one with a different code:
    <?xml version="1.0"?>
    -<cross-domain-policy> <allow-access-from domain="*"/> </cross-domain-policy>
    So I guess this one comprimises my browsing history a bit less since it doesn't contain a webadress. If these files are even meant to be deposited in my local\temp folder. The bigger problem occurs when they stay there even after using private browsing, after clearing history, after clearing internet temporary files, cache, whatever you can think of. Which they do in my case, got more than 50 plugtmp-# folders in the previous mentioned local\temp folder containing all website names I visited in the last months. There are a variety of files in them, mostly ASP and XML, some just say file. I have yet to witness such a duplicate folder creation since I started checking my temp (perhaps when firefox crashes? I'd say I've had about 50 crashes in recent months).
    I started checking my temp because of the following Microsoft Security Essential warnings I received on 23-4-12:
    Exploit:Java/CVE-2010-0840.HE
    containerfile:C:\Users\Username\AppData\Local\Temp\jar_cache2196625541034777730.tmp
    file:C:\Users\Username\AppData\Local\Temp\jar_cache2196625541034777730.tmp->pong/reversi.class
    and...
    Exploit:Java/CVE-2008-5353.ZT
    containerfile:C:\Users\Noname\AppData\Local\Temp\jar_cache1028270176376464057.tmp
    file:C:\Users\Noname\AppData\Local\Temp\jar_cache1028270176376464057.tmp->Testability.class
    Microsoft Security Essentials informed me that these files were quarantained and deleted but when going to my temp file they were still there, I deleted them manually and began the great quest of finding out what the multiple gigabytes of other files and folders were doing in that temp folder and not being deleted with the usual clearing options within firefox (and IE).
    Note that I have set my adobe flasplayer settings to the most private intense I could think of while doing these tests (don't allow data storage for all websites, disable peer-to peer stuff, don't remember exactly anymore, etc.). I found it highly suspicious that i needed to change these settings online on an adobe website, is that correct? When right-clicking a video only limited privacy options are available which is why I tried the website thing.
    After the inital discovery of the java exploit (which was discovered by MSE shortly after I installed and started my first scan with Malwarebytes, which in turn made me suspicious whether I had even downloaded the right malwarebytes, but no indication in the filename if I google it). Malwarebytes found nothing, MSE found nothing after it said it removed the files, yet it didn't remove them, manually scanning these jar_cache files with both malwarevytes and MSE resulted in nothing. Just to be sure, I deleted them anyways like I said earlier. No new jar_cache files have been created, no exploits detected since then. CCleaner has cleaned most of my temp folder, I did the rest, am blocking all cookies (except for now shortly), noscript add-on has been running a while on my firefox (V 3.6.26) to block most javascripts except from sites like youtube. I've had almost the same problem using similar manual solutions a couple of months ago, and a couple of months before that (clearing all the multiple tmp folders, removing or renaming jar_cache manually, running various antmalware software, full scan not finding a thing afterwards, installing extra add-ons to increase my security, this time it's BetterPrivacy which I found through a mozilla firefox https connection, I hope, which showed me nicely how adobe flash was still storing LSO's even after setting all storage settings to 0 kb and such on the adobe website, enabling private browsing in firefox crushed those little trolls, but still plugtmp trolls are being created, help me crush them please, they confuse me when I'm looking for a real threat but I still want to use flash, IE doesn't need those folders and files, or does it store them somewhere else?).
    I'm sorry for the long story and many questions, hope it doesn't scare you away from helping me fight this. I suspect it's people wanting to belong to the hackergroup Anonymous who are doing this to my system and repeating their tricks (or the virus is still there, but I've done many antivirus scans with different programs so no need to suggest that option to me, they don't find it or I run into it after a while again, so far, have not seen jar_cache show up). Obviously, you may focus on the questions pertaining firefox and plugtmp folders, but if you can help me with any information regarding those exploits I would be extremely grateful, I've read alot but there isn't much specific information for checking where it comes from when all the anti-virus scanners don't detect anything anymore and don't block it incoming. I also have downloaded and installed process monitor but it crashes when I try to run it. The first time I tried to run it it lasted the longest, now it crashes after a few seconds, I just saw the number of events run up to almost a million and lots of cpu usage. When it crashed everything returned back to normal, or at least that's what I'm supposed to think I guess. I'll follow up on that one on their forum, but you can tell me if the program is ligit or not (it has a microsoft digital signature, or the name micosoft is used in that signature).

    update:
    I haven't upgraded my firefox yet because of a "TVU Web Player" plugin that isn't supported in the new firefox and I'm using it occasionally, couldn't find an upgrade for it. Most of my other plugins are upgraded in the green (according to mozilla websitechecker):
    Java(TM) Platform SE 6 U31 (green)
    Shockwave for Director (green - from Adobe I think)
    Shockwave Flash (green - why do I even need 2 of these adobe add-ons? can I remove one? I removed everything else i could find except the reader i think, I found AdobeARM and Adobe Acrobat several versions, very confusing with names constantly switching around)
    Java Deployment Toolkit 6.0.310.5 (green, grrr, again a second java, why do they do this stuff, to annoy people who are plagued with java and flash exploits? make it more complicating?)
    Adobe Acrobat (green, great, it's still there, well I guess this is the reader then)
    TVU Web Player for FireFox (grey - mentioned it already)
    Silverlight Plug-In (yellow - hardly use it, I think, unless it's automatic without my knowing, perhaps I watched one stream with it once, I'd like to remove it, but just in case I need it, don't remember why I didn't update, perhaps a conflict, perhaps because I don't use it, or it didn't report a threat like java and doesn't create unwantend and history compromising temp files)
    Google Update (grey - can I remove? what will i lose? don't remember installing it, and if I didn't, why didn't firefox block it?)
    Veetle TV Core (grey)
    Veetle TV Player (grey - using this for watching streams on veetle.com, probably needs the Core, deleted the broadcaster that was there earlier, never chose to install that, can't firefox regulate that when installing different components? or did i just miss that option and assumed I needed when I was installing veetle add-on?)
    Well, that's the list i get when checking on your site, when i use my own browseroptions to check add-ons I get a slightly different and longer list including a few I have already turned off (which also doesn't seem very secure to me, what's the point in using your site then for anything other than updates?), here are the differences in MY list:
    I can see 2 versions of Java(TM) Platform SE 6 U31, (thanks firefox for not being able to copy-paste this)
    one "Classic Java plug-in for Netscape and Mozilla"
    the other is "next generation plug-in for Mozilla browsers".
    I think I'll just turn off the Netscape and Mozilla one, don't trust it, why would I need 2? There I did it, no crashes, screw java :P
    There's also a Mozilla Default plugin listed there, why does firefox list it there without any further information whether I need it or not or whether it really originates from Mozilla firefox? It doesn't even show up when I use your website plugin checker, so is there no easy way by watching this list for me to determin I can skip worrying about it?
    There's also some old ones that I recently deactivated still listed like windows live photo gallery, never remember adding that one either or needing it for anything and as usual, right-clicking and "visit homepage" is greyed out, just as it is for the many java crap add-ons I encountered so far.
    Doing a quick check, the only homepage I can visit is the veetle one. The rest are greyed out. I also have several "Java Console" in my extentions tab, I deactivated all but the one with the highest number. Still no Java Console visible though, even after going to start/search "java", clicking java file and changing the settings there to "show" console instead of "hide" (can't remember exact details).
    There's some other extentions from noscript, TVU webplayer again, ADblock Plus and now also BetterPrivacy (sidenote, a default.LSO remains after cleanup correct? How do I know that one isn't doing anything nasty if it's code has been changed or is being changed? To prevent other LSO's I need to use both private browsing and change all kinds of restrictions online for adobe flashplayer, can anyone say absurd!!! if you think you're infected and want to improve your security? Sorry that rant was against Adobe, but it's really against Anonymous, no offense).

  • Parsing XML and Storing values in instance variable

    hi,
    i'm new to XML.
    here i'm trying to parse an XML and store their element data to the instance variable.
    in my main method i'm tried to print the instance variable. but it shows "" (ie it print nothing ).
    i know the reason, its becas of the the endElement() event generated and it invokes the characters() and assigns "" to the instance variable.
    my main perspective is to store the element data in instance variable.
    thanks in advance.
    praks
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import javax.xml.parsers.*;
    import org.xml.sax.*;
    import org.xml.sax.helpers.*;
    public class mysax extends DefaultHandler
         String ctelement;
         CharArrayWriter contents;
         String vname1,vrcbreg1,vaddress1,vcountry1,vtelephone1,vfax1;
         String vname,vrcbreg,vaddress,vcountry,vtelephone,vfax;
         public mysax()
              vname1 = null;
              vrcbreg1 = null;
              vaddress1 = null;
              vcountry1 = null;
              vtelephone1 = null;
              vfax1 = null;
              contents= new CharArrayWriter();
         public void doparse(String url) throws Exception
              SAXParserFactory spf = SAXParserFactory.newInstance();
    SAXParser sp = spf.newSAXParser();
    ParserAdapter pa = new ParserAdapter(sp.getParser());
    pa.setContentHandler(this);
    pa.parse(url);          
         public void startElement(String namespace,String localName,String qName,Attributes atts)
              ctelement = localName;     
         public void endElement(String uri,String localName,String qName) throws SAXException
         public void characters(char[] ch,int start, int length) throws SAXException
              try
                   if(ctelement.equals("name"))
                        vname = new String (ch,start,length);
                        System.out.println("The method "+vname1);
              }catch (Exception e)
                   System.out.println("The exception "+e);
         public static void main(String args[])
              try
              mysax ms = new mysax();
              ms.doparse(args[0]);
              System.out.println("the contents name "+ms.vname1);
              catch(Exception e)
                   System.out.println("this is exception at main" +e);
    my XML looks like
    <coyprofile_result>
    <company>     
    <name>abcTech</name>
    <rcbreg>123456789</rcbreg>
    <address>Singapore</address>
    <country>sg</country>
    <telephone>123456</telephone>
    <fax>123155</fax>
    </company>
    </coyprofile_result>

    I believe that the problem has to do with the value you assign to ctelement. You are assigning the value of localName to ctElement, however for the element: <name>...</name> the localname is empty string i.e. "", but qName equals "name". Because you are assigning empty string to ctElement, when you do the comparison in characters of ctElement to "name" it will always be false. So in startElement change it to ctElement = qName; Try it and see if it works. I have produced similar programs and it works for me.
    Hope this helps.

  • New to XML and Oracle

    Just trying to clarify some issues as I try and learn about XML, and specifically how it integrates into the DB.
    1 - Is there a way with Oracle tools for me to get an XSD of an existing 9i relational schema? We are not currently using the XML DB, but our middleware developers would like to have an up to date XSD to use for their internal mapping.
    2 - Is there any way that I can keep that XSD up-to-date automatically, so I get a new one whenever the schema gets updated?
    3 - If I wanted to investigate storing XML docs within the DB in native XML format, I need to have an XML DB, correct? Is this DB construct maintained seperatelly from my "normal" relational schema? or are they kept in sync by Oracle?
    I know these may all be real basic questions, but as I said, I'm new to XML and Oracle. I am reading as much as I can, but there are a lot of docs out there.
    Thanks,
    Mike

    Hi
    1. On my opinion such a tool doesn't exists. Some parts can be implemented elsewhere, but not as described by you... e.g. with XSU if you specify the parameter "withschema" the XSD of the executed statement is generated. Another example is to use DBMS_METADATA to dump the data dictionary in XML (but not XSD, of course you could write your own XSLT to do this transformation...).
    2. -
    3. If you use XSD-based tables the XSD and the relational model are stored separately in the data dictionary. Therefore if you change the XSD you have to drop/create the XSD-based table... no schema evolution yet.
    Chris

  • How to set buildID.xml and custom.properties in SDK

    Hello,
    I just completed a new build deployment of SAP ME5.2, because after I deployed the new version, I don't think I have set a
    correct version number.Can you someone give me a sample how to set the buildID.xml and custom.properties? I am a new on the SAP ME5.2
    The Base version is ME_Base_5.2.5.16.5_netweaver-71_Update.zip and
    MEClient_Base_5.2.5.16.5_netweaver-71_Update.zip. the HB customzation
    version is ME_xxxxxx_2.0.0.0.x_netweaver-71.
    Within the sap note 1484551, you mentioned we need change the
    SDKInstallDir/build/buildID.xml file, here is the context of the file:
    buildID.xml -
    <?xml version="1.0" encoding="UTF-8"?>
    <buildID xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <customer>XXXXXX</customer>
    <revision>1.0.0.0</revision>
    <build>1</build>
    </buildID>
    buildID.xml -
    1. how can we change the revision and build?
    There is another file BuildToolDir/build/script/custom.properties, here
    is the file context:
    custom.properties----
    This file contains build properties used to configure the build
    system.
    The name of the software vendor implementing the customizations.
    vendor.name=xxxxxxxxx
    Vendor build identifier. This value is used to uniquely identify
    customizations built by a particular vendor for a particular customer
    and base
    application version.
    This is also used in path locations and in naming certain build
    artifacts, like the custom EJB module and the utility classes archive.
    vendor.id=xxxxxxxxx
    The installation of the J2EE engine installed in the development
    environment.
    ex. C:/usr/sap/CE1\J00
    j2ee.instance.dir=J2EEInstanceDir
    The web context path used to access the main web application. This
    is used by the build to set the
    context-root value in application.xml after an update has been
    imported.
    web.context.path=
    The web context path used to access the production XML interface web
    application. This is used by the build to set the
    context-root value in application.xml after an update has been
    imported.
    xml.context.path=
    The web context path to access resources from the web extension
    application, like images and work instruction HTML files.
    web-ext.context.path=web-ext
    The target database vendor. Valid values are 'oracle' or 'sqlserver'.db.vendor=ORACLE
    The JDBC driver configured for the application server.
    db.drivername=VMJDBC
    JDBC connection propertes for the WIP (Work In Process) database.
    This is the primary application database.
    db.wip.driverclassname=
    db.wip.driver.url=
    db.wip.host=
    db.wip.port=
    db.wip.sid=
    db.wip.user=
    db.wip.password=
    JDBC connection propertes for the ODS (Open Data Store) database.
    This is the offline reporting and archiving database.
    db.ods.driverclassname=
    db.ods.driver.url=
    db.ods.host=
    db.ods.port=
    db.ods.sid=
    db.ods.user=
    db.ods.password=
    Flag indicating whether to add DPMO NC codes to NC idat files when a
    new update is imported. This value is initially
    set by the installer according the the user selection.
    dpmo.nc.codes=
    The default locale used by the production system. The default locale
    is the locale used to display locale
    specific text and messages when the requested locale is not
    available. This property does not need to
    be set if the default locale is english.
    default.locale=en
    Used when running the build from Eclipse to locate the java compiler
    used by the WebLogic EJB compiler.
    jdk.home=C:/Program Files/Java/jdk1.5.0_20
    Compiler debug mode. If set to 'true', debug symbols will be
    compiled into the byte code.
    compile.debug=true
    Keystore alias
    security.alias=xxxxx
    Keystore password
    security.storepass=ChangeIt
    Key password
    security.keypass=ChangeIt
    Keystore type (jks=default,jceks,pkcs12)
    security.storetype=jks
    Optional source control build identifier that is to be displayed with
    standard version information.
    scs.build.ID=
    Optional extended version information to be displayed with standard
    version information.
    ext.info=
    custom.properties----
    2. How can we change this here?
    Regards,
    Leon Lu
    Edited by: Leon Lu on Aug 4, 2011 11:14 AM
    Edited by: Leon Lu on Aug 4, 2011 11:21 AM

    Hi,
    I created one request with logo in the header an page in the footer etc. and called StyleSheet. After you can import this formats by each request.
    You can do this in compound layout.
    Regards,
    Stefan

  • How To Get FileType and MIME Type from a File

    Hi,
    I am using following ways to get FileType and MIME Type.
    I am able to get file type, but I am getting MIME Type as */*
    Can any one please let me know how to get MIME Type, but it should not be time consuming process.
    For File Type I am using following Code:
    private String getFileData(InputStream inStream) {
    fileName = C:\temp\temp.tiff
    String filePath = Util.createTempFile(fileName);
    RandomAccessFile raf = new RandomAccessFile(filePath, "rw");
    while (inStream.available() > 0) {
         byte[] buf = new byte[inStream.available()];
         inStream.read(buf);
         raf.write(buf);
    inStream.close();
    raf.close();
    File file = new File(filePath);
    JFileChooser chooser = new JFileChooser();
    String fileType = chooser.getTypeDescription(file);
    file.delete();
    //MIME Type I am getting from
    DataHandler data = new DataHandler(new DocumentSource(inStream));
    data.getContentType();
    data.getContentType() is not working well in all cases.
    Can any one help me on this.
    Thanks in advance,
    Ram.
    Edited by: javausers07 on Apr 15, 2009 4:25 PM

    javausers07 wrote:
    Hi,
    I am using following ways to get FileType and MIME Type.
    I am able to get file type, but I am getting MIME Type as */*
    Can any one please let me know how to get MIME Type, but it should not be time consuming process.
    For File Type I am using following Code:
    private String getFileData(InputStream inStream) {
    fileName = C:\temp\temp.tiff
    String filePath = Util.createTempFile(fileName);
    RandomAccessFile raf = new RandomAccessFile(filePath, "rw");
    while (inStream.available() > 0) {
         byte[] buf = new byte[inStream.available()];
         inStream.read(buf);
         raf.write(buf);
    inStream.close();
    raf.close();
    File file = new File(filePath);Why do you do all above?
    JFileChooser chooser = new JFileChooser();
    String fileType = chooser.getTypeDescription(file);
    file.delete();
    //MIME Type I am getting from
    DataHandler data = new DataHandler(new DocumentSource(inStream));
    data.getContentType();
    data.getContentType() is not working well in all cases.That's because there's no way to get MIME type of all files on all filesystems.
    Kaj

  • How to extract data from xml and insert into Oracle table

    Hi,
    I have a large xml file. which will have hundreds of the following transaction tags having column names and there values.
    There is a table one of the schema with coulums "actualCostRate","billRate"....etc.
    I need to extract the values of these columns and insert into the table
    <Transaction actualCostRate="0" billRate="0" chargeable="1" clientID="NikuUK" chargeCode="LCOCD1" externalID="L-RESCODE_UK1-PROJ_UK_CNT_GBP-37289-8" importStatus="N" projectID="TESTPROJ" resourceID="admin" transactionDate="2002-02-12" transactionType="L" units="11" taskID="5017601" inputTypeCode="SALES" groupId="123" voucherNumber="ABCVDD" transactionClass="ABCD"/>
    <Transaction actualCostRate="0" billRate="0" chargeable="1" clientID="NikuEU" chargeCode="LCOCD1" externalID="L-RESCODE_US1-PROJ_EU_STD2-37291-4" importStatus="N" projectID="TESTPROJ" resourceID="admin" transactionDate="2002-02-04" transactionType="L" units="4" taskID="5017601" inputTypeCode="SALES" groupId="124" voucherNumber="EEE222" transactionClass="DEFG"/>

    Re: Insert from XML to relational table
    http://www.google.ae/search?hl=ar&q=extract+data+from+xml+and+insert+into+Oracle+table+&btnG=%D8%A8%D8%AD%D8%AB+Google&meta=

  • Override JNDI names in persistence.xml and @resource annotation

    I have a Java EE 7 application that I am developing for use with both GlassFish and WildFly, but I have discovered that both application servers use a slightly different format for specifying JNDI names.
    In GlassFish the persistence.xml file references the data source jdbc/myDataSouce, but in WildFly the data source needs to be java:/jdbc/myDataSource.The same is also true for classes that are annotated with @Resource. In GlassFish the annotation for a class using JavaMail would be @Resource(name = "mail/myMailSession"), but to deploy onto WildFly this would need to be @Resource(name = "java:mail/myMailSession").
    The only solution I've got at present is using Maven to create two different releases of the EAR file, with one EAR file containing a persistence.xml file with the data source jdbc/myDataSouce for use with GlassFish, and the second EAR file containing a persistence.xml file with the data source java:/jdbc/myDataSource for use with WildFly. Unfortunately, I haven't found a solution for the @Resource annotation.
    I've taken a look at the documentation for glassfish-application.xml and glassfish-ejb-jar.xml and have tried using resource-ref to override the JNDI names but the application fails to deploy due to an error in the name.
    My question is does GlassFish provide any capability to override the JNDI names specified in the persistence.xml file and classes with the @resource annotation?
    Many Thanks
    Paul

    Have you been able to solve this? I'm attempting to understand what Web Server 7 can do with regard to Java Persistence and what elements of it require Glassfish.
    I've also spent great amounts of time in WS6.1 trying to figure out why a JNDI resource couldn't be found. The rules of thumb I've learned are:
    - Try dropping the *'java:/comp/env/* prefix; just use jdbc/pact part
    - Make sure all referrences (in web.xml and sun-web.xml) are identical with regard to that name.
    I'm hoping you're not still dealing with this (it's been two months!) but if anybody else stumbles on this, maybe it'll help them.
    Dave

  • Stateless session Bean - xml and ejb-jar.xml file ???

    Dear Experts,
    Stateless-session bean
    For Creating an ear file
    we need ejb-jar.xml and weblogic-ejb-jar.xml files
    Is these files are already available
    or we have to type these files ??
    Advance Thanks
    Rengaraj.R

    My best advice: surrender to use an IDE.
    You wonder sometimes at how much productivity (read as 'time') could be wasted by doing something that could be done automatically. For a learning experience or a once only exercise is fine but as a routine thing, not worth it.
    Cheers

  • HT1660 When I install itunes, the xml and media folders are placed on desktop not in my music folder on Vista where I want them to be

    So I've installed and uninstalled itunes 3 times, using control panel to unintall everything, then ccleaner to make sure nothing is left over.  No ipod service and stuff left.
    Each time I install, the defult folder where the Media Folder, and album art folder plus all the xml and other files are put on my desk top. 
    Opening up Itunes, preferences, changed folder to user/music/itunes it doesn't work, keeps defaulting back to desktop.  Help please
    OS is Windows Vista

    Good to hear you got it fixed. A common reason for this issue is a problem with security permissions. This is another approach that may help in such cases.
    Repair Permissions
    Right-click on your main iTunes folder and click Properties,  then go to the Securitytab and click Advanced. Use the Change Permissions... button grant to your account (or the Users group) and SYSTEM full control of this folder, subfolders and files, then tick the option to Replace permissions entries... which will repair permissions throughout the library. When complete switch to the General tab, click in the Read-only check box to clear it, then click Apply.
    If you don't have the option to change the permissions then use the Owner tab and Edit... button to take ownership from an account with administrator privileges. Tick the option to Replace owner on subcontainers and objects.
    Repeat with the media folder if it isn't stored inside the main iTunes folder.
    tt2

  • XML and Oracle 8i Lite

    Hi Wizards
    I'm in an endeavour to do the following things -
    1.Generate XML output from Oracle 8i Lite database
    2.Modify the XML and update the database taking the modified XML.
    My java platform is JDK 1.2. I've used the XML SQL Utility for Java, and in doing so i've been successful with the 1st step. I've used the Oracle 8.1.6SDK JDBC Driver which is compatible with JDK 2.The code fragment is like the following -
    import java.io.*;
    import java.sql.*;
    import java.math.*;
    import oracle.xml.sql.query.*;
    import oracle.jdbc.*;
    import oracle.jdbc.driver.*;
    public class orasql1
    public static void main(String args[]) throws SQLException
    Connection conn = null;
    String tabName = "emp";
    try {
    Class.forName("oracle.lite.poljdbc.POLJDBCDriver");
    conn = DriverManager.getConnection("jdbc:Polite:POlite", "SYSTEM", "manager");
    catch (Exception e) {
    System.out.println("Oracle Connection error\t:");
    System.out.println(e);
    System.exit(0);
    OracleXMLQuery qry = new OracleXMLQuery(conn, "select * from " + tabName);
    qry.setRowsetTag("SCHEMADOC_1");
    qry.setRowTag("EMPLOYEE");
    qry.setStyleSheet("emp.xsl");
    String xmlString = qry.getXMLString(true);
    conn.close();
    try {
    File output = new File("emp.xml");
    FileWriter xmlFile = new FileWriter(output);
    xmlFile.write(xmlString,0,xmlString.length());
    xmlFile.close();
    catch (Exception e) {
    System.out.println("Output file error\t:");
    System.out.println(e);
    System.exit(0);
    I am putting some sample code for step 2 in the following section -
    import oracle.xml.sql.dml.*;
    import java.sql.*;
    import oracle.jdbc.driver.*;
    import oracle.jdbc.*;
    import java.net.*;
    public class orasql2
    public static void main(String args[]) throws SQLException
    Connection conn = null;
    String tabName = "emp";
    String fileName = "emp.xml";
    try {
    Class.forName("oracle.lite.poljdbc.POLJDBCDriver");
    conn = DriverManager.getConnection("jdbc:Polite:POlite", "SYSTEM", "manager");
    catch (Exception e) {
    System.out.println("An error has occurred.");
    System.out.println("Please check your CLASSPATH variable..");
    System.out.println(e);
    System.exit(0);
    OracleXMLSave save = new OracleXMLSave(conn, tabName);
    URL url = save.createURL(fileName);
    save.setRowTag("SCHEMADOC_1");
    int rowCount = save.insertXML(url);
    System.out.println("Successfully inserted "+rowCount+" rows into "+tabName);
    conn.close();
    Compiling the above code is fine, no errors! But while running the application I get the error -
    Exception in thread "main" oracle.xml.sql.OracleXMLSQLException: java.lang.Class
    CastException: oracle.lite.poljdbc.OracleStatement
    at oracle.xml.sql.dml.OracleXMLSave.insertXML(OracleXMLSave.java:345)
    at oracle.xml.sql.dml.OracleXMLSave.insertXML(OracleXMLSave.java:248)
    at orasql2.main(orasql2.java:27)
    My question is whether this thing can be done at all using Oracle 8i Lite? If so then how?
    Waiting for ur advices.
    Biplab
    (An Indian, but at present in Houston, Texas)

    It looks like be a classpath issue. Would you check with the class name.

  • XML and XSD file to an internal table

    I had read a lot of thread  but i don't understand how to deal with xml/xsd in R3.
    I need someone that have a definite example for this escenary please.
    With OPEN DATASET took from the server XML and XSD file, and put it in two internal tables type string.
    What functions or method have to use, and how to use them, to charge the XML file in an internal table?
    This is an example of XML and XDS:
    XML
    AND CONTINUE
    Best Regards,

    I just tried to interpret your question, it was not obvious what you wanted.
    I guess what you mean is that you have defined (statically) a deep structure, and you want to decode the XML into it. That is called a transformation (transaction STRANS, statement CALL TRANSFORMATION). You have the choice between 2 transformation languages: XSLT and ST. Of course, it depends what release you are running.
    I advise you to play first with the ID transformation, to convert an ABAP deep structured data object into XML, so that you see what XML is generated, this one is called asXML. If you create your own transformation, when you call it, it will first convert automatically the data object to asXML, and the transformation has to do the rest of the job.
    You can do the opposite, i.e. converting from XML to a data object, according to the same principle (intermediate asXML).
    Well, there are lots of things to say, I recommend you to read articles and documentation on XSLT and ST (search on SDN).
    About XSD, it won't help (and I did never see any possibility to use it) to decode the XML, as you must anyway define the target data object statically (and there's no tool to generate the ABAP code of the data object definition from the XSD).
    Note that you may also use iXML libraries to parse the XML.
    Please tell us more.
    BR
    Sandra

  • SAP BW data in ODS to XML and sending this XML file to 3rd Party

    Hi Gurus,
    We are having a scenario in which we have to convert our data in ODS to XML and need to provide this XML file to our clients so that they can use this XML file in their 3rd party system.
    Now the issue is that i have created ABAP program for converting into XML.
    If I execute this program, since i have given path as my Desktop, the converted XML file gets saved on my Desktop.
    But the problem is how i can provide this XML file to the client.
    Is there any way of converting this XML file to html and send them the URL ......
    plz suggest me.... what can be done......
    my ABAP code u can see in the following link
    Extract SAP BW Data into XML
    thanks and regards,
    P.Madhusudhan Raju

    Hi,
    Pls go through the link below it may help you
    http://www.sdn.sap.com/irj/scn/index;jsessionid=(J2EE3417100)ID1537206350DB01670597797729934632End?rid=/library/uuid/8c10aa90-0201-0010-98a0-f071394bc9ae&overridelayout=true
    Regards,
    Marasa.

Maybe you are looking for