Java file with xml output..

Hi all,
I am executing a java code in the command prompt.
It takes input of an xml file and gives the result in the command prompt itself which contains the complete format of soap file... using data.append(line);
data.append("/r/n");
Now it shows the whole output in the command line and i want it to create an xml or html file and transfer the output into that file....How will i do it... Im using HTTPClient..

Is the output already in the XML or HTML format you desire?
If so you can just pipe it down to a file
In DOS Command Prompt (i think that's what you are using) what you do is use the > sign like this
dir > test.txt
Instead of getting the dir listing in the screen, it's piped down to the file
So what you do is
java yourJavaFile > yourOutput.xml (this is the simplified version, put your flags and everything there, after your command add > and the file name)
If you are using Unix/Linux systems, i think that the pipe command is || instead of >, but i'm not sure
If the result is not in the format you need, then you'll have to open a FileWriter in your code, and just write the things down in a file, in the manner you want.

Similar Messages

  • Oracle Reports with XML output showing data as asterik character

    Hello,
    I'm trying to create an Oracle report with xml output. Here is the issue I'm having some of the columns in my report are of datatype number. When I run the report and generate xml file the values for those columns(datatype number) are showing as (*) character, other columns are showing fine. But when I run the report as text output then data is fine. I don't understand why this is happening.
    The property of column is Column Type - Database Scalar, Datatype - Number , width 0,-127.
    Does the width has to do anything with this?
    I'm using Report Builder 6.0.8.11.3, DB version 10g.
    Can anyone please help me with the issue I'm having.
    Thanks

    If the links in your example report1 and report2
    follow my format stated earlier
    http://machine:port/reports/rwservlet/report=reportnam
    e.rdf&destype=cache& paramform=htmlcss&server=<YourReportSe
    rverName>&userid=scott/tiger@hrdb&desformat=pdf
    This is what I believe
    >
    so http://machine:port/ is the port where
    JBoss is running and
    This should be the port that the report server is listening on
    >
    server=<YourReportServerName> is the name of
    my oracle report server
    so I call the above link in my current application
    and the report would show up
    Yes
    >
    that means (correct me if I am wrong) that my reports
    would have to be deployed in OracleAS
    Yes
    >
    I have to try all this yet as till this point I was
    trying to run Oracle reports deployed in JBoss...
    This may be possible, I am not sure.
    >
    Oracle J2EE Thin Client?
    I am not sure what this is used for in your setup.

  • How to generate .java file from xml?

    Does anyone have an idea of how i can generate .java file from xml file? Tools like jakrata digester, JOX are there but both of them are useful in populating java beans from xml. My requirement is to generate .java file from .xml with getters and setters methods for xml elements/attributes. I also tried JAXB. But JAXB generates bunch of files and most of them are interfaces, which is not going to work for me.
    For e.g. i have following xml file and i want to generate Address.java file with getters/setters. Any ideas?
    <?xml version='1.0' encoding='UTF-8' ?>
    <Address>
    <FirstName type="String"/>
    <PoBox type="int"/>
    </Address>
    Thanks,
    Vicky

    Crosspost.
    http://forum.java.sun.com/thread.jsp?thread=475564&forum=4&message=2205846

  • Reports with XML output complete in error

    Hi,
    We have migrated Oracle eBiz from HP UX Itanium platform to Linux x86. Since then reports with XML output are completing with following error.
    stat_low = 6
    stat_high = 0
    emsg:was terminated by signal 6
    Enter
    Password:
    *** glibc detected *** ora_rw20_run: free(): invalid next size
    (fast): 0x090ee648 ***
    Please advise solution if anybody knows.
    Regards.

    Pl post EBS version. Does this occur for all concurrent programs ? Or only seeded ones ? Or only custom ones ? Do you utilize the IX library ?
    MOS Doc 1295724.1
    Pl continue the discussion in your duplicate post - Reports with XML output complete with Signal 6 error

  • BUG: error rebuilding SQLJ files along other java files with generic

    I have done a rebuild on a package containing some SQLJ files, and (consistently) got the following error:
    C:\TeleMessage\trunk\src\telemessage\db\impl\dbAdmin.sqlj
        Error(44,18): Java Parsing. Encountered: <
        Expected: <IDENTIFIER> ...; "[" ...; The error at the cursor in the given file is not possible, since there was no '<' there, and besides - if I non-aggresively changed the file, e.g. narrowed imports, changed whitespace or added comments - the error remained in the same location.
    I went and done a search using regex in the package, for a line starting with 17 chars followed by a '<'.
    I found it in one of the normal JAVA files (not-SQLJ), at line 44 (surprise!) - in a Java 5 generics declaration, e.g. Map<String,Integer>. the 18th character was indeed the '<'.
    I'm guessing that the SQLJ translator (accidentally?) parses non-SQLJ files.
    If this cannot be fixed, it is really bad - it is one thing that JDeveloper cannot support Java 5 language features because of its dependancy in the SQLJ translator (which is not known to be upgraded until version 11g if at all), but the inability to compile SQLJ files in a project containing other non-SQLJ java files with Java 5 features is hard.
    I could only workaround this by rebuilding SQLJ files one at a time!
    I also have another type of error, when rebuilding the same project in a higher-level pacakge (root or "Application Sources"):
    C:\TeleMessage\trunk\src\dbtools\CallbackNumberFiller.sqlj
        Error(24,8): Missing semicolon.
        Error(24,8): Unbalanced curly braces.Again, the specified file could not be the one to blame - the location of the error is in the middle of the public modified keyword in a method declaration; nothing is neither missing nor unbalanced.
    This appears to be different, as it pops in the log near the end of the build process, when the JSPs are being built, specfically during the time the message log fills with "writing <...>" lines (after "translating <...>" and "compiling <...>".
    I can consistently reproduce both cases - please advise how I can help you find out what causes this.
    Regards,
    Yaniv Kunda

    First of all, this bug not JDeveloper's problem, but the SQLJ team's.
    You can read more posts about this:
    Re: BUG: Cannot translate SQLJ files with Java5 generics code
    Re: How to use SQLJ with Java 1.4 and 1.5?
    Re: SQLJ discontinued??
    And if we're at it, this is strange - I can't seem to find the oracle doc you quoted...
    SQLJ 11g? The latest release is a part of JPublisher 10.2 available from
    http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html
    I also didn't find anything on google on 11g, nor about the part number you specified.
    Didn't find any Java 1.5 supporting SQLJ translators from other vendors as well.
    Do you have any link to this statement?
    But if we examine this bug again, the problem involves JDeveloper passing Java 5 featured JAVA files to the SQLJ translator.
    Isn't there a way to instruct the translator to use CLASS files compiled by a normal Java 5 compiler, instead of trying to compile the files itself?
    Regards,
    Yaniv Kunda

  • Bridge opening office files with xml converter

    Adobe Bridge CS3 is opening all my excel files with xml converter and promting me to save as.  How do I switch it to default to Microsoft Excel when opening these files?

    These options are handled in the Bridge prefs under File Associations, but if I remember correctly this is somewhat limited in CS3 since it only handles Adobe files that install their associations. Any other file type is handled by whatever the opoerating system offers. Well, you can always look and give it a try...
    Mylenium

  • Java interface with xml communication

    Hello everybody,
    For a project i need to make a java interface with xml communication.
    For example ; from 1 laptop I press on a java button and then i need to get a text message on the other laptop.
    The java interface is already created now the xml code for communication.
    I hope someone can help me how to start with the xml code.
    Are there any templates that i can use?

    I need to use XML for this, cause it is in the
    assignment.As far as communication is concerned, it doesn't matter that you are sending XML. You can send any kind of data. So first find out how to send data, then send data which is XML.
    I only want to know if its possible to send data/text
    from 1 laptop (windowsxp prof) to the other laptop
    (also windows xp prof).Provided the other laptop is running a server that can receive that data.
    Maybe its easier if I send data to a specific IP
    address?Provided there is a server running at that IP address that can receive that data. You can use an IP address to connect to a server but that has nothing to do with sending the data.
    Its important that the communication between 2 system
    is in XML language.XML is not a programming language. XML is a format for storing data. You can certainly send XML-formatted data between two computers.
    So i hope u have a solution for my problem.The solution would be for you to learn how communication between two computers works in the real world. If you have an assignment that says you have to make communication work, surely there was something taught to you before about how to do it?

  • Associating .java files with JDeveloper in Windows

    Is there some mechanism via by which I can load a .java file in a currently instance of JDeveloper (905p) on Windows (2K) from the command line?
    I want to be able to associate .java files with JDeveloper with appropriate actions defined, so that when I double-click on a .java file in Windows Explorer, it gets opened up in the currently running JDeveloper instance ... rather than opening a new instance of JDeveloper?
    Thanks

    Hi,
    There's no easy way to do this at the moment. However, in the 10g production release, functionality has been added to associate .java files (and other artefacts e.g. .jpr files) with JDeveloper.
    Thanks,
    Brian
    JDev Team

  • Incoming Image file with XML payload processing

    Hi,
    We have PI 7.1 and the interface is from file to standard RFC scenario with ABAP proxy in ECC.
    2 incoming files need to be processed by the interface - xml file with transaction details and the corresponding Image file.
    These files have to be mapped to the standard RFC and then pushed into ECC.
    Can the Java mapping be used in message mapping to pass the image file in the RFC as I do not want to use the Java module?
    If yes, can someone please help with the code and the mapping aspects?
    Regards,

    Abhishek,
    Though I never worked with server proxy with attachments,
    In my opinio, when it is possible to send attachments from outbound ABAP proxy,  then logically it should be possible to read attachments in the inbound proxies.
    I just saw this link in forum,
    [Re: Inbound proxy with attachments.|Re: Inbound proxy with attachments.]
    Regards,
    Praveen Gujjeti.
    Edited by: Praveen Gujjeti on Apr 8, 2010 5:25 PM

  • Getiing error while genetrating jar file with xml beans with scomp command

    Hi ,
    I am using XmlBeans version 2.4.0-r670094 with jdk1.5 ,
    i am trying to generate java classes with given xsd's command is ----scomp -out emplo.jar any.xsd
    but getting below error
    Time to build schema type system: 1.953 seconds
    Time to generate code: 0.125 seconds
    java.io.IOException: Cannot run program "C:\\javac": CreateProcess error=2, The system cannot find the file specified
    java.io.IOException: CreateProcess error=2, The system cannot find the file specified
    java.io.IOException: Cannot run program "C:\\javac": CreateProcess error=2, The system cannot find the file specified
    at java.lang.ProcessBuilder.start(Unknown Source)
    at java.lang.Runtime.exec(Unknown Source)
    at java.lang.Runtime.exec(Unknown Source)
    at org.apache.xmlbeans.impl.tool.CodeGenUtil.externalCompile(CodeGenUtil.java:231)
    at org.apache.xmlbeans.impl.tool.SchemaCompiler.compile(SchemaCompiler.java:1154)
    at org.apache.xmlbeans.impl.tool.SchemaCompiler.main(SchemaCompiler.java:373)
    Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
    at java.lang.ProcessImpl.create(Native Method)
    at java.lang.ProcessImpl.<init>(Unknown Source)
    at java.lang.ProcessImpl.start(Unknown Source)
    ... 6 more
    BUILD FAILED
    any solution for this

    Hi ,
    i have done all those things , please check below my environment variables path
    PATH=C:\oracle\product\10.2.0\db_3\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS
    \System32\Wbem;C:\Program Files\ActivIdentity\ActivClient;C:\Program Files\Java\
    jdk1.5.0_16\bin;C:\Program Files\Java\jdk1.5.0_16\lib;C:\xmlbeans-2.4.0\bin;C:\j
    devstudio10133\ant\bin;C:\xmlbeans-2.4.0\lib;
    i am using xml beans version - xmlbeans-2.4.0
    if i am running scomp.cmd -out CIDnotification2.jar CIDnotification2.xsd -compiler "C:\Program Files\Java\jdk1.5.0_16\bin"
    or
    scomp.cmd -out CIDnotification2.jar CIDnotification2.xsd
    i am getting below error
    Time to build schema type system: 0.797 seconds
    Time to generate code: 0.156 seconds
    java.io.IOException: CreateProcess: "C:\Program Files\Java\jdk1.5.0_16\bin" @C:\
    DOCUME~1\RAMAKR~1\LOCALS~1\Temp\javac9915 error=5
    null
    java.io.IOException: CreateProcess: "C:\Program Files\Java\jdk1.5.0_16\bin" @C:\
    DOCUME~1\RAMAKR~1\LOCALS~1\Temp\javac9915 error=5
    at java.lang.ProcessImpl.create(Native Method)
    at java.lang.ProcessImpl.<init>(Unknown Source)
    at java.lang.ProcessImpl.start(Unknown Source)
    at java.lang.ProcessBuilder.start(Unknown Source)
    at java.lang.Runtime.exec(Unknown Source)
    at java.lang.Runtime.exec(Unknown Source)
    at org.apache.xmlbeans.impl.tool.CodeGenUtil.externalCompile(CodeGenUtil
    .java:231)
    at org.apache.xmlbeans.impl.tool.SchemaCompiler.compile(SchemaCompiler.j
    ava:1154)
    at org.apache.xmlbeans.impl.tool.SchemaCompiler.main(SchemaCompiler.java
    :373)
    BUILD FAILED
    Please let me know if something else required

  • Publishing swf file with xml feed

    I am working in actionscript 3 trying to create a flash banner ad that will be put on multiple sites.  The ad will grab a rss feed and display a number from that feed insie the banner ad.  The Flash file works fine on my local computer when I test it.  The feed is showing up just fine in the ad.  When I publish the ad for the web and test it out on my server, the feed does not display in the ad.  I have checked to make sure network access is selected in the publish settings.  I also have a crossdomain.xml policy file on the server with the feed.  My server is listed in the policy to allow access.  I keep thinking I am overlooking something, but can't figure it out.  Any help would be greatly appreciated.
    Here is the code for the action script:
    var rssLoader:URLLoader = new URLLoader();
    var rssURL:URLRequest =
             new URLRequest("http://www.rssfeed.com/rssfeed");
    rssLoader.addEventListener(Event.COMPLETE, rssLoaded);
    rssLoader.load(rssURL);
    var rssXML:XML = new XML();
    rssXML.ignoreWhitespace = true;
    function rssLoaded(e:Event):void{
        var rssXML:XML=new XML(e.target.data);
    trace (rssXML);
        if (rssXML.channel.item[0].description >= 61)
            {rssXML.channel.item[0].description="60+"}
            testXML.text=rssXML.channel.item[0].description;
    Here is the crossdomain.xml policy file:
    <?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="domain.net"/>
            <allow-access-from domain="www.domain.net"/>
            <allow-access-from domain="anotherdomain.com"/>
            <allow-access-from domain="www.anotherdomain.com"/>
            <allow-access-from domain="yetanotherdomain.com>"/>
            <allow-access-from domain="www.yetanotherdomain.com>"/>
            </cross-domain-policy>
    Message was edited by: WRGrun262

    try:
    Security.loadPolicyFile("http://www.rssfeed.com/crossdomain.xml");
    var rssLoader:URLLoader = new URLLoader();
    var rssURL:URLRequest =
             new URLRequest(http://www.rssfeed.com/rssfeed);
    rssLoader.addEventListener(Event.COMPLETE, rssLoaded);
    rssLoader.load(rssURL);
    var rssXML:XML = new XML();
    rssXML.ignoreWhitespace = true;
    function rssLoaded(e:Event):void{
        var rssXML:XML=new XML(e.target.data);
    trace (rssXML);
        if (rssXML.channel.item[0].description >= 61)
            {rssXML.channel.item[0].description=60+}
            testXML.text=rssXML.channel.item[0].description;
    this should be crossdomain.xml in the rssfeed.com root directory
    <?xml version="1.0"?>
            <!DOCTYPE cross-domain-policy SYSTEM http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd>
            <cross-domain-policy>
    <site-control permitted-cross-domain-policies="master-only"/>   
    <allow-access-from domain="domain.net"/>
            <allow-access-from domain="www.domain.net"/>
            <allow-access-from domain="anotherdomain.com"/>
            <allow-access-from domain="www.anotherdomain.com"/>
            <allow-access-from domain="yetanotherdomain.com>/>
            <allow-access-from domain="www.yetanotherdomain.com>/>
            </cross-domain-policy>
    Message was edited by: WRGrun262

  • Creating Java file from XML data

    I have a information regarding a java file like class Name, attribute name,type, and function details in a XML file now I want to create a java file from this XML. Kindly tell me the some way to solve this problem as soon as possible.
    Thanks
    Sumit Kumar Agarwal

    So how does it take this file
    file>
    <statement>
    <name>John Dow </name>
    <address>123 Main</address>
    <phone>972-213-3434</phone>
    </statement>
    <statement>
    <name>Jane Dow </name>
    <address>345 Main</address>
    <phone>972-213-3534</phone>
    </statement>
    <statement>
    <name>Marry Dow </name>
    <address>678 Main</address>
    <phone>972-213-3435</phone>
    </statement>
    </file>
    and create these three different one?
    1.)
    <statement>
    <name>John Dow </name>
    <address>123 Main</address>
    <phone>972-213-3434</phone>
    </statement>
    2.)
    <statement>
    <name>Jane Dow </name>
    <address>345 Main</address>
    <phone>972-213-3534</phone>
    </statement>
    3.)
    <statement>
    <name>Marry Dow </name>
    <address>678 Main</address>
    <phone>972-213-3435</phone>
    </statement>
    Is it not going to just grab each element after the file tag? I'm just confused about that.

  • Using java files with JSP

    Ok, so im pretty new to this JSP lark and have a question.
    I have Java Classes resting in .java files, i need to know how
    do i link these files to my .jsp page so that the classes/variable etc.
    declared with the java files are recognised when they are come
    across in the .jsp file.
    I dont know if I have explained that properly.

    Just include this statement at the top of your jsp:
    <%@page import="yourpackage.yourclass"%>
    The .java files should of course be compiled into .class files prior to using (and you don't include the extension when importing).

  • How to deal with #ifdef in .java files with javadoc tool?

    My .java file included some '#ifdef' & '#endif' sentence. So when I used javadoc tool to generate the .html files, error happened. Can anyone give me some indication how to resolve the problem, provided that the source code can not be changed because it was written by others. Waiting for your reply and thanks in advance!

    Hi, got the same problem, have stuck for all day on this and yield no progress.
    my source code contain
    #ifdef
    and
    #endif
    it is source code (not comment), the only compile with a special preprocessing tool call
    "sjpp.jar".
    I need to generate Javadoc there.
    the error is
    [javadoc] C:\TEMP\cellml_visual_checkout\cellml_api\java\src\org\cellml\CNode.
    java:101: illegal character: \35
    [javadoc] #ifdef JENA
    if I pass in encoding parameter when I do javadoc,
    say, -encoding "PROPROC",
    then there is different error
    [javadoc] Constructing Javadoc information...
    [javadoc] Standard Doclet version 1.5.0
    [javadoc] Building tree for all the packages and classes...
    [javadoc] java.lang.Error
    [javadoc] at sun.nio.cs.StreamEncoder$CharsetSE.flushLeftoverChar(StreamEn
    coder.java:361)
    [javadoc] at sun.nio.cs.StreamEncoder$CharsetSE.implWrite(StreamEncoder.ja
    va:381)
    [javadoc] at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:136)
    [javadoc] at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:146)
    [javadoc] at java.io.OutputStreamWriter.write(OutputStreamWriter.java:204)
    [javadoc] at java.io.PrintWriter.write(PrintWriter.java:384)
    [javadoc] at java.io.PrintWriter.write(PrintWriter.java:401)
    [javadoc] at java.io.PrintWriter.print(PrintWriter.java:532)
    [javadoc] at com.sun.tools.doclets.formats.html.HtmlDocletWriter.printLink
    (HtmlDocletWriter.java:1045)
    [javadoc] at com.sun.tools.doclets.formats.html.MethodWriterImpl.printRetu
    rnType(MethodWriterImpl.java:361)
    [javadoc] at com.sun.tools.doclets.formats.html.MethodWriterImpl.writeSign
    ature(MethodWriterImpl.java:148)
    [javadoc] at com.sun.tools.doclets.internal.toolkit.builders.MethodBuilder
    .buildSignature(MethodBuilder.java:176)
    [javadoc] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [javadoc] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
    sorImpl.java:39)
    any help will be appreciated.
    thanks
    Bill

  • Using ditaval files with XML Author

    I've been evaluating XML Author and am trying to determine how to use ditaval files with it. If I want to save a ditamap as a book for PDF creation, the Prompt for DitaVal File check box is greyed out. Does anyone know why this might be the case? Is the use of ditavals limited to a full implementation of FrameMaker?
    I tried adding PromptForDitaval=1 to the [General] section of the ditafm.ini file to no avail.

    Make sure you are using the latest hotfix for Director (11.5.8) - it is the first to support AS# in Flash. Your SWF members will probably need to be linked to their external files instead of fully imported.
    Or perhaps you're saying that you've met both these conditions and are still seeing problems?

Maybe you are looking for

  • Problem in PAI

    hello friends, i need little help, i have a screen which has two input values,gscreen_exdiv and gscreen_door# as input. how do i update a ztable in the database, with these fields along with system userid, system date. can any one please give a step

  • Reg select query

    Hi Guys, I got a problem with select query...could you polease help me out...plz check the second select query statement when i open tstcp table i gave Ztable and then when I exceute i am able to get the list when i do it programatically it is not wo

  • Problem with sql TRIM in PL/SQL package in version 10.1.3.3

    I'm getting invalid token on the trim functions in the following function. The package compiles ok in TOAD, and this package worked fine in the previous version of jdeveloper I was using--10.1.3 FUNCTION stu_pidm ( p_profile_name IN VARCHAR2 RETURN N

  • BW ABAP Query

    Hi All, After many search hits finally i posting this thead . I am very much new to ABAP in BW. so i would like solve me below problem. Need some basics about ABAP. first very basic question is 1: how to populate SOURCE_PACKAGE.,/ Internal table i kn

  • HT201541 My website has stopped working in Safari Version 5.1.10?

    My website (www.dollshousefireplace.co.uk) has stopped working in Safari Version 5.1.10 (old Mac pro) and on one of my other machines (old imac) running Version 5.0.6? but it works fine on other devices (ipad, iphone, (new) Mac pro and PC) using (pro