Adding EOF to XML file without using FCC

Hello Experts,
I have a simple File to File scenario with source and target files being XML  and simple mapping (No content conversion necessary). The issue which I face is described below:
File is written by receiver File Adapter on the unix system, a third party Unix script tries to read the file and faces problems which they report is because the file is not ended correctly. When we try to open the files using vi editor, we also get a warning: [Last line is not complete].
As a temporary solution the script is making sure the line is ended correctly. Can you advice me how from PI side I can make sure that the file ends properly. I was thinking to write a shell script and add it as a OS post processing command but I am not sure whether that will work and whether that is the best solution.
Also the file name is generated dynamically using time stamps in the receiver side. Version of PI is 7.0 SP16
Best Regards,
Pratik

Hi,
When PI sends target file to file,it definely wellformed XML,anyway you are sending XML file.
If you are nor using any mapping,,just copying file from one to other,then problem with test data,may be source data doesnot have EOF tag.
check/test in message mapping,it gives valid xml structures in out put,then problem with your data.
Regards,
Raj

Similar Messages

  • I am wondering if there is a way to validate XML file without using .......

    I am wondering if there is a way to validate XML file without using the <!DOCTYPE... but pass in the location of the schema/DTD file as a parameter to a validating method?
    thanks

    None that I know of. The only thing close is to use the EntityResolver interface where you can modify the location of the DTD file before it's being loaded and parsed, but that requires a <!DOCTYPE ...> in the XML file.
    Good luck.

  • Include attachments in a xml file without using mail adapter

    Hello Experts,
    Is there a way to include attachments like pdf or excel in a xml file?
    It is a file to file scenario in which i have to include the attachment in the output file.
    Thanks and regards,
    Merrilly

    Hi,
    Check this links,
    PDF
    SAP Network Blog: XI: Read data from PDF file in Sender Adapter
    /people/sap.user72/blog/2005/07/31/xi-read-data-from-pdf-file-in-sender-adapter
    SAP Network Blog: XI: Generate PDF file out of file adapter
    /people/sap.user72/blog/2005/07/27/xi-generate-pdf-file-out-of-file-adapter
    EXCEL FILES
    SAP Network Blog: XI: Generating Excel files without the Java nor the Conversion agent not possible?
    /people/michal.krawczyk2/blog/2005/12/10/xi-generating-excel-files-without-the-java-nor-the-conversion-agent-not-possible
    SAP Network Blog: Read Excel instead of XML through FileAdapter
    /people/sap.user72/blog/2005/07/04/read-excel-instead-of-xml-through-fileadapter
    Regards,
    Phani
    Reward points if Helpful

  • Reload web-inf/web.xml file without restarting tomcat

    Please help me if any one have a solution .
    I am doing development in jsp, servlet. I am using tomcat5 as a webserver.
    i want to reload web-inf/web.xml file without restarting tomcat.

    From the tomcat admin page you can stop/start and refresh individual applications. See the tomcat documentation. Which, when you have a question about tomcat, you should always do first.

  • Is it possible to create .ncd file without using MAX?

    Is it possible to create .ncd file without using MAX? I am trying to read the data given by hundreds of possible Arb. IDs on one of the CAN port without having to create it from the MAX.
    Thank you

    Hi,
    the NI-CAN driver software does not provide functions/VIs to generate
    *.ncd files. However the *.ncd file format is just plain XML (ASCII text). Take a
    look at the example.ncd file that gets installed with NI-CAN
    (<ProgramFiles>\National Instruments\NI-CAN\):
    <?xml version="1.0" encoding="UTF-8"?>
    <nican_config version="0.1">
    <saved>8/8/2005,17:58</saved>
    <message name="TransmissionFluids">
      <id extended="0">82</id>
      <dbc>C:\Program Files\National Instruments\NI-CAN\example.ncd</dbc>
      <conflicts>0</conflicts>
      <bytes>6</bytes>
      <interface>1</interface>
      <comment></comment>
      <channel name="ClutchPressure">
        <conflicts>0</conflicts>
        <bitfield start="0" bits="8" order="0" type="1"/>
        <linear_scaling factor="1.600000e+001"
    offset="0.000000e+000" max="4.000000e+003" min="0.000000e+000"
    default="0.000000e+000" unit="kPa"/>
        <comment></comment>
      </channel>
    </message>
    </nican_config>
    Thus, you could generate *.ncd files with simple file I/O. Having XML-specific file I/O functions simplifies this task.
    -B2k

  • Running faces config file without using internet

    hi
    i m new to JSF
    how i can run faces config file without using live internet
    i have put "web-facesconfig_1_1.dtd" file at local path
    while i run the jboss,it will throw exception of fileNotFoundException

    Which version of JBoss are you using? I have successfully run 4.2.x off the grid but I typically use schema:<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
                  version="1.2">Note that I did not need to obtain copies of the files myself for use locally.

  • Can you write an avi file without using imaq

    Just curious if anybody has tried to write an avi file without using imaq vi's? So far I have only found sketchy info on the file format and am looking for some help on the file structure etc. Any references or example avi files with explanations of format would be most helpfull. Thanks in advance -

    Absolutely.......
    An AVI video file is actually structured in the same way as most Windows media files or RIFF files as they are generically known, thus the description below is applicable to for example WAV files etc.
    Thus the file always begins with the four byte code RIFF and continues to use this generic four byte coding known as FOURCC, four-character code or FCC throughout.
    There are then specific requirements for each different media content and the sections that must be included to define a valid file structure of the desired meadia type.
    Each section or 'CHUNK' is defined by an FCC (RIFF being the first) with facility to include additional FCC's as required. The FCC is followed by a length descriptor and then the data (just for fun the odd CHUNK does not quite fit this very general overview). These chunks then align to even word boundries so padding zeros are often inserted at the end of a CHUNK to make it all nice and neat.
    It is a requirement that software that does not recognise an additional custom CHUNK should ignore it, this is very easy as all you have to do is use the length descriptor to 'jump' over the CHUNK concerned.
    The following is an example from the 'CLOCK.AVI' found on windows computers for a number of years...
    RIFFjB AVI LISTΠhdrlavih8
    Here you can see the RIFF followed by a four byte length descriptor (4 Gigabytes), followed by various sub CHUNKS in this example the sub CHUNK is an AVI (note that it is actually 'AVI ' to conform to the FCC).
    So the CHUNK structure looks a bit like this:-
    RIFF ('AVI '
    LIST ('hdrl'
    'avih'()
    LIST ('strl'
    'strh'()
    'strf'()
    'strd'()
    'strn'()
    LIST ('movi'
    {SubChunk | LIST ('rec '
    SubChunk1
    SubChunk2
    ['idx1']
    For more information on all this you need to read the RIFF specification documentation on the MSDN website or on the MSDN Technet materials. Most of the stuff you will immediately locate will refer to the AVI file format as that is where most of the recent effort has been focused.

  • How to create new Custom XML Report without using Form Builder

    Hi,
    What are the steps to create new Custom XML Report without using Report Builder ?
    Thanks and Regards,
    Abhi

    Hi,
    Steps we now follow
    1)Create Data Model in Reports Builder
    2)Create xml
    3)Insert xml in Publisher to build Fomat
    4)FTp rdf
    5)Create Data Definition and Template
    6)Create executable and Concurrent Program
    Is there any way we can build reports without use of Report Builder ? By writing PL SQL Package for Before Report and After Report etc ...
    Thanks and Regards,
    Abhijit Rode

  • How to open a text file without using dialog box

    I can open a file using dialog box but I want to open a file without using any dialog box for writing.
    With the following commands a new file is created.
    File outputFile = new File("outagain.txt");
    FileWriter out = new FileWriter(outputFile);
    I want to open an existing file and put some more text in it using FileWriter or any other object
    rgds,
    Arsalan

    import java.io.*;
    class UReader
        BufferedReader in;
        BufferedReader input;
        String fileName;
        public UReader(String fileName)
            this.fileName = null;
            this.fileName = fileName;
            try
                in = new BufferedReader(new FileReader(fileName));
                input = new BufferedReader(new FileReader("A.b"));
            catch(IOException _ex) { }
        public final String getContent()
            String txt = "";
            try
                while(in.ready())
                    txt = txt + in.readLine();
                    txt = txt + "\n";
                in.close();
                txt.trim();
            catch(IOException _ex) { }
            return txt;
        public final String getLine(int row)
            try
                input = new BufferedReader(new FileReader(fileName));
            catch(IOException _ex) { }
            String txt = null;
            if(row <= getRows()) {
                try
                    for(int i = 0; i < row; i++)
                        txt = input.readLine();
                    input.close();
                catch(IOException _ex) { }
            } else {
                txt = "Index out of Bounds";
            return txt;
        public final int getRows()
            try
                input = new BufferedReader(new FileReader(fileName));
            catch(IOException _ex) { }
            String txt = null;
            int rows = 0;
            try
                while(input.ready())
                    txt = input.readLine();
                    rows++;
                input.close();
            catch(IOException _ex) { }
            return rows;
    import java.io.*;
    import java.util.*;
    class UWriter
        PrintWriter out;
        String fileName;
        String[] txt;
        static int NEW_LINE = 1;
        static int APPEND = 0;
        public UWriter(String s)
            fileName = null;
            txt = null;
            fileName = s;
            try
                out = new PrintWriter(new BufferedWriter(new FileWriter(s, true)));
            catch(IOException ioexception) { }
        public final void addContent(String s, int i)
            int l = 0;
            StringBuffer sb = new StringBuffer(s);
            s.replaceAll("\n\n", "\n###\n");
            StringTokenizer str = new StringTokenizer(s, "\n");
            String token = null;
            while (str.hasMoreTokens()) {
                ++l;
                token = str.nextToken();
            str = new StringTokenizer(s, "\n");
            txt = new String[l];
            int k = 0;
            String test;
            while (str.hasMoreTokens()) {
                test = str.nextToken();
                if (test.equals("###")) test = "";
                txt[k++] = test;
            if(i == 0) {
                try
                    for (int j = 0; j < txt.length; ++j) {
                        out.println(txt[j]);
                    out.close();
                catch(Exception ioexception) { }
            } else {
                try
                    out.println();
                    for (int j = 0; j < txt.length; ++j) {
                        out.println(txt[j]);
                    out.close();
                catch(Exception ioexception1) { }
        public final void writeContent(String s)
            int l = 0;
            s.replaceAll("\n\n", "###");
            StringTokenizer str = new StringTokenizer(s, "\n");
            String token = null;
            while (str.hasMoreTokens()) {
                ++l;
                token = str.nextToken();
            str = new StringTokenizer(s, "\n");
            txt = new String[l];
            int k = 0;
            String test;
            while (str.hasMoreTokens()) {
                test = str.nextToken();
                if (test.equals("###")) test = "";
                txt[k++] = test;
            try
                PrintWriter bufferedwriter = new PrintWriter(new BufferedWriter(new FileWriter(fileName, false)));
                for (int j = 0; j < txt.length; ++j) {
                    bufferedwriter.println(txt[j]);
                bufferedwriter.close();
            catch(IOException ioexception) { }
    }Maybe they are not the best codes, i wrote them a long time ago, so dont ask why i did anything wierd. :D
    But anyway it works.

  • Regarding reading the data from the files without using Stremas

    hai to all of u...
    here i have a problem where i have to read the data from the files without using any streams.
    please guide me how to do this one,if possible by giving with an example
    Thanks & Regard
    M.Ramakrishna

    Simply put, you can't.
    By why do you need to?

  • Export table data in a flat file without using FL

    Hi,
    I am looking for options where I can export table data into a flat file without using FL(File Layout) i.e., by using App Engine only.
    Please share your experience if you did anything as this
    Thanks

    A simple way to export any record (table/view) to an csv fiel, is to create a rowset and loop through all record fields, like below example code
    Local Rowset &RS;
    Local Record &Rec;
    Local File &MYFILE;
    Local string &FileName, &strRecName, &Line, &Seperator, &Value;
    Local number &numRow, &numField;
    &FileName = "c:\temp\test.csv";
    &strRecName = "PSOPRDEFN";
    &Seperator = ";";
    &RS = CreateRowset(@("Record." | &strRecName));
    &RS.Fill();
    &MYFILE = GetFile(&FileName, "W", %FilePath_Absolute);
    If &MYFILE.IsOpen Then
       For &numRow = 1 To &RS.ActiveRowCount
          &Rec = &RS(&numRow).GetRecord(@("RECORD." | &strRecName));
          For &numField = 1 To &Rec.FieldCount
             &Value = String(&Rec.GetField(&numField).Value);
             If &numField = 1 Then
                &Line = &Value;
             Else
                &Line = &Line | &Seperator | &Value;
             End-If;
          End-For;
          &MYFILE.WriteLine(&Line);
       End-For;
    End-If;
    &MYFILE.Close(); You can of course create an application class for generic calling this piece of code.
    Hope it helps.
    Note:
    Do not come complaining to me on performance issues ;)

  • Upload file without using file upload UI Element

    Hi all.
    I need upload a .txt file without using file upload UI Element because filename is not insert by user. The filename is generated by program. I try to use 'GUI_UPLOAD' and 'WS_UPLOAD' but don't work.
    Many thanks in advance.

    As you correctly pointed out we cannot use the gui_upload and gui_download fm's in webdynpro because they require sap gui and WD Components generally run in a HTML or Portal environment.
    The only option available is File Upload Element

  • Saving a Text data to a PDF file without using print option

    Hi,
    I want to save a Text to a PDF file. I want to assign the path of the PDF file as a default one.
    If I use Print options, then it ask for the file path at the run time.
    Is there any method to save to a PDF file without using print option in Labview 8.2.
    Regards,
    Raja

    This question comes up a lot. Did you try searching? It depends on the PDF printer driver that you're using. See here, here, here, ...

  • Embed flash file without using IFrame UI

    Hi all,
    Can any one tell me how i can embed flash file without using IFrame UI ?

    Hi
    To run a flash file you will definetely need a platform for which you need a shockwave player or a simple browser window. From webdynpro, the purpose of making it run through a IFrame is at runtime, the frame acts as a window for the flash file to run. Hence its the direct option of running it. Otherwise, you need to use a external window to invoke it seperetely in a browser window to run the file.
    If you have any specific issues, do let us know, or else its the best option @!
    thanks
    sathya

  • Embed  html file without using IFrame UI

    Is there any way to embed html file without using IFrame UI?

    Hi
    To embed a static HTML content inside your view, Iframe is the easiest form or else, you can provide links through Linktourl UI or through a static text or a button, invoke a action and display the HTML content inside the frame or call it in a seperate (external) window.
    Otherwise, we have only less options!
    if you have anything specific, do let us know
    thanks
    sathya

Maybe you are looking for

  • List of Open Production orders

    Hi all, How to find the list of open production orders. Is there a transaction to find the list of open production orders. Regards Hemanth

  • Error while manual testing the FM BBP_PD_SC_CREATE

    Hi All, Currently I am doing a project where I have to upload the shopping cart through Excel file.  I am testing the FM  BBP_PD_SC_CREATE by manually passing the values. I took help from the thread /message/3081588#3081588 [original link is broken]

  • Tv out probs

    i have a geforce 4 mx420 video card and im trying to connect it to the tv so i can watch a movie. i connected the svideo cable into my digital reciever because that is the only way i can connect that cord to get the signal to the tv but then that is

  • I cannot get my Iphone videos to import into Premiere 9?

    Is there any tricks that you have to do? It gives me an error message of "The importer reported a generice error"

  • Nokia 7373 Help

    I have just brought a 7373 and I am really struggling to use it in terms of an MP3 player. How are you to get the data onto your phone? My previous phone connected with a USB cable however I am finding that with the 7373 there is very little on the n