Add xml file to classpath

Hi all,
Can someone tell me how I can add a xml file to my class path.
I have add some thirth party jar files to my application but I need also the license xml in my classpath.
Kind regards,
Richard

Hi Richard,
to access the mention xml file from an EJB module the procedure would be:
- package the XML file in a JAR, say myxml.jar
- add myxml.jar to an existing or newly created library
- let your app reference this library
Regards
Gregor

Similar Messages

  • Unable to add XML files to genericObjects Folders using Webdav - cFolders

    Hi All
    I am not able to add XML files to genericObjects Folders using Webdav in cFolders
    What could be the reason.. When I try to copy, it says "cant read from source file"
    Regards,
    Aby

    Yes.. I downloaded the ECN.XML file from se80, edited and then used "Uplload and replace"..
    Also I did the same thing to add some more vocabulary in the cfx text XML, so that it would reflect correctly to map with Additional attributes in the PDX profile.
    Regards,
    Aby

  • Can not find xml file in classpath

    Hi,
    Can someone tell me how I can please or find a xml file in de webdynpro classpath: I have to place a xml and jar files in the classpath. The jar files are found in the application, but I get the following error: com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Unable to read the License file, please verify that you have SyncExLicense.xml file and it exists in the classpath or under com/yash/license folder.
    How can I check if this file is available in the classpath.
    Richard

    hi,
    have you check that all jar files are present or not.
    because when u import par file in to nwds it wont include jar files in that manully you have to import them.
    jayesh talreja

  • Loading XML file from classpath...

    Hello all.
    Can anyone help me with loading an XML file from the classpath?
    The XML I need to load looks like this:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <QueueDispatcher>
      <QueueConfigEntry>
        <DataSource>
          <TableName><![CDATA[WPOrder]]></TableName>
        </DataSource>
        <DataSink>
          <JMSQueueName><![CDATA[OTL_WPORDER]]></JMSQueueName>
        </DataSink>
      </QueueConfigEntry>
    </QueueDispatcher>I'm trying to load the file with the following code:
    TransformerFactory transformerFactory = TransformerFactory.newInstance();
    InputStream  input = this.getClass().getResourceAsStream("/QueueDispatcherConfig.xml");
    StreamSource streamSource = new StreamSource(input);
    Transformer  transformer  = transformerFactory.newTransformer(streamSource);
    ....All I get at the moment is an exception:
    javax.xml.transform.TransformerException: stylesheet requires attribute: version
    Any ideas what I'm doing wrong?
    Thanks in advance

    What are you doing wrong? You're using a Transformer, which expects to be given an XSLT document. If you want to make a DOM from that then you should use a DocumentBuilder, or you could use a SAXParser if you just want to extract the data from the XML file as you read it.

  • How to add jar files to classpath?

    Never mind, I figured that out.
    Edited by: leoJones on Mar 25, 2008 8:29 PM

    If you want the jar file to be globally accessible, add it in the $J2EE_HOME/config/application.xml file like so:
    <library path="../test.jar" />
    Then drop the jar file in your $J2EE_HOME directory. This assumes you are manually configuring the OC4J server. I'm sure there is an equivalent way to do this from the Enterprise Manager web site.
    John H.

  • How to set classpath to take classes in conf \ jboss.service.xml file

    Hi,
    I just want to put some classes which are in a package say 'mypack' in the lib folder . In the jboss.service.xml file the classpath is set to codebase="lib" archive=" * " > but this won't work for classes which are not in any of the jar files. how to do this?.. pls help me.
    Thanks in advance
    Sudheer

    Could you package your classes into a jar file?
    Fil

  • Reading an xml file in the web services java file

    I want to read some data in the webservices file.so i am writing my own xml file through which i want to read data.but i am not able to read xml file from web services file.also , i am not able to put xml file in the .ear file,as there is no such tag in servicegen script through which i can add xml file in the .ear file.
    i know in case of servlets,i will specify context-param attributes in web.xml,and i can access those in my servlet.can i do anything like this for webservices,and i am not using any servlets for web services.
    kindly tell any solution.

    One possible option to parse an xml-file to a flex XML object:
    public function parseConXML(source:String):void
                    xmlLoader = new URLLoader();
                    xmlLoader.load(new URLRequest(source));
                      // Eventlistener: if URL loaded --> onLoadComplete function
                      xmlLoader.addEventListener(Event.COMPLETE, xmlLoadComplete);
                public function xmlLoadComplete(evt:Event):void{               
                    var xml:XML = new XML();
                     // ignore comments in XML-File
                    XML.ignoreComments = true;  
                       //ignore whitespaces in XML-File
                     XML.ignoreWhitespace = true;
                    // XML-Objekt erstellen
                    xml = new XML(evt.target.data);
                   //AFTERWARDS use your xml as your wish

  • Problem in adding many xml files at time of addon creation from AddonCreato

    Hi,
        When creating addon by SAP B1 addoninstaller .Net wizard,we have to add XML Files one by one which is very difficult to do because my addon have more than 60 XML files.
    Please give me any solution so that we do not have to add again and again all XML Files.
    Thanks
    Vivek Kr. Gaurav

    Pl post this question to SDK Forum

  • 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() ).

  • Pls Help me with steps to add data from xml file to SAP B1 through B1iSN.

    Pls Help me with steps to add data from xml file to SAP B1 through B1iSN. I  am getting stuck in xsl transformation. not able to understand where the mapping code needs to be added.
    Pls explain me the steps for adding data from xml to B1 quotation step by step.
    thanks and regards
    Priya

    Hi,
    Have you checked this: https://sap.na.pgiconnect.com/p45508295/?launcher=false&fcsContent=true&pbMode=normal ?
    Thanks,
    Gordon

  • How do i add a newline or carriage return to make my xml file look pretty?

    Hi guys
    I'm writing an xml file with jsp, the problem is, it writes it in one big chunk of text. e.g.
    <start>hello, my name is joe</start><middle>I like trees</middle><end>boo</end>
    Now what I want to do is present this xml file in a decent manner,
    e.g.
    <start>hello my name is joe</start>
    <middle>i like trees</middle>
    <end>boo</end>
    i've tried
    xmlFile = "<start>Hello my name is joe</start>"+\n\r;
    and
    xmlFile ="<start>Hello my name is joe</start>"+"\n\r";
    neither work, can anyone provide me with some insight into how I can add a carriage return / new line to make my xml file look pretty?
    Many thanks for any responses!

    u r right <BR> tag will not work...
    I wrote following code to generate xml file and it works fine...U can try the same...
    try
    FileOutputStream fos = new FileOutputStream("c:\\temp.xml");
    String xmlString = "<root>\n<start>Hello my name is joe</start>"+"\n";
    xmlString = xmlString +"<middle>blah blah</middle>\n</root>";
    fos.write(xmlString.getBytes());
    fos.close();
    fos = null;
    catch(Exception e)
    e.printStackTrace();
    }

  • How to generate xml-file for SAP Fiori (UI add-on) with Solution Manager 7.0.1?

    Hello Guru,
    could you please help with my issue with Fiori Installation.
    We want to install SAP Fiori Front-End (GW+UI) on the Sandbox system with SAP Netweaver 7.3.1. (SP14)
    Gateway component (SAP GW CORE 200 SP10) was installed without any problems.
    But I need to install UI-add-on (NW UI Extensions v1.0) and when I try to install it via SAINT, transaction said me that I need to generate xml-file for it (as in General notes for UI add-on mentioned).
    But I have Solution Manager 7.0.1 and in MOPZ for this version I do not have option  "install Add-on" as it written in Guide for ui add-on installation.
    Could you please help me with advice how to generate xml-file for UI add-on installation on SolMan v.7.0.1?
    If where is no way, but only to upgrade Solution Manager, maybe somebody could give me xml-file for your system (for NW 731) and I will change it to my needs, I will be very grateful!
    Thanks in advance for any help!!!
    Bets regards,
    Natalia.

    Hello Guru,
    could you please help with my issue with Fiori Installation.
    We want to install SAP Fiori Front-End (GW+UI) on the Sandbox system with SAP Netweaver 7.3.1. (SP14)
    Gateway component (SAP GW CORE 200 SP10) was installed without any problems.
    But I need to install UI-add-on (NW UI Extensions v1.0) and when I try to install it via SAINT, transaction said me that I need to generate xml-file for it (as in General notes for UI add-on mentioned).
    But I have Solution Manager 7.0.1 and in MOPZ for this version I do not have option  "install Add-on" as it written in Guide for ui add-on installation.
    Could you please help me with advice how to generate xml-file for UI add-on installation on SolMan v.7.0.1?
    If where is no way, but only to upgrade Solution Manager, maybe somebody could give me xml-file for your system (for NW 731) and I will change it to my needs, I will be very grateful!
    Thanks in advance for any help!!!
    Bets regards,
    Natalia.

  • How to create a text file or XML file  and add content through  code into it...

    Hi Everyone,
    How to create a text file and add content through the code to the text file eform javascript ......orelse can we create a text file in life cycle designer...
    Else say how to create a new XML file through the code and how some content like Example "Hello World".

    You can create a text file as a file attachment (data object) using the doc.createDataObject and doc.setDataObjectContents:
    http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.450.html
    http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.528.html
    You can then export the file with the doc.exportDataObject method:
    http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.463.html
    This won't work with Reader if it hasn't been given the file attachment usage right with LiveCycle Reader Extensions.

  • Add Doctype to the XML File

    Experts,
    My Scenario is JDBC to File
    For the resultant xml file i have to include a <DOCTYPE> after
    <?xml version="1.0" encoding="UTF-8" ?> while passing it to legacy system ?
    I had written an XSLT Code to acheive this, i checked in XML spy and it is working.
    but in moni iam getting an error in message mapping
    my XSLT Code is
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <!-- Add the Doctype declaration -->
    <xsl:output method="xml" indent="no" doctype-system="http://integratex.quality.techdata.de:8080/ix/dtd/ixOrder.dtd"/>
    <!-- Identity Transform - copy the source XML to the output without any changes -->
    <xsl:template match="node() | @*">
                <ns0:MT_ASNDATAOUT xmlns:ns0="http://aaaaa/sd/SD152.25">
                <xsl:copy>
                                                    <xsl:apply-templates select="node() | @*"/>
                </xsl:copy>
                </ns0:MT_ASNDATAOUT>
    </xsl:template>
    </xsl:stylesheet>
    and the error in moni is
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Request Message Mapping
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>XIServer</SAP:Category>
      <SAP:Code area="MAPPING">GENERIC</SAP:Code>
      <SAP:P1>Parsing error after multi mapping.</SAP:P1>
      <SAP:P2>Expected Message<i> instead of Messages</SAP:P2>
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>Parsing error after multi mapping.Expected Message<i> instead of Messages</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    Iam doing multi mapping between source and target, is m ulti mapping causing the issue?
    and also check my xslt code,it is working in xml spy as desired.
    Please help me on this
    Appreciate your help.
    Thanks
    Srinivas

    Hi,
    Yes you have to chnage the DTD structure to add DOCTYPE Value,one morething when you executing XSLT mapping Multi Mapping scenario it shouls also supports multi mapping feature.Fisrt execute XSLT Mapping program without multi mapping,let me know how its behaving.
    Regards,
    Raj

  • A few questions about using an XML file to add text into a TextArea component set as html

    I'm using AS2 in Flash CS3.
    I have a TextArea component in the stage that's loading its text from an XML and I've been able to use the ul and li tags to create lists. However, when I try to include a nested list it just inserts a line break between the nested list and the main list rather than indent it further. Is there a solution for this issue?
    Failing that, how would I be able to add non-breaking spaces into the XML so they will render inside the TextArea component? I've tried   and &#160; without success. I scoured the net for some help with this and found some information about modifying the font embedding xml file with a new entry for the non-breaking space and that didn't work either, so that leaves me somewhat stumped.

    flash doesn't handle nested lists (as you now know).  you can work-around that limitation using css and creating your own indent styles.  css have a marginLeft property you can use.

Maybe you are looking for