Read and write to the local XML file

Hello

I'm trying to understand how to use the xml files saved locally. My goal is to create an xml file in the repository of the application (which has read/write permissions), add data in this file xml and re - register so that it can be retrieved whenever this is necessary.

I want to store xml data are farily short; It has the following structure:


    x
    x
    x
    x
    x
    x
    x
    x
    x
    x



...etc.

I read a few articles about recording and writing in a file like this, but none of them does not seem to work. I hope someone could provide me with the code to do this.

Thank you.

Try:

///////////////////////////////////////////////////////////////////////

public public static function Store (name: String, data: String): void

{

var file: file = File.applicationStorageDirectory.resolvePath (name);

var file_stream: FileStream = newFileStream();

file_stream. Open (file, FileMode.WRITE);

out of the var : String = '\n';

output of +=;

output = output.replace (\n/g, File.lineEnding);

file_stream.writeUTFBytes (output);

file_stream. Close();

}

//////////////////////////////////////////////////////////////////////////

public public static function Get (name: String): XML

{

var config: XML = null;

var file: file = File.applicationStorageDirectory.resolvePath (name);

  if (file.exists)

{

var file_stream: FileStream = new FileStream();

file_stream. Open (file, FileMode.READ);

config = new XML (file_stream.readUTFBytes (file_stream.bytesAvailable));

file_stream. Close();

}

return config;

}

Tags: BlackBerry Developers

Similar Questions

  • TCP Read and Write at the same time

    Hello everyone,

    I have a question about parallelism in TCP connections.

    I know that it is possible to read and write on the same connection ID.

    So, if you ReadTCP and WriteTCP block each other, if you use the same TCP connection ID?

    Or to request more precise if I run two while loops, in parallel, with one end by calling WriteTCP and the other called ReadTCP.

    one of the delay of loops (or block) will be the other if both loops call their VI TCP at the same time right?

    The system is Windows 7 and Labview 2012.

    Kind regards

    Sebastian

    They are perfectly parallel.  Just write in one and read it from the other.  There is no conflict.

    See My TCP articles for more details.

  • Cannot load the local xml file from swf

    Hello!

    I have next construction

    (1) in ai3r app to load the SWF by HTMLLoader

    (2) I'm trying to load local xml file in swf. No error and no results.

    Application of AIR-> SWF-> load xml

    When I load xml file site, everything is ok, but when I load just from local file , nothing happens

    and when I load the local file with swf but everything is ok in the browser (firefox)

    for loading xml in a I use the following path: file:///folder_name/xml_file_name.xml

    Help me please!

    Did you write the SWF?  Some sovereign wealth funds will remove errors.

    Why use HTMLLoader?  Who can load it with different security rules.  Content browser often cannot access local content.

  • with third party applications, I can read and write on the external drive HFS + for windows?

    Hello

    I see with third party app I can read and write to external disk NTFS on the mac computer.

    then othrwise, then I can read and write on extern hardrive HFS + with application of third party windows computer.  So who are the best third-party applications to read and write HFS and if they are free of charge on the external drive?

    Thank you

    Johan

    Now that I understand your goal, check out http://www.ufsexplorer.com/rdr_hfsp.php but your YMMV.

  • Questions about serial port read and write at the same time

    Hi I create a user interface for the communication serial port, where there are essentially 2 front panels, where the user enters commands one and the other where the prints of UART is delivered. I thought initially using a state machine but the reading and writing may be independent sometimes and so I can't rely on States. I searched a bit on the forum and he left me even more confused. Help, please.

    (1) in a thread that sessions visa duplicated has been used for writing and reading at the same time, is it recommendable? How will this affect performance?

    (2) essentially when the vi is reading data are it must constantly view as well, however, someone said that it takes too much memory to use shift registers, so how do I go about this? If using a State in queue after the loop of reading it affects the playback loop and be sequential?

    In addition anyway is to move the cursor to the latest data from the indicator

    (3) for the control of the user input, assumes that the user has entered an order in the control and press ENTER, then writing visa is launched, but if it comes in another string and press enter then write must be called again... is - it possible? will detect the previous commands in the control of compensation?

    (4) according to my understand the expectation for the event do not monopolize resources and writing can go in parallel, am I right?

    Thank you. I have attached a very basic vi which took me to the point, but I want to make it more robust. Please help especially in the part of the user interface.

    su_a,

    (1) you can have only one session to a port. Several UART can handle full duplex so performance is not affected.  At flow rates of high data and large amounts of data, buffering and latencies of BONE can become a problem.

    (2) who told you that shift registers using too much memory? Shift registers are usually the best way to transfer data from one iteration to another. String concatenation inside a loop (registry to offset or not) causes the chain to develop and may require re-allocation of memory.  Your VI never clears the string so its cold length become very large.

    Generally, you do not have an active cursor on an indicator.  If you want to always display the most recently received characters and turn on the vertical scroll bar use a property node to keep scrolls to the bottom.  This can be annoying for users if they attempt to manually move the scroll bar and find that the program continues to move it back automatically.

    (3) if the user has changed the value in the chain of command, when he hits enter the modified value event fires.  Simply strike brace does not change the value and does not trigger the event.  Not control need to be erased, but the value that he has to change.  If you want to send the same command again, have a button send a command may be a better choice.

    (4) write is a case of the event.  It is not in parallel with anything.  The structure of the event do not monopolize resources.  The other loop will run while it waits.

    The event loop will not stop when you press the STOP button. Probably it wll take two command: change events of value after JUDGMENT before any loop stops.  Replace the Timeout event (which never expires) with a STOP: value change event and a real wire of this judgment to the Terminal endpoint.  Remove the local variable.  Make mechanical locking when released.

    Lynn

  • Need help: UTL_FILE read and write in the text file

    Hello, I'm on version 11 GR 2 by using the UTL_FILE function to read a text file and then write the lines where it starts with the word "foo" and put an end to my writing in the text file where the line with the word "ZEN". Now I have several lines that begin with 'foo' and 'ZEN' allow a paragraph, and in this paragraph, there is a line that begins with "DE4.2". Therefore,.
    I need to write all of the paragraphs that include the "DE4.2" line in their beginning and end of lines 'foo' and 'ZEN '.

    FOR EXAMPLE:

    FOO/234E53LLID
    IT'S MY SECOND LINE
    IT'S MY THIRD LINE
    DE4.2 IT OF MY FOURTH LINE
    IT'S MY FIFTH LINE
    ZEN/DING3434343

    FOO/234E53LLID
    IT'S MY SECOND LINE
    IT'S MY THIRD LINE
    IT'S MY FIFTH LINE
    ZEN/DING3434343

    I'm only interested in writing the first paragraph tha includes line DE4.2 in one of the paragraph of lines not the second ther that does not include the "DE4.2".

    Here is my code so far:

    CREATE OR REPLACE PROCEDURE my_app2 IS
    Utl_file.file_type INFILE;
    outfile utl_file.file_type;
    buffer VARCHAR2 (30000);
    b_paragraph_started BOOLEAN: = FALSE; -flag to indicate which required paragraph is started

    BEGIN
    -Open a file to read
    INFILE: = utl_file.fopen ('TEST_DIR', 'mytst.txt', 'r');
    -Opens a file for writing
    outfile: = utl_file.fopen ('TEST_DIR', "Out.txt", "w");

    -Check the file is open
    IF utl_file.is_open (infile)
    THEN
    -lines in the file in loop
    LOOP
    BEGIN
    UTL_FILE.get_line (infile, buffer);
    APPLICATION STARTING POINT-
    Buffer IF LIKE 'foo %' THEN
    b_paragraph_started: = TRUE;
    END IF;
    -SEARCH FOR GRADS APPS
    IF b_paragraph_started AND buffering LIKE '% 4% ' THEN
    UTL_FILE.put_line (outfile, buffer, FALSE);
    END IF;
    -REQUEST FOR ENDPOINT
    Buffer IF LIKE '% ZEN' THEN
    b_paragraph_started: = FALSE;
    END IF;
    UTL_FILE.fflush (outfile);

    EXCEPTION
    WHEN no_data_found THEN
    EXIT;
    END;
    END LOOP;
    END IF;
    UTL_FILE.fclose (INFILE);
    UTL_FILE.fclose (outfile);
    EXCEPTION
    WHILE OTHERS THEN
    raise_application_error ("-20099, ' UTL_FILE unknown error");
    END my_app2;
    /

    When I run this code I get only one line: DE4.2 it ME LACK THE WHOLE PARAGRAPH

    PLEASE ADVISE...

    I agree with reservations of Justin on the length of a "paragraph" and the number of users that are running at the same time, so here is a version without the collections.

    CREATE or replace PROCEDURE my_app2 IS
       infile utl_file.file_type;
       outfile utl_file.file_type;
       buffer VARCHAR2(30000);
       b_paragraph_started BOOLEAN := FALSE; -- flag to indicate that required paragraph is started
       b_toprint BOOLEAN := FALSE;
       l_para_start pls_integer;  -- start of "paragraph"
    BEGIN
       infile := utl_file.fopen('TEST_DIR', 'mytst.txt', 'r');
       outfile := utl_file.fopen('TEST_DIR', 'out.txt', 'w');
       LOOP
          BEGIN
             utl_file.get_line(infile, buffer);
             IF buffer LIKE 'FOO%' THEN
                b_paragraph_started := TRUE;
                l_para_start := UTL_FILE.FGETPOS(infile) - (length(buffer) + 1);
             END IF;
             IF b_paragraph_started and buffer like '%DE4%' THEN
                b_toprint := TRUE;
             END IF;
             If buffer like 'ZEN%' THEN
                IF b_toprint THEN
                   UTL_FILE.FSEEK(infile, l_para_start);
                   utl_file.get_line(infile, buffer);
                   while buffer not like 'ZEN%' loop
                      utl_file.put_line(outfile,buffer, FALSE);
                      utl_file.get_line(infile, buffer);
                   end loop;
                   utl_file.put_line(outfile,buffer, FALSE);
                end if;
                b_paragraph_started := FALSE;
                b_toprint := false;
                utl_file.fflush(outfile);
             end if;
          EXCEPTION
             WHEN no_data_found THEN
                EXIT;
             END;
       END LOOP;
       utl_file.fclose(infile);
       utl_file.fclose(outfile);
    END my_app2;
    

    Test:

    SQL> !cat mytst.txt
    FOO/234E53LLID
    THIS IS MY SECOND LINE
    THIS IS MY THIRD LINE
    DE4.2 THIS IS MY FOURTH LINE
    THIS IS MY FIFTH LINE
    ZEN/DING3434343
    
    FOO/234E53LLID
    THIS IS MY SECOND LINE
    THIS IS MY THIRD LINE
    THIS IS MY FIFTH LINE
    ZEN/DING3434343
    
    FOO/234E53LLID again
    THIS IS MY second SECOND LINE
    THIS IS MY second THIRD LINE
    DE4.2 THIS IS MY second FOURTH LINE
    THIS IS MY second FIFTH LINE
    ZEN/DING3434343 again
    
    SQL> exec my_app2;
    
    PL/SQL procedure successfully completed.
    
    SQL> !cat out.txt
    FOO/234E53LLID
    THIS IS MY SECOND LINE
    THIS IS MY THIRD LINE
    DE4.2 THIS IS MY FOURTH LINE
    THIS IS MY FIFTH LINE
    ZEN/DING3434343
    FOO/234E53LLID again
    THIS IS MY second SECOND LINE
    THIS IS MY second THIRD LINE
    DE4.2 THIS IS MY second FOURTH LINE
    THIS IS MY second FIFTH LINE
    ZEN/DING3434343 again
    

    You may need to change the length (buffer) + 1 depending on your platform and if you want a blank line s NLE out paragraphs, add another call to put_line after that outside of the loop in the fi l_toprint block.

    John

  • How to use the two counters to PXI-6280, to read and write at the same time?

    Hi all

    I try to use PXI-6280 counter to generate a command of step motor pulse train.  The idea is to send a number done and known pulse for the engine, which belongs to a system XYZ. The point is, if, at some point, the user or the security system can interrupt the movement. If this happens (and will be... a lot), I will lose the real position, because I don't know how many pulses were actually sent to the engine. That is why I want to use the other cost to count impulses how were actually sent to the engine. I can start any tasks (generating or account), but only the first started task will operate. I met a couple of mistakes and I'm not able to find a solution.

    Is it really possible to use the two counters? I've already done this in a pci system and worked without problems.

    Thanks in advance,

    Giavonna

    Electrical engineer

    I'm afraid that I don't understand your idea. Could explain you better?

    Material of the series M support pointing to an arbitrary digital signals at rates (the clock must be provided from another source, for example a counter).  If you want a digital pulse train finished output and have access to a counter (the two counters if find you another source for your clock, for example the subsystem "output frequency"), you must use this subsystem 'digital output' rather than the output of the counter.  There should be examples in the finder of the example shows how to configure a finished task of digital output.

    Now I'm generating sample clock having a single Timed material Point (the only mode accepts this mode), and configure the counter with finite samples.

    I don't think not just single point NI the hardware, that's what you want.  More commonly, output meter tasks use timing 'Implied', where the release date is implicitly determined by the characteristics of the pulse user-defined.

    Is there a way to stop the production of only one meter when a finite number of pulses has been played in another counter?

    Yes, but it's a little tricky.  You can set a trigger 'Pause' on the output task, with the soruce the break being the internal release of the counter used for the task of entry.  Set the initial value of the counter of entry to 2 ^ 32-N (or maybe 2 ^ 32-1-N, I don't have a system right now to check) where N is the desired number of pulse output.  Together the counter event behavior for the counter edges of County switch output (this is a property of DAQmx export Signal).  When the counter of entry reaches terminal, its in-house production switches, causing thus the task of output to pause.  You can then stop the task in the software (you should be able to use the output of the task of entry counter event to signal to the software when the output is paused).

    Now that I've written that the whole paragraph, I remember something * similar * to work around a limitation of the driver here .  It is not quite the same implementation I described above, but really, you can use a meter output or a counter entry to get the same effect (it could be a good place to start anyway if you want to try this).

    Is there a way to read pulses them how have been generated, without the other counter, counting impulses?

    N °

    Best regards

  • How to read and write attributes using the API?

    I'm trying attributes of access (read and write) of the following:

    SequenceFile

    Sequence

    The sequence steps

    When you look at the documentation of the API, TestStand, the following functions are available:

    PropertyObject

    Properties

    Attributes (read-only)

    HasAttributes (read-only)

    Methods

    DisplayAttributesDialog

    I tried to use the SetValString and GetValString commands using the reference of the attributes, but it does not seem that the data is stored in the file.

    I can't find the following information in the TestStand API:

    1. Where the attributes are stored in a property object?

    2. How can we access through the API?

    No advice and no information is appreciated!

    You must increment the number of changes to the file after that editing the sequence editor (or UI) won't refresh or mark the file, as amended. Use sequenceFile.AsPropertyObjectFile (). IncChangeCount().

    SequenceFile attributes are stored in the SequenceFile.Data, not the object of SequenceFile object. You can change them in the Advanced tab of the properties of the file sequence dialog box.

    Hope this helps,

    -Doug

  • import the request xml file and the xml for mds dataset

    Hello world

    I exported xml default request to the metadata file.
    Then I have the ModifyResourceDataSet.xml and I change the ModifyResourceRequest.xml file to use the dataset file.

    I then edit weblogic.properties.
    metadata_from_loc = / u02/app/oracle/product/fmw/IOM/server/bin/oracle/metadata/iam-features-requestactions/model-data
    metadata_files=/U02/app/Oracle/product/FMW/OIM/Server/bin/Oracle/metadata/IAM-features-requestactions/model-data/ModifyResourceRequest.XML
    I executed weblogic.properties
    Can I edit weblogic.properties file again.
    metadata_from_loc = / u02/app/oracle/product/fmw/IOM/server/bin/oracle/metadata/iam-features-requestactions/model-data
    metadata_files=/U02/app/Oracle/product/FMW/OIM/Server/bin/Oracle/metadata/IAM-features-requestactions/model-data/ModifyResourceDataSet.XML

    But, when I try to create change the provided resource, screen related dateset moved not.
    When the error?
    Or where I'm bored?

    Thank you.

    Hüseyin Carole,
    What message errorr you found? Check the doc for the weblogicImportMetadata command.
    http://docs.Oracle.com/CD/E21764_01/doc.1111/e14309/utils.htm#OMDEV759
    Besides that this request for OIMMetadata should be up.
    -Kuldeep

  • Read a record of file and write to the database.

    Hello

    I read a file using a file adapter and write to the database using DBAdapter table. In BPEL, I used activity to receive the entry from the file and call activity to call dbadapter.in between receive and call I used activity activity of transformation of transformation.the problem is that, after deployment it.i get following error two errors:

    (1) no recoverable system failure:
    < bpelFault > < faultType > 0 < / faultType > < bindingFault xmlns = "http://schemas.oracle.com/bpel/extension" > < a name = "summary" part > < summary > Exception is is produced when the link has been invoked. Exception occurred during invocation of the JCA binding: "JCA binding run reference"insert"operations have to: connection problem component binding JCA.". JCA Binding component is unable to create an outgoing connection of JCA (CCI). ReadWriteDB:WriteDB [WriteDB_ptt::insert (MydbCollection)]: The JCA Binding component could not establish an outbound connection of JCA CCI due to the following problem: BINDING. Error of JCA - 12510 JCA adapter localization resources. Unable to locate the adapter of JCA resource through the element of the binding file .jca & lt; factory connections / > The JCA Binding component is unable to startup of the resource adapter specified in the & lt;-factory connections / > element: location = 'EI, DB, null. The reason is most likely that 1) the resource adapter RAR file has not been deployed successfully to the WebLogic application server or 2) the "& lt;" jndi name > ' element in weblogic - ra.xml has not been defined in eis/DB/null. In the latter case, you need to add a new factory of connections from WebLogic JCA (deploy a RAR). Please fix this and then relaunch the Application Server, please make sure that the JCA connection factory and dependent connection factories have been set up with a sufficient limit for maximum connections Please also make sure that the physical connection to the EIS server is available and the backend itself accepts connections. ". The called JCA adapter threw an exception of resource. Please review the error message above carefully to determine a resolution. < Summary / > < / part > < part name = "detail" > < details > error location JCA resource adapter. Unable to locate the adapter of JCA resource through the element of the binding file .jca & lt; factory connections / > The JCA Binding component is unable to startup of the resource adapter specified in the & lt;-factory connections / > element: location = 'EI, DB, null. The reason is most likely that 1) the resource adapter RAR file has not been deployed successfully to the WebLogic application server or 2) the "& lt;" jndi name > ' element in weblogic - ra.xml has not been defined in eis/DB/null. In the latter case, you need to add a new factory of connections from WebLogic JCA (deploy a RAR). Please fix this and then restart the application server < / details > < / part > < part name = "code" > < code > 12510 < / code > < / piece > < / bindingFault > < / bpelFault >

    2 non recoverable system fault):
    Exception occurred when the link was invoked. Exception occurred during invocation of the JCA binding: "JCA binding run reference"insert"operations have to: connection problem component binding JCA.". JCA Binding component is unable to create an outgoing connection of JCA (CCI). ReadWriteDB:WriteDB [WriteDB_ptt::insert (MydbCollection)]: The JCA Binding component could not establish an outbound connection of JCA CCI due to the following problem: BINDING. Error of JCA - 12510 JCA adapter localization resources. Cannot find the adapter in JCA resources via the element of the binding .jca file <-factory connections / > The JCA Binding component is unable to startup of the resource adapter that is specified in the <-factory connections / > element: location = 'EI, DB, null. The reason is most likely that 1) the resource adapter RAR file has not been deployed successfully to the application server WebLogic or 2) the element '< jndi name >' in weblogic - ra.xml has not been set to eis/DB/null. In the latter case, you need to add a new factory of connections from WebLogic JCA (deploy a RAR). Please fix this and then relaunch the Application Server, please make sure that the JCA connection factory and dependent connection factories have been set up with a sufficient limit for maximum connections Please also make sure that the physical connection to the EIS server is available and the backend itself accepts connections. ". The called JCA adapter threw an exception of resource. Please review the error message above carefully to determine a resolution.

    Please suggest how to solve.

    Thank you

    Tejas

    Check your source data and your connection adapter db adpater deployments factory.
    Check if you have configured all steps of http://docs.oracle.com/cd/E15523_01/integration.1111/e10231/life_cycle.htm#BABBEDBF.
    Also, in your file .jca in your jdeveloper have named the location of connection-factory as "ist/DB/draw ' if so change it to one that you have created in the db adapter deployments.

  • How to read and write files .exe to soa using the file adapter?

    Hello

    I have a requirement, that I need to read and write files .exe to soa using the file adapter.

    Can someone help me.

    Thanks in advance,

    Divya.

    Hi Vijay,

    I tried with opaque. It works for me.

    Kind regards

    Adkins

  • reading and writing to the file on SD card

    I am currently using this code to read and write to files (credit is not because of me - I found these on the Board somewhere):

       private void writeFile(String data, String filePath)
        {
            try
            {
                FileConnection conn = (FileConnection)Connector.open(filePath,Connector.READ_WRITE);
                if (!conn.exists())
                {
                    Dialog.alert("No File Present Click to Create");
                    conn.create();
                }
    
                OutputStream out = conn.openOutputStream();
                byte[] b = data.trim().getBytes();
                String sb = new String(b);
                System.out.println("Bytes to String: " + sb);
    
                if(sb.length() == 0 )
                    System.out.println("String length is zero");
                else
                    System.out.println("String length is not zero" + sb.length());
    
                if(conn.canWrite())
                {
                    Dialog.alert("Writing");
                    out.write(b,0,sb.length());
                }
                else
                    System.out.println("Cannot write to this file");
    
                System.out.println("File Size is : "+ conn.fileSize());
                out.flush();
                out.close();
            }
            catch(Exception io)
            {
                test.setText("Exceptino Thrown from File" +io);
            }
    
        }
    
        private String readFile(String filePath)
        {
            try
            {
                FileConnection fconn = (FileConnection)Connector.open(filePath, Connector.READ);
                if (fconn.exists())
                {
                    InputStream input = fconn.openInputStream();
    
                    ByteArrayOutputStream baos = new ByteArrayOutputStream();
                    int j = 0;
                    while((j=input.read()) != -1) {
                        baos.write(j);
                    }
                    byte[] data = baos.toByteArray();
                    input.close();
    
                    String output = new String(data);
                    System.out.println("Output" + output);
    
                    fconn.close();
                    return output;
                }
                else
                {
                    System.out.println("File does not exist");
                    fconn.close();
                    return null;
                }
            }
            catch (Exception ioe) {
    
               System.out.println("Error:   " + ioe.toString());
               return null;
            }
    
        }
    

    When I try to write a string to a file and then read it again, I get a NullPointerException. When I check the folder that mimicks card SD card on my pc, there is no file created. is the above code ok?

    P.S. I use a simulator of the OS 5.0 and the SD card directory is configured to be somewhere on my desk.

    It is incredibly baroque and inefficient code for a simple job; be happy that you do not claim credit for it.

    A problem may be that the FileConnection in writeFile is not closed. I would rewrite the mess like this (leaving a part of the diagnostic output):

    private void writeFile(String data, String filePath) {  data = data.trim();  OutputStream out = null;  FileConnection conn = null;  try {     conn = (FileConnection) Connector.open(filePath,Connector.READ_WRITE);    if (!conn.exists()) {      conn.create();    }    OutputStream out = conn.openOutputStream();    // it might be advisable to specify an encoding on the next line.    out.write(data.getBytes());  } catch (Exception io) {    test.setText("Exception Thrown from File " + io);  } finally {    if (out != null) try { out.close(); } catch (IOException ignored) {}    if (fconn != null) try { fconn.close(); } catch (IOException ignored) {}  }}
    
    private String readFile(String filePath) {  String result = null;  InputStream input = null;  FileConnection conn = null;  try {    fconn = (FileConnection) Connector.open(filePath, Connector.READ);    if (fconn.exists()) {      input = fconn.openInputStream();      byte[] bytes = IOUtilities.streamToBytes(input);      // it might be advisable to specify an encoding on the next line.      result = new String(bytes);    } else {      System.out.println("File does not exist");    }  } catch (Exception ioe) {    System.out.println("Error: " + ioe.toString());  } finally {    if (input != null) try { input.close(); } catch (IOException ignored) {}    if (fconn != null) try { fconn.close(); } catch (IOException ignored) {}  }  return result;}
    
  • Event Viewer error "there was an error while trying to read the local hosts file." file "hosts" but good

    Hello

    In Event Viewer, I see a lot of mistakes like:

    Source: The customers DNS events

    There was an error trying to read the local hosts file.

    I read that threat indicating to rename the hosts for "hosts" file

    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-networking/system-log-shows-repeating-error-code-3221225485/3700e855-ded4-4F12-960f-1577f6132c04

    HOWEVER, the name of the file in my computer appears as it should

    C:/Windows/System32/drivers/etc / "hosts".

    and the content of the file is as it is supposed to be according to: http://support.microsoft.com/kb/972034

    What should I do to fix this error?

    P.S. I suspect my computer is compromised. Last weekend, Security Essentials has reported a malicious file backdoor and it has been deleted, but I have a weird behavior of the computer

    Thank you

    Veronica

    Try to re-create the hosts file.

    Open Notepad as administrator (click right on the Notepad icon or shortcut and click Run as admin) and type the following information in it:

    127.0.0.1 localhost

    : 1 localhost

    The '1' in the '127.0.0.1' must be in the first column of the line and there must be at least one space between "127.0.0.1" and "localhost". In the second line, there must be at least one space between ": 1" and "localhost".

    Save the file with name "hosts" in the C:\windows\system32\drivers\etc folder.

    Source: http://www.sevenforums.com/system-security/130518-hosts-file-missing-should-i-worry.html

    You seem to have a hard drive problem. Please provide a copy of your system information file. Type the system information in the search box above the Start button and press the ENTER key (alternative is select Start, all programs, accessories, System Tools, system information). Select file, Export and give the file a name noting where it is located. Not to place the cursor in the body of the report before exporting the file. The system creates a new information file system each time system information is available. You must allow a minute or two before the file is completely filled before exporting a copy. Please download to your OneDrive (formerly Sky Drive), share with everyone and post a link here. Normal mode preferred report. Please say if the report was obtained in safe mode.

  • Change .txt and write to the file system

    Hello!

    I created composite simple soa with BPEL process that read the .txt file and write to the file system.

    txt file have this structure:

    < ns1:Record - 1 >

    < ns1:Field - > 123 ABC < / ns1:Field - Somename>

    < / ns1:Record - 1 >

    < ns1:Record - 1 >

    < ns1:Field - unnom > 34 < / ns1:Field - Somename>

    < / ns1:Record - 1 >

    . . .

    < ns1:Record - n >

    < ns1:Field - unnom > 432 < / ns1:Field - Somename>

    < / ns1:Record - n >


    For example the input file are < ns1:Record - 1 > appears twice and < ns1:Record - 2 > appears three times in the file.

    In the output file, I want that < ns1:Record - 1 > occurs three times and < ns1:Record - 2 > occurs four times - more initial registration amount 1

    How is it possible to do? Thank you.

    Hello

    Good to know that your problem is solved.

    Your solution to the problem (copy methods and insertAfter bpel) seems to be very well and works as planned including the edge cases. Rather than use the counters, you could use the "count" in clause () method in .

    (Ex: $Invoke1_Write_InputVariable.body / ns3:Record - 1 [count($InputVariable.body/ns3:Record-1)])

    The snippet of Java code that you plan to use works very well when the records are sorted (ascending). You could do the same thing in bpel code too, but I prefer to implement the same using the method described above.

    Hope that my updates have been useful for you.

    See you soon.

  • How Business Service (file protocol) can read the location of the server XML file


    Hi Experts,

    I have a use case where I have to expose a Web service and as a response, I send a large xml (size max would be 18 MB).

    Customer <>- ProxyService (exposed as a Web service) <>- BusinessService (File protocol) < - read - > File.xml

    Here the xml response must be stored in the "SomeName.xml" file in the directory of the same server share path.

    So when the Client calls ProxyService, inturn would call it BS, where BS inturn would have read the contents of the xml file and pass it back as a response to the customer via PS

    Challenge is here using Protocol of file I can't do BS to read the xml file, instead his writing in a new file with conent as input message.

    Can someone let me know is it possible to read a xml file using business service.

    Note: I know that the PS can read a file using the Protocol of files, but my BS need use cases to read the contents of the file.

    Any quick response is more significant.

    Thank you

    Deba

    Cannot use the OSB in this case file adapter, you need to use a file in OSB JCA adapter. Specifically, what is called a 'synchronous reading' JCA adapter type file. Can be created in JDeveloper and then pulls in EPCO, can then be invoked as you want to extract the contents of a file synchronously in a proxy stream.

Maybe you are looking for