Modify bunch of datasources by modifying xml file directly?

I have ten datasources on my laptop domain that I need to change to point to a different environment. it would really be nice if I could just bring down the server, modify a couple elements in each of the "*-jdbc.xml" files in the config tree and restart the server. I tried changing one one of them this way, and I was able to test the connection from the admin console, so I think this works. The one quirk is that I entered the cleartext password in the "password-encrypted" element. I figured this would work like the "boot.properties" file and encrypt it after startup, and re-save the file, but it did not. I don't care about the cleartext password, as it's not a production database, I just want to make sure this should work.

In principal, if you change the config file(s) in the same way WLS would do it, it should work the same. However,
encrypted bits aren't going to work that way. There may be a way to allow the password to remain unencrypted
so check the docs. You can try just adding the password=XXXX to the list of dirver properties, and hope that
gets set after any encrypted one...

Similar Messages

  • How to RUN a XML file directly in JDeveloper

    Can any one please suggest me for running a XML file directly in Jdeveloper?
    I need the step how to do it

    actually I am calling xsl inside my xml....
    the XMl code
    =================
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <?xml-stylesheet type="text/xsl" href="SfATranslation.xsl"?>
    <SfAForm>
    <SfAFormHeader>
    <Name>ACM Maintain Code Table</Name>
    <Notes></Notes>
    <HeaderText>ACM Maintain Transaction Code Table</HeaderText>
    <ItemID></ItemID>
    <LogoImage>cpfb.gif</LogoImage>
    <SubmitTo>FormAction.asp</SubmitTo>
    <Title>Account Management</Title>
    <TranslationRule>SfATranslation</TranslationRule>
    </SfAFormHeader>
    <SfASection>
    <VisibilityRule></VisibilityRule>
    <SfASectionHeader>
    <Name>ACM - Maintain Transaction Code Table</Name>
    <Notes>ACM Maintain Transaction Code Table</Notes>
    <ItemID>TX Code</ItemID>
    </SfASectionHeader>
    <SfAComponent>
    <VisibilityRule></VisibilityRule>
    <SfAComponentHeader>
    <Name>Code Table Information</Name>
    <ItemID>A1</ItemID>
    </SfAComponentHeader>
    <SfAItem>
    <Name>Scheme Code</Name>
    <Type>SfA_Select</Type>
    <VisibilityRule></VisibilityRule>
    <Information>Select Scheme</Information>
    <ItemID></ItemID>
    <Required>*</Required>
    <Value></Value>
    <SfA_SelectOptions>
    <Name>Education</Name>
    <ItemID>EDN</ItemID>
    <Multiple>Y</Multiple>
    <Selected></Selected>
    </SfA_SelectOptions>
    <SfA_SelectOptions>
    <Name>Housing</Name>
    <ItemID>HU</ItemID>
    <Multiple>Y</Multiple>
    <Selected></Selected>
    </SfA_SelectOptions>
    <SfA_SelectOptions>
    <Name>Investment</Name>
    <ItemID>INV</ItemID>
    <Multiple>Y</Multiple>
    <Selected></Selected>
    </SfA_SelectOptions>
    </SfAItem>
    <SfAItem>
    <Name>Transaction Code</Name>
    <Type>SfA_Text</Type>
    <VisibilityRule></VisibilityRule>
    <Information>Enter Transaction Code</Information>
    <ItemID>TXCode</ItemID>
    <Required>*</Required>
    <Value></Value>
    </SfAItem>
    <SfAItem>
    <Name>Reason Code</Name>
    <Type>SfA_Text</Type>
    <VisibilityRule></VisibilityRule>
    <Information>Enter Reason</Information>
    <ItemID>Reason</ItemID>
    <Required>*</Required>
    <Value></Value>
    <ItemError>
    <Name>Error Test</Name>
    <ItemID>ER001</ItemID>
    <Message>Please enter valid data . . .</Message>
    <SupportLink>http://www.google.co.nz/</SupportLink>
    </ItemError>
    </SfAItem>
    <SfAItem>
    <Name>Description</Name>
    <Type>SfA_Textarea</Type>
    <VisibilityRule></VisibilityRule>
    <Cols>60</Cols>
    <Information>Enter Description</Information>
    <ItemID>Description</ItemID>
    <Required>*</Required>
    <Rows>5</Rows>
    <Value></Value>
    </SfAItem>
    <SfAItem>
    <Name>Interest Computation</Name>
    <Type>SfA_Checkbox</Type>
    <VisibilityRule></VisibilityRule>
    <Information></Information>
    <ItemID>Interest</ItemID>
    <Required></Required>
    <Value></Value>
    <SfA_CheckboxOptions>
    <Name>Interest</Name>
    <ItemID>IDInterest</ItemID>
    <Multiple>Y</Multiple>
    <Selected></Selected>
    </SfA_CheckboxOptions>
    </SfAItem>
    <SfAItem>
    <Name>Interest Information</Name>
    <Type>SfA_Information</Type>
    <VisibilityRule>IDInterest!='IDInterest'</VisibilityRule>
    <BeginText>For information</BeginText>
    <EndText>or look up admin manual</EndText>
    <ItemID></ItemID>
    <Link>http://www.google.co.nz/</Link>
    <LinkLabel>see sss</LinkLabel>
    </SfAItem>
    </SfAComponent>
    <SfAComponent>
    <VisibilityRule>IDInterest!='IDInterest'</VisibilityRule>
    <SfAComponentHeader>
    <Name>Interest Calculation Applicable Dates</Name>
    <ItemID>A2</ItemID>
    </SfAComponentHeader>
    <SfAItem>
    <Name>Effective Start Date</Name>
    <Type>SfA_Text</Type>
    <VisibilityRule></VisibilityRule>
    <Information>dd/mm/yyyy</Information>
    <ItemID></ItemID>
    <Required></Required>
    <Value></Value>
    </SfAItem>
    <SfAItem>
    <Name>Effective End Date</Name>
    <Type>SfA_Text</Type>
    <VisibilityRule></VisibilityRule>
    <Information>dd/mm/yyyy</Information>
    <ItemID></ItemID>
    <Required></Required>
    <Value></Value>
    </SfAItem>
    </SfAComponent>
    </SfASection>
    <SfAMenuHeader>
    <MenuItem>
    <Name>Account Management</Name>
    <Href>Form.xml</Href>
    <Image></Image>
    <ItemID></ItemID>
    <Target>_self</Target>
    </MenuItem>
    <MenuItem>
    <Name>Asset Enhancement</Name>
    <Href>Form.xml</Href>
    <Image></Image>
    <ItemID></ItemID>
    <Target>_self</Target>
    </MenuItem>
    <MenuItem>
    <Name>Common Biz Services</Name>
    <Href>Form.xml</Href>
    <Image></Image>
    <ItemID></ItemID>
    <Target>_self</Target>
    </MenuItem>
    <MenuItem>
    <Name>Common Sys Services</Name>
    <Href>Form.xml</Href>
    <Image></Image>
    <ItemID></ItemID>
    <Target>_self</Target>
    </MenuItem>
    <MenuItem>
    <Name>Operations</Name>
    <Href>Form.xml</Href>
    <Image></Image>
    <ItemID></ItemID>
    <Target>_self</Target>
    </MenuItem>
    <MenuItem>
    <Name>System Messages</Name>
    <Href>Form.xml</Href>
    <Image></Image>
    <ItemID></ItemID>
    <Target>_self</Target>
    </MenuItem>
    </SfAMenuHeader>
    <SfAButtonHeader>
    <ButtonItem>
    <Name>Save</Name>
    <ItemID></ItemID>
    </ButtonItem>
    <ButtonItem>
    <Name>Update</Name>
    <ItemID></ItemID>
    </ButtonItem>
    <ButtonItem>
    <Name>Deactivate</Name>
    <ItemID></ItemID>
    </ButtonItem>
    <ButtonItem>
    <Name>Help</Name>
    <ItemID></ItemID>
    </ButtonItem>
    <ButtonItem>
    <Name>Cancel</Name>
    <ItemID></ItemID>
    </ButtonItem>
    </SfAButtonHeader>
    </SfAForm>
    The Xsl code
    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="SfAForm">
    <html>
    <head>
    <title>HP Smart Forms Demo</title>
              <link rel="stylesheet" href="../shared/css/useragentmanExample.css" type="text/css" media="all" />
              <link rel="stylesheet" href="../shared/css/visibleIf.css" type="text/css" media="all" />
              <link rel="stylesheet" href="../shared/css/style.css" type="text/css" media="all" />
              <script type="text/javascript" src="../shared/js/EventHelpers.js"></script>
              <script type="text/javascript" src="../shared/js/visibleIf.js"></script>
    </head>
    <body>
    <xsl:apply-templates select="SfAFormHeader"/>
    </body>
    </html>
    </xsl:template>
    <xsl:template match="SfAFormHeader">
    <xsl:variable name="tmpformID"><xsl:value-of select="ItemID"/></xsl:variable>
    <xsl:variable name="tmpformName"><xsl:value-of select="Name"/></xsl:variable>
    <xsl:variable name="tmpformAction"><xsl:value-of select="SubmitTo"/></xsl:variable>
    <xsl:variable name="tmpformImage"><xsl:value-of select="LogoImage"/></xsl:variable>
    <div id="stylized" class="myform">
    <form id="{$tmpformID}" name="{$tmpformName}" method="post" action="{$tmpformAction}" class="visibleIf-disableIfInvisible">
    <table>
    <tr>
    <td valign="top"><IMG src="{$tmpformImage}" ALT=""/></td>
    <td valign="top" rowspan="1">
         <h1> <xsl:value-of select="Title"/> </h1>
         <p>
    <xsl:call-template name="PreserveLineBreaks">
    <xsl:with-param name="text" select="Notes"/>
    </xsl:call-template>
    </p>
         <!-- <xsl:apply-templates select="//SfASection"/> -->
    </td>
    </tr>
    <tr>
         <td valign="top">
         <xsl:apply-templates select="//SfAMenuHeader"/>
         </td>
         <td valign="top">
         <xsl:apply-templates select="//SfASection"/>
         </td>
    </tr>
    <tr>
    <td></td> <!--Blank cell below the menu-->
    <td>
    <p></p>
         <xsl:apply-templates select="//SfAButtonHeader"/>
    </td>
    </tr>
    </table>
    </form>
    </div>
    </xsl:template>
    <xsl:template match="SfAMenuHeader">
    <xsl:apply-templates select="MenuItem"/>
    </xsl:template>
    <xsl:template match="MenuItem">
    <xsl:variable name="tmpappMenuHref"><xsl:value-of select="Href"/></xsl:variable>
    <xsl:variable name="tmpappMenuTarget"><xsl:value-of select="Target"/></xsl:variable>
    <xsl:variable name="tmpappMenuImage"><xsl:value-of select="Image"/></xsl:variable>
    <a class="menulink" href="{$tmpappMenuHref}" target="{$tmpappMenuTarget}"> <xsl:value-of select="Name"/> </a>
    <xsl:choose>
    <xsl:when test="$tmpappMenuImage=''">
    </xsl:when>
    <xsl:otherwise>
    <IMG src="{$tmpappMenuImage}" ALT=""/>
    </xsl:otherwise>
    </xsl:choose>
    </xsl:template>
    <xsl:template match="SfAButtonHeader">
    <xsl:apply-templates select="ButtonItem"/>
    </xsl:template>
    <xsl:template match="ButtonItem">
    <button type="submit"><xsl:value-of select="Name"/></button>
    </xsl:template>
    <xsl:template match="SfASection">
    <xsl:variable name="tmpSectionVisibleRule"><xsl:value-of select="VisibilityRule"/></xsl:variable>
    <xsl:choose>
    <xsl:when test="$tmpSectionVisibleRule=''">
    <xsl:apply-templates select="SfASectionHeader"/>
    <xsl:apply-templates select="SfAComponent"/>
    </xsl:when>
    <xsl:otherwise>
    <span class="visibleIf" data-visibleif-rule="{$tmpSectionVisibleRule}"> <!--&&=AND ||==OR -->
    <xsl:apply-templates select="SfASectionHeader"/>
    <xsl:apply-templates select="SfAComponent"/>
    </span>
    </xsl:otherwise>
    </xsl:choose>
    </xsl:template>
    <xsl:template match="SfAComponent">
    <xsl:variable name="tmpComponentVisibleRule"><xsl:value-of select="VisibilityRule"/></xsl:variable>
    <xsl:choose>
    <xsl:when test="$tmpComponentVisibleRule=''">
    <xsl:apply-templates select="SfAComponentHeader"/>
    <xsl:apply-templates select="SfAItem"/>
    </xsl:when>
    <xsl:otherwise>
    <span class="visibleIf" data-visibleif-rule="{$tmpComponentVisibleRule}"> <!--&&=AND ||==OR -->
    <xsl:apply-templates select="SfAComponentHeader"/>
    <xsl:apply-templates select="SfAItem"/>
    </span>
    </xsl:otherwise>
    </xsl:choose>
    </xsl:template>
    <xsl:template match="SfASectionHeader">
    <h3 class="sectionID"> <xsl:value-of select="ItemID"/> </h3>
    <h2 class ="sectionTitle"> <xsl:value-of select="Name"/> </h2>
    <!-- <p> <xsl:value-of select="Notes"/></p> -->
    <p>
    <xsl:call-template name="PreserveLineBreaks">
    <xsl:with-param name="text" select="Notes"/>
    </xsl:call-template>
    </p>
    </xsl:template>
    <xsl:template match="SfAComponentHeader">
    <h3 class="questionCode"> <xsl:value-of select="ItemID"/> </h3>
    <h3 class ="questionTitle"> <xsl:value-of select="Name"/> </h3>
    </xsl:template>
    <xsl:template match="SfAItem">
    <xsl:variable name="tmpItemVisibleRule"><xsl:value-of select="VisibilityRule"/></xsl:variable>
    <xsl:choose>
    <xsl:when test="$tmpItemVisibleRule=''">
    <xsl:call-template name="processItem">
    </xsl:call-template>
    </xsl:when>
    <xsl:otherwise>
    <span class="visibleIf" data-visibleif-rule="{$tmpItemVisibleRule}"> <!--&&=AND ||==OR -->
    <xsl:call-template name="processItem">
    </xsl:call-template>
    </span>
    </xsl:otherwise>
    </xsl:choose>
    </xsl:template>
    <xsl:template name="processItem">
    <xsl:variable name="tmpID"><xsl:value-of select="ItemID"/></xsl:variable>
    <xsl:variable name="tmpItemValue"><xsl:value-of select="Value"/></xsl:variable>
    <xsl:variable name="tmpItemType"><xsl:value-of select="Type"/></xsl:variable>
    <xsl:apply-templates select="ItemError"/>
    <xsl:choose>
    <xsl:when test="$tmpItemType='SfA_Select'">
    <label>
    <xsl:value-of select="Name"/><b><font color="red"><xsl:value-of select="Required"/></font></b>
    <span class="small"> <xsl:value-of select="Information"/> </span>
    </label>
              <select class="dropdown" name="{$tmpID}" value="{$tmpItemValue}">
              <xsl:apply-templates select="SfA_SelectOptions"/>
              </select>
    </xsl:when>
    <xsl:when test="$tmpItemType='SfA_Checkbox'">
    <label>
    <xsl:value-of select="Name"/><b><font color="red"><xsl:value-of select="Required"/></font></b>
    <span class="small"> <xsl:value-of select="Information"/> </span>
    </label>
    <div>
    <xsl:apply-templates select="SfA_CheckboxOptions"/>
    </div>
    </xsl:when>
    <xsl:when test="$tmpItemType='SfA_Radio'">
    <label>
    <xsl:value-of select="Name"/><b><font color="red"><xsl:value-of select="Required"/></font></b>
    <span class="small"> <xsl:value-of select="Information"/> </span>
    </label>
    <div>
    <xsl:apply-templates select="SfA_RadioOptions"/>
    </div>
    </xsl:when>
    <xsl:when test="$tmpItemType='SfA_Information'">
              <xsl:variable name="tmpLink"><xsl:value-of select="Link"/></xsl:variable>
              <span class="para">
              <xsl:value-of select="BeginText"/>
              <xsl:if test="$tmpLink!=''">
                   <xsl:text> </xsl:text>
         <xsl:value-of select="LinkLabel"/>
         </xsl:if>
              <xsl:text> </xsl:text>
              <xsl:value-of select="EndText"/>
              </span>
    </xsl:when>
    <xsl:when test="$tmpItemType='SfA_Textarea'">
         <xsl:variable name="tmpRows"><xsl:value-of select="Rows"/></xsl:variable>
    <xsl:variable name="tmpCols"><xsl:value-of select="Cols"/></xsl:variable>
    <label>
    <xsl:value-of select="Name"/><b><font color="red"><xsl:value-of select="Required"/></font></b>
    <span class="small"> <xsl:value-of select="Information"/> </span>
    </label>
    <textarea class="text" rows="{$tmpRows}" cols="{$tmpCols}" name="{$tmpID}"><xsl:value-of select="Value"/></textarea>
    </xsl:when>
    <xsl:otherwise>
    <label>
    <xsl:value-of select="Name"/><b><font color="red"><xsl:value-of select="Required"/></font></b>
    <span class="small"> <xsl:value-of select="Information"/> </span>
    </label>
              <input class="text" type="text" name="{$tmpID}" id="{$tmpID}" value="{$tmpItemValue}"/>
    </xsl:otherwise>
    </xsl:choose>
    </xsl:template>
    <xsl:template match="ItemError">
    <xsl:variable name="tmpSupportLink"><xsl:value-of select="SupportLink"/></xsl:variable>
    <!--Add error message if it exists. Add below the data entry -->
    <!-- <label><xsl:text>Error: </xsl:text><xsl:value-of select="ItemID"/></label> -->
    <label></label>
    <xsl:choose>
    <xsl:when test="$tmpSupportLink=''">
    <span class="error"><xsl:value-of select="Message"/></span>
    </xsl:when>
    <xsl:otherwise>
    <a class="error" href="{$tmpSupportLink}" target="_blank"><xsl:value-of select="Message"/></a>
    </xsl:otherwise>
    </xsl:choose>
    </xsl:template>
    <xsl:template match="SfA_CheckboxOptions">
    <xsl:variable name="tmpItemOptionID"><xsl:value-of select="ItemID"/></xsl:variable>
    <xsl:variable name="tmpItemOptionValue"><xsl:value-of select="Value"/></xsl:variable>
    <xsl:variable name="tmpItemOptionSelected"><xsl:value-of select="Selected"/></xsl:variable>
    <xsl:variable name="tmpItemOptionMultiple"><xsl:value-of select="Multiple"/></xsl:variable>
    <input type="checkbox" name="{$tmpItemOptionID}" value="{$tmpItemOptionID}">
    <xsl:if test="$tmpItemOptionSelected='Y'">
    <xsl:attribute name="checked">checked</xsl:attribute>
    </xsl:if>
    </input>
    <xsl:choose>
    <xsl:when test="$tmpItemOptionMultiple='Y'">
    <span class="checklabelMultiple"><xsl:value-of select="Name"/></span>
    </xsl:when>
    <xsl:otherwise>
    <span class="checklabelSingle"><xsl:value-of select="Name"/></span>
    </xsl:otherwise>
    </xsl:choose>
    </xsl:template>
    <xsl:template match="SfA_RadioOptions">
    <xsl:variable name="tmpItemOptionID"><xsl:value-of select="ItemID"/></xsl:variable>
    <xsl:variable name="tmpItemOptionValue"><xsl:value-of select="Value"/></xsl:variable>
    <xsl:variable name="tmpItemOptionSelected"><xsl:value-of select="Selected"/></xsl:variable>
    <xsl:variable name="tmpItemOptionMultiple"><xsl:value-of select="Multiple"/></xsl:variable>
    <input type="radio" name="{$tmpItemOptionID}" value="{$tmpItemOptionValue}">
    <xsl:if test="$tmpItemOptionSelected='Y'">
    <xsl:attribute name="checked">checked</xsl:attribute>
    </xsl:if>
    </input>
    <xsl:choose>
    <xsl:when test="$tmpItemOptionMultiple='Y'">
    <span class="checklabelMultiple"><xsl:value-of select="Name"/></span>
    </xsl:when>
    <xsl:otherwise>
    <span class="checklabelSingle"><xsl:value-of select="Name"/></span>
    </xsl:otherwise>
    </xsl:choose>
    </xsl:template>
    <xsl:template match="SfA_SelectOptions">
    <xsl:variable name="tmpItemOptionValue"><xsl:value-of select="ItemID"/></xsl:variable>
    <xsl:variable name="tmpItemOptionSelected"><xsl:value-of select="Selected"/></xsl:variable>
    <xsl:choose>
    <xsl:when test="$tmpItemOptionSelected=''">
              <option value="{$tmpItemOptionValue}"><xsl:value-of select="Name"/></option>
    </xsl:when>
    <xsl:otherwise>
    <option value="{$tmpItemOptionValue}" selected="{$tmpItemOptionSelected}"><xsl:value-of select="Name"/></option>
    </xsl:otherwise>
    </xsl:choose>
    </xsl:template>
    <xsl:template name="PreserveLineBreaks">
    <xsl:param name="text"/>
    <xsl:choose>
    <xsl:when test="contains($text,'&#xA;')">
    <xsl:value-of select="substring-before($text,'&#xA;')"/>
    <xsl:call-template name="PreserveLineBreaks">
    <xsl:with-param name="text">
    <xsl:value-of select="substring-after($text,'&#xA;')"/>
    </xsl:with-param>
    </xsl:call-template>
    </xsl:when>
    <xsl:otherwise>
    <xsl:value-of select="$text"/>
    </xsl:otherwise>
    </xsl:choose>
    </xsl:template>
    </xsl:stylesheet>

  • Modifying XML files with JDOM

    Hi:
    I've been trying to get up to speed with JDOM, and while it seems pretty intuitive, I've been having a problem w/ modifying XML documents.
    Namely, once I get a Document object from a (skeleton) XML file, do changes made to the Document object through, say, addContent() propagate to the original file? My gut feeling is no, although this was certainly what I had expected initially.
    Here's a code fragment of what I had tried to do to populate a barebones XML file:
                   Document doc = builder.build(output);
              // add 100 elements, all the same
              for (int count = 0; count < 100; count++)
                   Element curr = new Element("book");
                   // create child nodes for book
                   Element title = new Element("title");
                   title.addContent("Book " + (count + 1));
                   Element author = new Element("author");
                   author.addContent("Author " + (count + 1));
                   Element price = new Element("price");
                   price.addContent("Price " + (count + 1));
                   curr.addContent(title);
                   curr.addContent(author);
                   curr.addContent(price);
                   doc.getRootElement().addContent( curr );
              }

    Mikael,
    This sounds like one of the many quirks (perhaps bugs) related to how FrameMaker handles non-FM files in books. The current book model doesn't play well with XML files as chapters and this seems like yet another problem. Apparently, if an xref does not target another .fm file in the book, Frame assumes that the target file is not in the book and therefore will not be in the book PDF.
    There have been discussions here about this in the past. The solution that I use is to run an API client before publishing that converts all XML files to .fm files, and redirect all xrefs appropriately. Then, book features work as expected and PDFs come out as normal. This is not feasible, however, without the automation from the API client.
    There may be some who would say that the best approach is to use XML and books the way that the designers did account for... that is, the whole book becomes an XML document with entity references to the separate chapters. In my work, though, this model was not appropriate... rather, I needed a binary FM book to act like a book, except with XML files as chapters. So, I think I understand your situation.
    Is API programming or FrameScript an option for you? I think it may be the only way to get what you are looking for.
    Russ

  • Unmarshal a modified xml file

    Hi,
    In my java project I need to unmarshal an xml file in order to get a list of objects.
    The unmarshalling works very fine but the problem is encontourned when the content of the file is modified. In fact in this project we can add new contents to this file by clicking on "addButon" but when i want to unmarshal another time the same file (after modification) i get only the old list of objects without the last elements (I have just added to this file).
    I already verified the physical xml file on the disk and I found all the last content I just added. Also I noticed that The only way to get the last list of objects is to close the appli and to reopen it again, which is unsuitable.
    Here is a piece of the code:
    //classe1.java
    Referentiel ref = null;
    File iniFile = new File(proprietesPerle.getRepReferentiel() + "referential.xml");
    FileInputStream fs = null;
    try
    fs = new FileInputStream(iniFile);     
    catch(FileNotFoundException fex)
    try
    ref = Referentiel.unmarshal(fs);     
    session.setAttribute("ref",(Object) ref);
    TreeMap map = ReferentielUtil.getApplication( ref );
    session.setAttribute("mapAppli", map);
    catch (UnmarshalException ex)
    logger.error(ex.getMessage());
    finally {
    try {
    fs.close();
    } catch (IOException e) {
    logger.error(e.getMessage());     
    //classe2.java
    TreeMap map = new TreeMap();
    List listPL = app.getPl(); //this list is unmarshalled from the xml file
    ListIterator itpl = listPL.listIterator();
    while (itpl.hasNext())
    Pl pl = (Pl)itpl.next();
    map.put(pl.getCode(), pl);
    return map;
    Please, do you have any idea to resolve this problem?
    Thank you in advance.

    The web.xml file is a standard file that is found in the WEB-INF directory. If you have not created one, below should be enough to get it working.
    Copy the following into Notepad and save as web.xml.
    Copy the web.xml file to your WEB-INF folder.
    Let'er rip.
    <!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <!-- General description of your web application -->
    <display-name>WebName</display-name>
    <description>
    </description>
    </web-app>

  • How to store xml-file direct on file-directory on server ?

    Hello,
    I have created a xml-data by using xmlelements, xmlforest .... and so on in a sql-statement and want to store it as file in a ( windows) server-directory.
    I can find some samples to store it in XML-DB by using dbms_xmlGEN and dbms_XDB,
    but how to store it direct ?
    thank you
    Norbert

    Try dbms_xmldom.writeToFile()..
    Or create a resource from your SQL Statement using dbms_xdb.createResource() and then access the resource via FTP or HTTP

  • How to create and modify an XML file from an Oracle Form

    I would like to build an Oracle Form to maintain a small XML file in the file system (i.e. Not in Oracle database but in the operating system).
    I would like the Form to display existing values from the XML file and the user can update and save content back to the XML file.
    Can any one tell me how this can be done? Thanks.

    Does Forms 9i provide any XML Parser Functions?
    Can I insert the XML file into a table column by inserting XML using the XSU Front End rather than using TEXT_IO to maintain the XML file directly?
    Can I use XSU PL/SQL API in Forms to retrieve and modify XML values?
    Any help is appreciated.

  • Using Java, How can I Update, Add, Delete nodes in XML Files.

    Hi,
    I want to store the student record (like Name, Age, school name, total mark etc.,) as nodes in the XMLfile. Also I should able to Update, Add, Delete any nodes (student record) in the XML file. How can I achieve this...using Java
    I am able to read the content of the xml file using xml-parser. But my problem is
    updating the xml file.
    pls suggest some solutions or links with " example source code"
    Thanks :-)

    There are 2 kinds of XML parsers : SAX and DOM. DOM seems to suit your need. You can use JAXP APIs to add, delete or change nodes or attributes.
    http://java.sun.com/webservices/jaxp/dist/1.1/docs/tutorial/TOC.html provides contents that would satisfy most of the needs.
    To save a DOM modified XML file use java IO APIs to write to the same file from which it was read using a Document object ( doc.getNodeValue() ).

  • Read XML file problem

    Hi all,
    I am trying to read an xml file and display the output. i get a blank display. Can anybody please help me out.
    Thanks in advance
    I cant attach the xml file. Since its not a valid extension. Please find the xml code below.
    <Company>
    <Name>Samsung</Name>
    <Location>
    <City>Busan</City>
    <Country>South Korea</Country>
    </Location>
    </Company>
    Regards,
    KM
    Solved!
    Go to Solution.
    Attachments:
    Read Data from XML File.vi ‏9 KB

    If you can change saved .xml file, you can modify it to be compatible with Labview XML shema and use Unflatten from XML like in your VI. If you cannot, you should use XML Parser library. In attachement you can find 2 exmaples for these situations.
    Attachments:
    Modified XML file.vi ‏12 KB
    XML Parsing 1.vi ‏20 KB

  • Writing Xml file from Flash

    hi all
    Is there a way to write and modify xml file from flash
    without using asp or php.
    if so how can be it done.
    thanks bye.

    no good champ.
    you need a serverside script.
    Dan Mode
    *THE online Radio*
    http://www.tornadostream.com
    *Must Read*
    http://www.smithmediafusion.com/blog
    *Flash Helps*
    http://www.smithmediafusion.com/blog/?cat=11
    "Darr_darshan" <[email protected]> wrote in
    message
    news:e6mgpu$bun$[email protected]..
    > hi all
    >
    > Is there a way to write and modify xml file from flash
    without using asp
    > or php.
    > if so how can be it done.
    >
    > thanks bye.
    >
    >

  • Generate an xml file from Database query results

    Hi, can anyone help me out with this problem I'm having. What are the steps in creating an xml file directly from the results of a database query. I currently have a very simply process that queries a database via a partner link. The query returns the data but it's from this point that I am stuck. I need to create an xml file with the data along with the xml tags. I've looked at dozens of tutorials with no luck.
    I would greatly appreciate help with this.
    bpel rookie

    Should be quite simple.
    Create another partnerlink, configure it to use the file adapter, and write to an XML file. In this case you need to create an XML Schema (.xsd) of the file you want to create.
    Before you write to the file, either add assign steps to copy individual attributes or use a transform activity to convert from the database format to the file (xml) format.

  • XML File Loading

    Hi All,
    We are facing issue in loading an XML file in database. It is an XML file from S-MART (PGS).
    If we try to load the xml file directly using an OWB mapping (as way we are doing for MARS), the mapping takes forever.
    We have tried several strategies but got only partial success till now.
    Structure of XML is like this
    emml
    list
    hierarchyNode (list type Service priority , coverage tier list etc)
    list
    hierarchyNode (corporate Asia pacific etc)
    list
    hierarchyNode (Gold ,Silver Platinum etc)
    list
    hierarchyNode (list of CIS_CODE)
    As parsing directly to cis level was not working, we stored the intermediate results in a temp table. We extracted the XML object at metal level (gold , silver) and stored it in a temp table 's XMLTYPE field . Using a second mapping we extracted the data from temp table and loaded it to final table.
    Using this approach we were able to load data for all the metals except for one. Performance was also good. It took total 3-4 min to load. But the mapping failed for “ Home Products” category with the error:
    ORA-31186 - Document contains too many nodes.
    Cause: Unable to load the document because it has exceeded the maximum allocated number of DOM nodes.
    Action: Reduces the size of the document.
    This is because of a lot of CIS codes listed under the Home Products category. I do not see any straight forward way of to reduce or split the xmlobject further before the final processing.
    Any one having ideas how to load such an XML

    You can check
    the thread error while loading XML files into scott user
    I hope it will help.

  • Create SOAPMessage object from existing XML file

    Say I have already had a SOAP Message in a .xml file format.
    How can I create a SOAPMessage object in my program by loading the .xml file directly into it as opposed to using those getEnvelope(), getSOAPPart(). to build it piecemeal?

    Okay, I found out already
    import javax.xml.soap.*;
    import java.io.*;
    import javax.xml.transform.stream.*;
    import javax.xml.messaging.*;
    public class UDDIquery{
    public static void main(String args[]){
    try {
    MessageFactory factory = MessageFactory.newInstance();
    SOAPMessage request = factory.createMessage();
    SOAPPart soapPart = request.getSOAPPart();
    StreamSource src = new StreamSource(new FileInputStream(args[0]));
    soapPart.setContent(src);
    SOAPConnectionFactory conFactory = SOAPConnectionFactory.newInstance();
    SOAPConnection connection = conFactory.createConnection();
    URLEndpoint endpoint = new URLEndpoint(args[1]);
    request.writeTo(System.out);
    SOAPMessage response = connection.call(request,endpoint);
    } catch (SOAPException e) {
    System.err.println(e.getMessage());
    } catch (IOException e){
    System.err.println(e.getMessage());
    }

  • External XML files in Flash iPhone apps

    Hi everyone. I know that apple has loosened up on what is and isn't allowed on the app store these days, such as flash. I was thinking of writing an app that would call upon a web based xml file to call up pictures to display in the iPhone.
    I know Apple doesn't allow apps that call upon external scripts but it's not an executable script, its a list of images and where they are stored. Does anybody have any input on whether Apple may have a problem with this?
    Cheers

    don't know.
    I'm not sure of the differences between actionscript in flash and javascript in the browser but you could call for an XML file to be sent as json data from the script if accessing external XML files directly is not allowed.
    Problem is that XML can contain anything you want it too... it could contain a script itself.

  • XML files are being read as PBEM game file format!!

    Hello,
    I am trying to edit some .xml files in Script Editor but everytime I try to open them I am told :
    'Script Editor cannot open files in the "PBEM game file" format'
    (Double clicking the .xml file opens up the Big Bang game)
    Does anyone know how to get round this? also is Script Editor the best application to use? I want to use an editor that has colours.
    Many thanks, rob

    Script Editor has one purpose - editing and compiling AppleScript.
    I can't account for the wording of the error message, but for sure I wouldn't expect it to handle XML files directly.
    You could use AppleScript to manipulate the XML data, but that's probably not ideal either.
    What you need is a text editor. BBEdit would be my first choice, or its cheaper (read: free) sibling TextWrangler.
    Both can handle any type of text file, including syntax highlighting for many structured files including programming source code.

  • How to import external XML file

    Hello guys:
    From this demo
    http://www.adobe.com/devnet/flex/quickstart/accessing_xml_data/#section2
    we know how to use a intrernal XML document. I know there are
    several way to load a external XML like:
    <mx:HTTPService
    id="loadTest"
    useProxy="false"
    showBusyCursor="true"
    resultFormat="xml"
    url="data/login.xml"
    />
    What I want to know is whether I could load a XML file
    directly, not use HTTPService and send. For a instance:
    [Bindable]
    private var login:XML = ("data/login.xml");
    or something like that. And then I could use login.user or
    login. pass .
    Now seems it is easy to control a intrernal XML data. I want
    to import a external XML file and use it like a intrernal XML.
    Thanks a lot

    You only have 2 choices: include the XML as part of the SWF
    using <mx:XML source="filename.xml" /> or load it dynamically
    using a data service such as HTTPService.

Maybe you are looking for

  • Issue with DataApp Sample in JavaFX.

    Okay so I downloaded the Samples pack here http://jdk8.java.net/download.html or here http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html at the bottom. Inside is one called DataApp which requires setting up an SQL DB,

  • Can you configure a static port to use with certsrv.msc?

    I am trying to use certsrv.msc to connect from my workstation to the CA for administration purposes.  Workstation is Win7, CA is 2008 R2 Enterprise running Enterprise Subordinate on a dedicated box. I configured a static DCOM port for certsvc by foll

  • Oracle SQL not working in Apex

    I have been given the following SQL statement by a supposed SQL DBA SELECT TOP 250 TRANS_CODE, TRANS_CASH_IN, Month([TRANS_DATE]) AS Transmonth, TRANS_COMMENT, TRANS_MACHINE_NO FROM TRANSACT WHERE (((Month([TRANS_DATE]))=Month(Now())) AND ((TRANS_COM

  • Accessing secured content area view from JPDK

    Is it possible to access the secured content are views from JPDK? For example if I am logged on as user USER1 in Portal, is it then possible to access WWSBR_ALL_ITEMS as USER1?

  • InDesign CS6 Cannot Package Fonts on iMac

    ID CS6 "Cannot copy necessary font(s)" when packaging. On iMac with OS10.6.8. I looked at two previous threads that solved this by unlocking the offending fonts, or putting the fonts into the Applications > IndesignCS6 > Fonts folder. Neither of thes