Write File

Ok, last version of OracleBPEL PM,Axis,Tomcat...
I want to create a file composed by 4 fields.
I invoke a simple WS using a variable int and i received an int. I repeated it 4 times and i put these values in the fields of a variable to write it in file.That's works!
I created the schema step1,step2,step3,step4
first,second,third,fourth.
I checked the first row as header. I specified the step1,2,3,4 were int/integer (?)
but i got this error.
<bindingFault xmlns="http://schemas.oracle.com/bpel/extension">
<part name="code">
<code>null</code>
</part>
<part name="summary">
<summary>file:/C:/Programmi/OracleBPELPM1/integration/orabpel/domains/default/tmp/.bpel_Communicator_1.0.jar/Write.wsdl [ Write_ptt::Write(Root-Element) ] - WSIF JCA Execute of operation 'Write' failed due to: Errore di conversione. Errore durante la conversione di un messaggio in formato nativo. ; nested exception is: ORABPEL-11017 Errore di conversione. Errore durante la conversione di un messaggio in formato nativo. Verificare lo stack di errori e correggere la causa dell'errore. Contattare il Supporto Oracle se non è possibile correggere l'errore.</summary>
</part>
<part name="detail">
<detail>null</detail>
</part>
</bindingFault>
Help!!!All values are int!!!
Thanks
Ema

Hi Emanuele,
Can you please post the BPEL Process and the XSD File created by the File Adapter (NXSD) Wizard? Also the Audit trace from the Console?
It looks like the tranlation is failing in the file adapter while writing to the file.
Also if possible can you please send the BPEL Process Project and the Webservice from where you are getting the values.
Regards,
Dhaval

Similar Messages

  • JNI Invocation: open file in Java, write file in CPP

    Hello,
    Warning: I am a dunce, bad CPP code ahead!
    Using JNI invocation, I am trying to read a binary file in Java and write it in CPP.
    Everything compiles and runs without error, but the input and output jpg files are of course different.
    TIA to any help,
    kirst
    (begin ByteMe.java)
    import java.io.*;
    public class ByteMe
        // Returns the contents of the file in a byte array.
        public byte[] getBytesFromFile(String strInfo) throws IOException
            System.out.println("Testing:" + strInfo);
            File file = new File("1.jpg");
            InputStream is = new FileInputStream(file);
            // Get the size of the file
            long length = file.length();
            // Create the byte array to hold the data
            byte[] bytes = new byte[(int)length];
            // Read in the bytes
            int offset = 0;
            int numRead = 0;
            while (offset < bytes.length
                   && (numRead=is.read(bytes, offset, bytes.length-offset)) >= 0) {
                offset += numRead;
            // Ensure all the bytes have been read in
            if (offset < bytes.length)
                throw new IOException("Could not completely read file "+file.getName());
            // Close the input stream and return bytes
            is.close();
            return bytes;
        public ByteMe()
              //System.out.println("in constructor");
    }(end ByteMe.java)
    (begin ByteMe.cpp)
    #include <stdlib.h>
    #include <string.h>
    #include <jni.h>
    #include <windows.h>
    // for file operations:
    #include <fstream>
    int main( int argc, char *argv[] )
         JNIEnv *env;
         JavaVM *jvm;
         JavaVMInitArgs vm_args;
         JavaVMOption options[5];
         jint res;
         jclass cls;
         jmethodID mid;
         jstring jstr;
         jobject obj_print;
         options[0].optionString = "-Xms4M";
         options[1].optionString = "-Xmx64M";
         options[2].optionString = "-Xss512K";
         options[3].optionString = "-Xoss400K";
         options[4].optionString = "-Djava.class.path=.";
         vm_args.version = JNI_VERSION_1_4;
         vm_args.options = options;
         vm_args.nOptions = 5;
         vm_args.ignoreUnrecognized = JNI_FALSE;
         // Create the Java VM
         res = JNI_CreateJavaVM(&jvm,(void**)&env,&vm_args);
         if (res < 0)
              printf("Can't create Java VM");
              goto destroy;
         cls = env->FindClass("ByteMe");
         if (cls == 0)
              printf("Can't find ByteMe class");
              goto destroy;
         jmethodID id_construct = env->GetMethodID(cls,"<init>","()V");
         jstr = env->NewStringUTF(" from C++\n");
         obj_print = env->NewObject(cls,id_construct);
         // signature obtained using javap -s -p ByteMe
         mid = env->GetMethodID(cls, "getBytesFromFile", "(Ljava/lang/String;)[B");
         if (mid == 0)
              printf("Can't find ByteMe.getBytesFromFile\n");
              goto destroy;
         else
              jbyteArray jbuf = (jbyteArray) env->CallObjectMethod(obj_print,mid,jstr);
              jlong size = jsize(jbuf);
              printf("size is: %d\n", size); // size shown in output is
              std::ofstream out("data.jpg", std::ios::binary);
              out.write ((const char *)jbuf, 100000);     
         destroy:
             if (env->ExceptionOccurred())
                env->ExceptionDescribe();
        jvm->DestroyJavaVM();
    }(end ByteMe.cpp)

    Hello,
    Me again. Well, not such a dunce after all. Here is code that works correctly, and compiles with no errors and no warnings.
    Will much appreciate help with clean-up code.
    TIA,
    kirst
    (begin ByteMe.java)
    import java.io.*;
    public class ByteMe
        public long getFilezize(String strInfo) throws IOException
              // demonstrates String parameter passed from CPP to Java:
              System.out.println("(getFilesize) Hello world" + strInfo);
              File file = new File("1.bmp");
              InputStream is = new FileInputStream(file);
              // Get the size of the file
              long length = file.length();
              is.close();
              return length;
        // Returns the contents of the file in a byte array.
        public byte[] getBytesFromFile(String strInfo) throws IOException
            System.out.println("(getBytesFromFile) Hello world" + strInfo);
            File file = new File("1.bmp");
            InputStream is = new FileInputStream(file);
            // Get the size of the file
            long length = file.length();
            System.out.println("length is: " + String.valueOf(length));
            // Create the byte array to hold the data
            byte[] bytes = new byte[(int)length];
            // Read in the bytes
            int offset = 0;
            int numRead = 0;
            while (offset < bytes.length && (numRead=is.read(bytes, offset, bytes.length-offset)) >= 0)
                offset += numRead;
            // Ensure all the bytes have been read in
            if (offset < bytes.length)
                throw new IOException("Could not completely read file "+ file.getName());
            // Close the input stream and return bytes
            is.close();
            return bytes;
        public ByteMe()
              //System.out.println("in constructor");
    }(end ByteMe.java)
    (begin ByteMe.cpp)
              Signature obtained with command:
                   "C:\Program Files\Java\jdk1.5.0_15\bin\javap.exe" -s -p ByteMe
                   Compiled from "ByteMe.java"
                   public class ByteMe extends java.lang.Object{
                   public long getFilezize(java.lang.String)   throws java.io.IOException;
                     Signature: (Ljava/lang/String;)J
                   public byte[] getBytesFromFile(java.lang.String)   throws java.io.IOException;
                     Signature: (Ljava/lang/String;)[B
                   public ByteMe();
                     Signature: ()V
         Compiled VC++ 2005 Express, run on Vista
    #include <stdlib.h>
    #include <string.h>
    #include <jni.h>
    // file operations
    #include <fstream>
    int main( int argc, char *argv[] )
         JNIEnv *env;
         JavaVM *jvm;
         JavaVMInitArgs vm_args;
         JavaVMOption options[5];
         jint res;
         jclass cls;
         jmethodID mid;
         jmethodID sizeid;
         jstring jstr;
         jobject obj_print;
         jlong filesize;
         options[0].optionString = "-Xms4M";
         options[1].optionString = "-Xmx64M";
         options[2].optionString = "-Xss512K";
         options[3].optionString = "-Xoss400K";
         options[4].optionString = "-Djava.class.path=.";
         vm_args.version = JNI_VERSION_1_4;
         vm_args.options = options;
         vm_args.nOptions = 5;
         vm_args.ignoreUnrecognized = JNI_FALSE;
         // Create the Java VM
         res = JNI_CreateJavaVM(&jvm,(void**)&env,&vm_args);
         if (res < 0)
              printf("Can't create Java VM");
              goto destroy;
         cls = env->FindClass("ByteMe");
         if (cls == 0)
              printf("Can't find ByteMe class");
              goto destroy;
         jmethodID id_construct = env->GetMethodID(cls,"<init>","()V");
         printf("%s\n",id_construct);
         jstr = env->NewStringUTF(" from C++!\n");
         if (jstr == 0)
              // Normally not useful
              printf("Out of memory (could not instantiate new string jstr)\n");
              goto destroy;
         obj_print = env->NewObject(cls,id_construct);
         //BEGIN BLOCK to get file size
         sizeid = env->GetMethodID(cls, "getFilezize", "(Ljava/lang/String;)J");
         if (sizeid == 0)
              printf("Can't find ByteMe.getFilezize\n");
              goto destroy;
         else
              printf("got here\n");
              filesize =(jlong) env->CallObjectMethod(obj_print,sizeid,jstr);
              printf("got filesize\n");
         // END BLOCK to get file size
         // BEGIN BLOCK to write file
         mid = env->GetMethodID(cls, "getBytesFromFile", "(Ljava/lang/String;)[B");
         if (mid == 0)
              printf("Can't find ByteMe.getBytesFromFile\n");
              goto destroy;
         else
              jbyteArray ret =(jbyteArray) env->CallObjectMethod(obj_print,mid,jstr);
              // Access the bytes:
              jbyte *retdata = env->GetByteArrayElements(ret, NULL);
              // write the file
              std::ofstream out("data.bmp", std::ios::binary);
              //out.write ((const char *)retdata, 921654);
              out.write ((const char *)retdata, (long)filesize);
         // END BLOCK to write file
         destroy:
             if (env->ExceptionOccurred())
                env->ExceptionDescribe();
        jvm->DestroyJavaVM();
    }(end ByteMe.cpp)

  • How to write Header and Footer elements in Write file Adapter

    Hi,
    I have a requirement to write the file.The write file contains header and footer elements ,how we can write these elements. These elements are fixed for all files.these are not come from any input.below is the sample file.
    $begintable
    name,Id,Desg
    ad,12,it
    $endtable

    Hi,
    I have created the XSD for you, and i created a sample SOA Composite which writes the file same like what you want, the below XSD can write a file with one header record, multiple data records and one trailer record.
    <?xml version="1.0" encoding="UTF-8" ?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
    xmlns:tns="http://TargetNamespace.com/WriteFile"
    targetNamespace="http://TargetNamespace.com/WriteFile"
    elementFormDefault="qualified" attributeFormDefault="unqualified"
    nxsd:version="NXSD" nxsd:stream="chars" nxsd:encoding="UTF-8">
    <xsd:element name="Root-Element">
    <xsd:complexType>
    <!--xsd:choice minOccurs="1" maxOccurs="unbounded" nxsd:choiceCondition="terminated" nxsd:terminatedBy=","-->
    <xsd:sequence>
    <xsd:element name="RECORD1">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="header" type="xsd:string"
    nxsd:style="terminated" nxsd:terminatedBy="${eol}"
    nxsd:quotedBy='"'/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="RECORD2" minOccurs="1" maxOccurs="unbounded">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="data1" type="xsd:string"
    nxsd:style="terminated" nxsd:terminatedBy=","
    nxsd:quotedBy='"'/>
    <xsd:element name="data2" type="xsd:string"
    nxsd:style="terminated" nxsd:terminatedBy=","
    nxsd:quotedBy='"'/>
    <xsd:element name="data3" type="xsd:string"
    nxsd:style="terminated" nxsd:terminatedBy="${eol}"
    nxsd:quotedBy='"'/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="RECORD4" nxsd:conditionValue="$endtable">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="trailer" type="xsd:string"
    nxsd:style="terminated" nxsd:terminatedBy="${eol}"
    nxsd:quotedBy='"'/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    Hope this helps,
    N

  • Error while relocating (Can't write file (no space)) - Help please

    I have been having trouble relocating master files since upgrading to Leopard. The problem doesn't seem to affect only Aperture. I can happen when using Finder or another application to move files from one drive to another. Other types of files don't seem to be affected, just my library of image files.
    The copy operation runs for a while then hangs up. The application doing the copy reports an error that that's the end. Aperture gives this error message: Error while relocating (Can’t write file (no space)). The Finder reports plenty of available space on the destination drive!
    I remember seeing a thread--but can't find it now--about a problem with certain xmp metatdata embedded into files causing problems with file operations.
    Hoping for a solution!
    Message was edited by: thomas80205

    It's possible that you might have a corrupt file. Have you tried to copy different files on to the destination drive? If those files copy fine, then narrow down the offending file by copying less images at a time.

  • WARNING: Cannot "Read or Write" files on iPod

    My iPod has been behaving very curiosly as of late. For the past month a wanring has flashed up on my iTunes screen when attempting to sync music files. The warning says *"Cannot read the disk 'iPod'. Unable to read or write files"*. Despite this warning my iPod has been able to update daily podcasts without issue. However, when I recently purchased new music I could not get it to sync to my iPod. I have no problem listening to this new album in my iTunes library, but it just will not sync to my iPod. I created a playlist for it and attempted to add it, but I discovered that the iPod was not syncing the playlists either!
    In a recent attempt to remedy the problem I selected only to sync the playlist that had the new album. What happened was frightening. All my music was no longer on the iPod, with the exception of my podcasts! I tried altering the settings to return all the music, but now I am unable to add any of my music from the library.
    I am wondering if anyone has experienced this difficulty before, and if so, if they have any trouble shooting techniques. I have already been ti Apple's support page and completed the 5 recommended steps, to no avail. Any suggestions or thoughts as to what might be occuring.

    Luckily, backing up your itunes library is easy. Just duplicate the folder(s) with your music in it. (Most likely, it's user/Music/ITunes.) Once the copy is made, you might want to move it to a different part of your hard drive.
    Now, restoring your ipod WILL wipe the device. If there's anything on your ipod that isn't in your itunes library (unlikely but possible), you want to make sure you've got a copy of it somewhere before restoring.
    Before restoring, check to see if there is an update to the ipod's firmware that needs to be installed. This is a "longshot" but might help. Just click the "check for update" button on the ipod's "Summary" pane in itunes. (Current version is 1.2.3, I think).

  • Fstream can't read or write files 4GB even with -m64?

    Using C++-style streams, I have been unable to read or write files >4GB. For example, when writing 5GB in one go, I get only 1GB. The header for write uses the type streamsize for the size parameter, and according to sizeof, streamsize is 8 bytes (when using -m64). Looking at the assembly for a simple testcase, I verified that size parameter was not truncated before calling the write function.
    What makes this interesting is that I can read or write large files if I do it in the C-style (fopen, fwrite, fclose) or if I use the C++ functions and manually do it in 1GB blocks. I tried the instructions for LFS, but they didn't work and it seems like it shouldn't since this is C++ and I am building a 64-bit app. I have observed this with solaris studio 12.3 and 12.4.
    Is this a bug or am I missing a compiler flag?
    A simple testcase to expose this:
    #include <iostream>
    #include <fstream>
    #include <stdio.h>
    using namespace std;
    int main() {
      streamsize goal_size = ((int64_t) 1<<32) + ((int64_t) 1<<30);
      cout << goal_size << endl;
      char* data = new char[goal_size];
      fill(data,data+goal_size,'c');
      FILE* f = fopen("classic.data","w");
      fwrite(data,1,goal_size,f);
      fclose(f);
      fstream file("stream.data", std::ios::out | std::ios::binary);
      file.write(data,goal_size);
      file.close();

    Eh... sorry, didnt read the source close enough
    I can reproduce your misbehavior when compiling "by default" (with default -library=Cstd).
    It fails somewhat differently with Apache STL (-library=stdcxx4), which is kinda the modern version of Cstd.
    It works fine when compiling with -library=stlport4, or -library=stdcpp (-std=c++11).
    Looks like it is a deficiency of those particular STLs.
    regards,
      Fedor.

  • How to write file at server end?

    Hi,
    I use a af:inputFile component to receive uploaded files. And want to write files to the directory of server. However, when execute java.io.File.createNewFile(), it throw exception. How to resolve it?
    import org.apache.myfaces.trinidad.model.UploadedFile;
    import javax.faces.event.ValueChangeEvent;
    import java.io.InputStream;
    import java.io.File;
    public class UploadFileHandler {
        public void doUpload(ValueChangeEvent event) throws IOException {
            File file = new File("C:\temp.txt");
            *file.createNewFile();* //Error happen here.
    }

    Hi Cheney,
    It is good practice to use System.getProperty("file.separator") instead of hardcoding "/" or "\" .
    Though your issue is resolved by using "//", you might want to consider changing to the above.
    -Arun

  • How to write file to server side?

    hello,
    Could anyone pls help me...
    I just want to see an example how can I write to a file that is placed at the server(save place as the applet).
    p.s. I have been successfully read a file from there...
    Suppose I have signed the applet (self-signed), anymore security problem I need to pay attention to?
    Thanks a lot!!

    hi mandy, from the applet u can send the file to be written into the server to a servlet running in server and the servlet can in turn write the file into the servlet. by applet - servlet communication, u can easily read and write files to the server.

  • Cannot Write Files to my Formatted External Hard-drive

    I've been struggling with this problem for awhile now. I have a 200GB external hard drive that I used on my windows box. I have music on it and would like to use it on my macbook. When I plug it into my macbook, it mounts and shows up on the desktop. I can go into it in finder, and view the files and folders that are on it. I can also create new folders. However, when I try to read or write files to/from the hard drive, finder stalls at 'zero KB of x MB written'. If I try to copy a file to the drive, the file will be created but it will be of zero or very very small size.
    I reformatted the drive with Disk Utility and also via the command line with 'diskutil reformat /dev/disk1s5' and these reformat the drive successfully, but the same problems occur.
    What could be going on? The drive is not faulty, and it mounts just fine. I just can't read or write from the drive in OS X.
    Please help! Thank you in advance.

    The NTFS file format is not really that compatible with macs (you can only "read" files, but not "write" to them). Also, while you can reformat a hard drive with the same or different file type, the NTFS type is the only one that will not let you go from having a NTFS formatted drive and reformatting it as a different format (you can do it again as NTFS but that's it). If you have a FAT or FAT32 formatted drive, you can go and reformat it as NTFS, but once it has had the newer windows format style done to it, you can't change it to anything else.
    Also, as I think you said you could read from it at first, and then were not able to?, this would be because the reading of the files would have been fine, but as soon as you went and reformatted it again (which basically wipes the slate clean), you lost all the data that possibly was on there, and now as an NTFS format with no data, therefore nothing for a Mac to get a chance to "read", you have nothing and can only use this as an NTFS drive for windows (or any other possible OS that is NTFS compatible).
    Sorry about the bad news... Try to sell it to a windows person and get another external hard drive (formatted as FAT32 or not pre-formatted yet, then format as FAT32) so that you can use that with your Mac...

  • How can i format my external hard drive to write files from Mac without loosing the files that i alredy have on my external hard when i used it with windows?

    How can i format my external hard drive to write files from Mac without loosing the files that i alredy have on my external hard when i used it with windows?
    I have been using Windows to write files to my 1TB WD external hard drive and I do not want to format to loose the files capacity of around 500GB
    Someone, Please help

    Hi Allen,
    Is there any way to store the back up to Mac and restore after formating?

  • StarOffice 8 - finding all different font types in a Writer file

    Hello,
    I am currently using StarOffice 8 on a Windows XP system.
    I frequently transfer a large Writer (.odt) file between different computer systems as I constantly update the file with new information. As part of the updates, I use different fonts. As I install a particular font on one machine, this font may not be installed on another machine when I add new information to the file on that particular machine.
    When I open the Writer file on a machine that has some font not installed, the WYSIWYG appears incorrectly (since the proper font is not installed on that computer, of course) but if you highlight the incorrectly-displayed info, it says what the font type should be (ie, "WP Hebrew David" font). I then go online to download that specific font type for this the computer. Then the data is displayed correctly.
    When you have many, many different font types used in a file, it is hard to keep track of all different fonts used. Before anyone questions me on using so many different fonts in a file, it is important for my file to visually display the correct data, and this means using a quantity of fonts.
    What I am wondering is the following:
    Is there a way from within StarOffice 8 to scan a particular file and then let the user know every different font name used in that file?
    That way, if the file contains a font which was used on another machine but not currently installed on the current machine -- when I am updating information in the file -- I can then see a list of fonts used and then install new fonts accordingly after checking to see if they are installed (by checking the Fonts folder in C:/Windows)
    I hope this makes sense, or is it "clear as mud"?
    Please excuse my bad English grammar as I am not a native English speaker, but have picked it up living in Canada for the last 20 years :-)
    Cheers & thanks in advance for any help !
    David
    Edited by: Broad_Arrow on May 18, 2009 11:18 PM

    May 20 2009
    There is a Fonts Used macro writer_printAllFonts.sxw Further checking this is the wrong StarBasic macro. The one I use came from an OOo forum I think. I use it with SO7, SO8 and SO9.
    It is at the end of this message. To install it:
    [1] Copy the macro below to the clipboard
    [2] Go to Tools>Macros>Organize Macros>Basic>Standard
    Select New. Highlight what is there, paste, and close.
    [3] Go to Tools>Customize>Menus>Tools
    Highlight Word Count, then go to Add>Macros>My Macros>Standard>Module1
    Highlight FontsUsed, Click Add, Close, Ok
    Phil
    REM ***** BASIC *****
    Sub Main
    End Sub
    Sub FontsUsed 'Version 1 John Vigor 4/25/06
    'List fonts used in Writer document. Appears to work in normal text,
    'Sections, normal Tables, and Frames. Will currently crash on a Table
    'within a Table.
    oDoc = ThisComponent
    Dim fonts as Integer: Dim aFonts(1)
    oTC = oDoc.Text.createTextCursor
    oTC.goRight(1,true) : CurrentFont = oTC.charFontName
    fonts = fonts + 1 : aFonts(fonts) = CurrentFont
    REM Do "normal" text.
    partEnum = oDoc.Text.createEnumeration
    PartEnumerator(partEnum,CurrentFont,fonts,aFonts())
    REM Do Frames.
    oFrames = oDoc.getTextFrames
    If oFrames.Count > 0 then
    fonts = fonts + 1 : ReDim Preserve aFonts(fonts)
    aFonts(fonts) = "NEW FONTS, IF ANY, FOUND IN FRAMES:"
    For I = 0 to oFrames.Count - 1
    thisFrame = oFrames.getByIndex(I)
    partEnum = thisFrame.createEnumeration
    PartEnumerator(partEnum,CurrentFont,fonts,aFonts())
    Next
    EndIf
    REM Prepare list.
    For I = 1 to fonts
    s = s & aFonts(I) & Chr(10)
    Next
    iAns = MsgBox(s,4,"FONTS FOUND. Create font list document?")
    If iAns = 7 then
    End
    Else
    NewDoc = StarDesktop.loadComponentFromURL("private:factory/swriter"," blank",O,Array())
    oVC = NewDoc.CurrentController.getViewCursor
    oVC.String = s : oVC.collapseToEnd
    EndIf
    End Sub
    Sub PartEnumerator(partEnum,CurrentFont,fonts,aFonts())
    While partEnum.hasMoreElements
    thisElement = partEnum.nextElement
    If thisElement.supportsService("com.sun.star.text.Paragraph") then
    portionEnum = thisElement.createEnumeration
    PortionEnumerator(portionEnum,CurrentFont,fonts,aFonts())
    ElseIf thisElement. supportsService ("com.sun.star.text.TextTab le") then
    Cols = thisElement.getColumns.Count - 1
    Rows = thisElement.getRows.Count - 1
    For C = 0 to Cols
    For R = 0 to Rows
    thisCell = thisElement.getCellByPosition(C,R)
    cellEnum = thisCell.createEnumeration
    While cellEnum.hasMoreElements
    thisPara = cellEnum.nextElement
    portionEnum = thisPara.createEnumeration
    PortionEnumerator(portionEnum,CurrentFont,fonts,aFonts())
    Wend
    Next
    Next
    EndIf
    Wend
    End Sub
    Sub PortionEnumerator(portionEnum,CurrentFont,fonts,aFonts())
    Dim found as Boolean
    While portionEnum.hasMoreElements
    thisPortion = portionEnum.nextElement
    thisFont = thisPortion.charFontName
    If thisFont <> CurrentFont then
    For I = 1 to fonts
    If aFonts(I) = thisFont then found = true: Exit For
    Next
    If found then
    CurrentFont = thisFont : found = false Else
    fonts = fonts + 1 : ReDim Preserve aFonts(fonts)
    aFonts(fonts) = thisFont : CurrentFont = thisFont
    EndIF
    EndIf
    Wend
    End Sub

  • How to read write file in HTML5 extension

    Hi,
    I think it could be very generic question since moving from Flex to HTML5 extension is loosing ability to read write a file in local file system.
    I'm trying to write a log file within extension space but It throws error as 'TypeError: Illegal constructor'
    new File(csInterface.getSystemPath(SystemPath.EXTENSION)+"/log/Log_"+.getCurrentDateString+".txt");
    does someone have solve for this.
    Thanks in advance
    MM

    Yeah, It could be a reason for nested error but I got the error right before executing "getCurrentDateString". But I kind of figured it out as Javascript looses ability to read write file in user file system except Crome browser, you can read more here. However Adobe has added fs API within CEP which allows user to read and write file in user system.
    Here is some peace of code on how to do it, complete API reference check here :
    var result = window.cep.fs.writeFile(logFilepath, "Your data goes here");
      if(result.err != 0)
      throw new Error("Result object has error");
    However still this does not provide any method to append the content in existing file as a result if you wanted to write kind of log file, every time you need to first read the file and then concatenate your content to file data then write data again to new file. sound hefty to append content?
    I'm hoping if any Adobe staff has any comment on this.
    Thanks
    MM

  • Write file in pda

    Hi!
    Find attached a file which stores two variables (x, y) in a file .txt every time the button "Run" is pressed. I don't know why, but in Pocket Pc it doesn't work: the file .txt is created correctly, but this file is empty.
    0,3232     

    Hello.
    I have been able to solve my probelm. I attach the program for if somebody wants to use it.
    Greta
    Attachments:
    write file.vi ‏52 KB

  • Write file to directory

    Hi,
    all the while i am able to write file to different apps directories...
    just recently i asked Basis to create one more directory for which i am not able to write file...
    I tried to put the same file in older directory, which i am able to do.
    i tried CG3Z to keep the file but in vain and finally i tried command promt to put the file there the message is no authorizations...
    Mainly my question is:
    Is it possible to restrict USER ID for particular directory?
    Where can i check the authorizations...

    Hi,
    As per my understanding i should have
    S_DATASET
    S_RZL_ADM
    Can anyone suggest me!

  • Write to file??? looking for a solution to write file to the server

    Dear all,
    Since most browsers forbid all file access, so is there is another way to write file to server in applet??? or is there an alternative using combination of JSP??
    Thank you for your attention,
    Dan

    If you have access to the server you are writing the file to then you could have your applet collect information and send it to the server in a form. Then write a bean or other class that handles it and writes it to the server.

  • Enable to have the Write File to Citadel Example working

    Did somebody already run the Write File to Citadel Example with success ?
    This exemple aims at Importing Spreadsheet Data to the Citadel Database, and is given in the NI developer Zone --> Development Library --> Labview --> DSC --> Data Logging.
    I can run the exemple as described without any visible problem. But when I look at Citadel (through MAX), I can't find any trace of the data I imported (sine_wave_one for instance). According to the SampleSpreadsheet.csv I used for import, I should find a trace in the database around the 21st of march 2002...
    But I found nothing.
    Any help?
    Thanks,
    Hélène.

    I am not sure how savvy LabVIEW programmer you are, but if you feel confident you can go ahead and try to debug the code.
    The VI based servers are running on the background. You can however make the front panel visible during the execution - not the diagram. The debugging means you have to create a few indicators on the panel that will show what is going on on the diagram.
    These are the steps the enable the front panel during the execution:
    1) Open the Write File to Citadel Server VI
    2) File>>VI properties; select Window Appearance
    3) Click Customize and check the Show FP when called and Show FP when loaded
    4) Save it and relaunch the engine!
    When you start the engine again, you should get th
    e server front panel. Once you'll have some indicators on the FP you'll be able to learn more about what is going on in the VI.
    I have noticed that sometimes the example pops up with a File dialog box. I found out this was related to a race condition in the example. I am not sure if that's what you see.
    Let me know.
    Also if the example executes you should see the tag values changing - for example the string tags starts with "Row 0", "Row 1" ...
    Is that what you see?
    Dr.Tag

Maybe you are looking for

  • One line item in po from multiple line items of Purchase Requisition

    Can we merge multiple line items for same item from different different purchase requisition into a single line item in Purchase Order ? For example, say department A and B made two different purchase requisition for 1 number of computer system. Now

  • Finder won't let me view any of by burned photo cd's.

    I've backed up lots of photos to CD. Whenever I do this I check they have been burned properly before erasing them from my mac. Today decided to have a look at some previously burned CD's. At first the CD didn't appear on the desktop at all so I chan

  • MacBook Pro - no battery

    Is it ok/safe to run my MacBook Pro without a battery? - it bulged and am in heated debate with store as to who is going to pay for new battery. It's plugged in running of mains just fine, but am unsure whether this is ok for my laptop. Thank you.

  • Sales area and sales doc

    Hi how can I configure the system where all sales document type can be allowed for all the sales area. and this means i dont require to assign sales area and sales doc type into OVAZ.

  • Dutch Language Installation

    Hi, We have a situation. Initially we had English language as default language installation. Later we had a requirement to have Dutch language. Our basis consultant did the necessary installtion. Post installation when we checked the initial logon sc