Using tie-classed to change name of file uploaded through FTP protocol srvr

Hi,
I'm trying to use the extendedPreAddItem (or Post) method in an S_TieFolder class to automatically change the name of a file (an S_PublicObject) when it enters a Folder (via an FTP put upload).
I'm fiddling around with code like this:
AttributeValue val = AttributeValue.newAttributeValue(newDocName);
val.setName(Document.NAME_ATTRIBUTE);
rightpo.setAttribute(val);
But it does not work: in the FTP client the filename is indeed changed, but somewhere at lower levels the original filename is still being used...
Any helpfull ideas would be appreciated.
TOon

I'm aware of this... My ftp-client (FTP-Voyager) will prompt me if I "put" a file that already exists in the remote folder, and ask me to go ahead and replace the file, or cancel the put-operation.
However in this case the ftp-client sees file X' remotely and I'm putting file X, so it does not prompt me at all...
Stopping and restarting the FTP-client (in case it caches remote folder-contents...) does not change the behaviour.
Timewise this is what happens:
1) I put file X.
2) My S_TieFolder class (extendedPreAddItem) changes it's name into X'.
3) The ftp-put successfully completes
4) I refresh the remote folder contents and see the X' name instead of the original X name.
5) I re-put X (and would now like to have it changed into file X'').
6) Before my S_TieFolder code executes, something (I'm still suspecting the cm-sdk) deletes the X' file first... ==> the logfile does not show any communication with the ftp-client here now.
7) Then my S_TieFolder code executes and changes the name into X''.
8) I refresh the remote folder contents: File X' disappears, file X (just re-put) changes into X''.
More testing has shown that I'm also not able to delete these files (whose names have been changed by S_TieFolder): 'file does not exist' error.
I need to know:
a) If changing the files name on-the-fly using S_Tie class is supported at all.
and
b) if so, what am I doing wrong?
Thanks
Toon

Similar Messages

  • How can I uniquely identify computers on the same network/account specifically for airdrop use?  When I change name on one computer under contacts if changes on all computers.

    How can I uniquely identify computers on the same network/account specifically for airdrop use?  When I change name on one computer under contacts it changes on all computers.  I would like to change icon and name for each computer.

    you would need to setup a VPN and tunnel into your office.
    FYI..the default ports are 3283 and 5900.

  • How to use FilePermission class to change the file permission in Linux

    Hi all,
    I'm running in a issue related to changing the file permission under Linux environment. I'm using Suse 10.0 Linux and run jdk 1.5 java runtime.
    I want to create a file during execution time and change the permission of the same. I use File.createNewFile() API to create file. By default it does not have all the 3 permission (read,write,execute) for all the user ( user,owner,group). Through program I have to change the file permission ( equal to execute ,chmod 777 filename).I donot want to use runtime.exec() with chmod as the argument , since it creates a process to change the permission which may impact the performance. I want to try FilePermission class , by giving filename and permission as the argument. But it is not changing the permission . Could any one faced this problem ?
    If any body guides me, how to change the permission of the file under Linux using FilePermission class , it would be helpful.
    Thanks,
    Sankar

    How do I set the Umask prior to starting the program
    ? Could pls explain in steps.I don't think umask can help you. The mode mask prevents permission bits from being set when a file is created, but does not force any bits to be set. So if execute permission is not set explicitly when a file is created, umask will do nothing about it.
    But if you want more information about umask, see the man page for your shell script (sh, csh, etc.) or "man 2 umask".

  • FP-module don't use new *.iak when changing to iak-file on runtime

    Hi folks,
    I'm using FP1001 (RS-485) communication modules with a bank of FP-AI-110
    (8 x AI) and FP-SG-140 (8 x StrainGauge) with LabVIEW 6.1.
    Since I need to change input ranges of the modules on runtime
    (autoranging feature) and there is no vi to manage this, I created a
    couple of iak-files with the FP-explorer (V3.02, build 177), where I set
    the approbiate input ranges. My application then monitors the analog
    input data of the modules and changes the used iak-file as needed to
    prevent over- and underranging.
    When changing the iak-file the current session is closed (FP-Close) and
    the next session is opened with FP-Open and Create Tag, continuing with
    FP-read.
    My application does its' job well, since I monitor the currently used
    iak-file, range and the fact that sessions get closed before opening the
    next, but the FP-modules won't restart using the new range settings,
    after the following session is started with the other iak-file. The
    modules allways keep the previous settings.
    So whats wrong?
    Btw.
    I noticed FP-Explorer also has its problems changing module- ranges,
    after loading a new iak-file.
    So I startup the FP-Explorer with a iak-file for a low range setting
    (module input range) and increase the input voltage at the module input
    just as much that a overrange occurs. Then I load another iak-file with
    higher range-settings. FP-explorer shows the higher range in its range
    column, but when monitoring the module input values, overrange is showed
    first. After restarting monitoring, the input values are showed
    correctly.
    Heres' the problem:
    Loading the previous iak-file again, the overrange should show again,
    since the input value was left at the higher value, as set before. But
    no overrange shows! FP-Explorer monitors the higher input value which
    istn't within the input range, showed in the range column.
    So FP-explorer hasn't switched down the modules range!!!
    Restarting monitoring, or reloading the iak-file doesn't change
    anything. Restarting the FP-explorer shows overrange again when starting
    to monitor values. Restarting monitoring lets the FP-explorer continue
    to monitor the higher input value, which is above the range showed in
    the range column.
    The only thing which helps all the time, is to open the devices context
    menu, then to click on "Edit this device", and click on channel
    configuration. Then a pop-up window asks which setting to use (file or
    device). If I click on file, all the settings of the current used
    iak-file are used correctly.
    Ciao,
    Rainer

    Rainer,
    The FieldPoint IAK File is used in application programs (e.g. LabVIEW, LabWindows/CVI, OPC) for channel names, handle information and scaling information. FP Open.vi launches the FieldPoint Server with the specified IAK file, and uses the information in the specified IAK file for scaling (serial modules require scaling on the computer, ethernet modules scale the data in the network module) but does not re-configure the IO modules according to the IAK file. Likewise, opening an IAK file in FieldPoint Explorer does not reconfigure the IO modules to match the IAK file. The only times that settings are synchronized between the IAK and the modules are when a)the Find Devices command is issued (config from modules loaded), b) the Channel Configuration wi
    ndow is opened (file or module config can be choosen) or c) a Snapshot command is issued (current settings of modules are stored).
    Currently, the FieldPoint Server VI's do not allow dynamic re-configuration of ranges. If you wish to dynamically reconfigure your module ranges, you will need to use the FieldPoint Optomux VI's, which are located under the RT sub-palette of FieldPoint. They are installed by default only if you have LabVIEW RT, so you may need to re-install FieldPoint Explorer (custom install) to get them. For more information on the Optomux commands, please see the FP-1000/1001 Programmers Reference Manual.
    Regards,
    Aaron

  • Help using scanner class to count chars in file

    Hi all, I am learning Java right now and ran into a problem. I need to use the Scanner class to accurately count the number of chars in a file including the line feed chars 10&13.
    This what I have and it currently reports a 201 byte file as having 194 chars:
         File file = new File(plainFile);
         Scanner inputFile = new Scanner(file);
         numberOfChars = 0;
         String line;
         //count characters in file
         while (inputFile.hasNextLine())
              line = inputFile.nextLine();
              numberOfChars += line.length();
    I know there are other ways using BufferedReader, etc but I have to use Scanner class to do this.
    Thanks in advance!

    raichle wrote:
    Wow guys, thanks for the help! I've got a RTFMWell, what's wrong to have a look at the API docs for the Scanner class?
    and directions that go against the specs I said.Is that so strange to suggest a better option? What if I ask a carpenter "how do I build a table with a my stapler?". Should I give the man an attitude if he tells me I'd better use a saw and hammer?
    I'm also aware that it "eats" those chars and obviously looking for a way around that.
    I've looked through the java docs, but as I said, I'm new to this and they're difficult to understand. The class I am auditing req's that this be done using Scanner, but I don't see why you demand an explanation.
    Can anybody give me some constructive help?Get lost?

  • Converting Video to iPod, can you change name of file

    When you convert Video to iPod format, can you change name of the new file or put some "marker" so one can tell which is the orginal and which is the new file?
    Currently it is difficult to tell between the orignal and the new file.
    thanks in advance
    Rohit

    You'd probably be better off doing this sort of editing in iTunes, and letting it move the files appropriately.
    Go to the preferences, Advanced tab, and check the box to 'Keep iTune Music folder organized'. Then any changes you make to song names or other info (within iTunes) will automatically be applied.

  • Using JMX for detecting changes in windows file system?

    Can anybody help to find way to watch changes in windows file system.........Or say files are transfer in mounted drive i want to start access to those files as and when they come in drive.....do not wait while transferring all files ..

    Hi,
    JMX is a technology that will let a Java process expose information to a remote client application.
    It doesn't define what information to expose, but simply how to make it available externally.
    JMX per-se cannot be used to detect the kind of things you describe, but if you are able to detect them, JMX will help you making the information available to external applications.
    Hope this helps,
    -- daniel
    [http://blogs.sun.com/jmxetc|http://blogs.sun.com/jmxetc]

  • Useful Code of the Day:  Multipart Form File Upload

    So, you want to upload files to your web server, do ya? Well, I've seen this topic posted a few times in the last month or so and many of the response I've seen here haven't included definitive answers. Of course, the actual problems vary, but ultimately, a bunch of people want to do file upload from an applet or application to an existing file upload script (CGI, PHP, JSP, etc.) on a web server. And invariably, there are problems with formatting the HTTP request to get things working.
    Well, I had a need to do the same thing. I realize there are other solutions out there, such as some sample code that comes with Jakarta Commons Upload. But since we all like reusable code, and we also all seem to like reinventing wheels, here's my go at it: MultiPartFormOutputStream!
    MultiPartFormOutputStream is a specialized OutputStream-like class. You create your URLConnection to the server (a static method included can do this for a URL for you, as some of the settings, doInput and doOutput specifically, seem to confuse people). Then get the OutputStream from it and create a boundary string (a static method to create one is provided as well) and pass them to the constructor. Now you have a MultiPartFormOutputStream which you can use to write form fields like text fields, checkboxes, etc., as well as write file data (from Files, InputStreams or raw bytes).
    There are some convenience methods for writing primative type values as well as strings, but any higher level objects (aside from Files or InputStreams) aren't supported. (You can always serialize and pass the raw bytes.)
    Sample usage code is below. Also, any recommendations for improvement are requested. The code was tested with the Jakarta Struts.
    import java.io.*;
    import java.net.*;
    * <code>MultiPartFormOutputStream</code> is used to write
    * "multipart/form-data" to a <code>java.net.URLConnection</code> for
    * POSTing.  This is primarily for file uploading to HTTP servers. 
    * @since  JDK1.3
    public class MultiPartFormOutputStream {
          * The line end characters. 
         private static final String NEWLINE = "\r\n";
          * The boundary prefix. 
         private static final String PREFIX = "--";
          * The output stream to write to. 
         private DataOutputStream out = null;
          * The multipart boundary string. 
         private String boundary = null;
          * Creates a new <code>MultiPartFormOutputStream</code> object using
          * the specified output stream and boundary.  The boundary is required
          * to be created before using this method, as described in the
          * description for the <code>getContentType(String)</code> method. 
          * The boundary is only checked for <code>null</code> or empty string,
          * but it is recommended to be at least 6 characters.  (Or use the
          * static createBoundary() method to create one.)
          * @param  os        the output stream
          * @param  boundary  the boundary
          * @see  #createBoundary()
          * @see  #getContentType(String)
         public MultiPartFormOutputStream(OutputStream os, String boundary) {
              if(os == null) {
                   throw new IllegalArgumentException("Output stream is required.");
              if(boundary == null || boundary.length() == 0) {
                   throw new IllegalArgumentException("Boundary stream is required.");
              this.out = new DataOutputStream(os);
              this.boundary = boundary;
          * Writes an boolean field value. 
          * @param  name   the field name (required)
          * @param  value  the field value
          * @throws  java.io.IOException  on input/output errors
         public void writeField(String name, boolean value)
                   throws java.io.IOException {
              writeField(name, new Boolean(value).toString());
          * Writes an double field value. 
          * @param  name   the field name (required)
          * @param  value  the field value
          * @throws  java.io.IOException  on input/output errors
         public void writeField(String name, double value)
                   throws java.io.IOException {
              writeField(name, Double.toString(value));
          * Writes an float field value. 
          * @param  name   the field name (required)
          * @param  value  the field value
          * @throws  java.io.IOException  on input/output errors
         public void writeField(String name, float value)
                   throws java.io.IOException {
              writeField(name, Float.toString(value));
          * Writes an long field value. 
          * @param  name   the field name (required)
          * @param  value  the field value
          * @throws  java.io.IOException  on input/output errors
         public void writeField(String name, long value)
                   throws java.io.IOException {
              writeField(name, Long.toString(value));
          * Writes an int field value. 
          * @param  name   the field name (required)
          * @param  value  the field value
          * @throws  java.io.IOException  on input/output errors
         public void writeField(String name, int value)
                   throws java.io.IOException {
              writeField(name, Integer.toString(value));
          * Writes an short field value. 
          * @param  name   the field name (required)
          * @param  value  the field value
          * @throws  java.io.IOException  on input/output errors
         public void writeField(String name, short value)
                   throws java.io.IOException {
              writeField(name, Short.toString(value));
          * Writes an char field value. 
          * @param  name   the field name (required)
          * @param  value  the field value
          * @throws  java.io.IOException  on input/output errors
         public void writeField(String name, char value)
                   throws java.io.IOException {
              writeField(name, new Character(value).toString());
          * Writes an string field value.  If the value is null, an empty string
          * is sent (""). 
          * @param  name   the field name (required)
          * @param  value  the field value
          * @throws  java.io.IOException  on input/output errors
         public void writeField(String name, String value)
                   throws java.io.IOException {
              if(name == null) {
                   throw new IllegalArgumentException("Name cannot be null or empty.");
              if(value == null) {
                   value = "";
              --boundary\r\n
              Content-Disposition: form-data; name="<fieldName>"\r\n
              \r\n
              <value>\r\n
              // write boundary
              out.writeBytes(PREFIX);
              out.writeBytes(boundary);
              out.writeBytes(NEWLINE);
              // write content header
              out.writeBytes("Content-Disposition: form-data; name=\"" + name + "\"");
              out.writeBytes(NEWLINE);
              out.writeBytes(NEWLINE);
              // write content
              out.writeBytes(value);
              out.writeBytes(NEWLINE);
              out.flush();
          * Writes a file's contents.  If the file is null, does not exists, or
          * is a directory, a <code>java.lang.IllegalArgumentException</code>
          * will be thrown. 
          * @param  name      the field name
          * @param  mimeType  the file content type (optional, recommended)
          * @param  file      the file (the file must exist)
          * @throws  java.io.IOException  on input/output errors
         public void writeFile(String name, String mimeType, File file)
                   throws java.io.IOException {
              if(file == null) {
                   throw new IllegalArgumentException("File cannot be null.");
              if(!file.exists()) {
                   throw new IllegalArgumentException("File does not exist.");
              if(file.isDirectory()) {
                   throw new IllegalArgumentException("File cannot be a directory.");
              writeFile(name, mimeType, file.getCanonicalPath(), new FileInputStream(file));
          * Writes a input stream's contents.  If the input stream is null, a
          * <code>java.lang.IllegalArgumentException</code> will be thrown. 
          * @param  name      the field name
          * @param  mimeType  the file content type (optional, recommended)
          * @param  fileName  the file name (required)
          * @param  is        the input stream
          * @throws  java.io.IOException  on input/output errors
         public void writeFile(String name, String mimeType,
                   String fileName, InputStream is)
                   throws java.io.IOException {
              if(is == null) {
                   throw new IllegalArgumentException("Input stream cannot be null.");
              if(fileName == null || fileName.length() == 0) {
                   throw new IllegalArgumentException("File name cannot be null or empty.");
              --boundary\r\n
              Content-Disposition: form-data; name="<fieldName>"; filename="<filename>"\r\n
              Content-Type: <mime-type>\r\n
              \r\n
              <file-data>\r\n
              // write boundary
              out.writeBytes(PREFIX);
              out.writeBytes(boundary);
              out.writeBytes(NEWLINE);
              // write content header
              out.writeBytes("Content-Disposition: form-data; name=\"" + name +
                   "\"; filename=\"" + fileName + "\"");
              out.writeBytes(NEWLINE);
              if(mimeType != null) {
                   out.writeBytes("Content-Type: " + mimeType);
                   out.writeBytes(NEWLINE);
              out.writeBytes(NEWLINE);
              // write content
              byte[] data = new byte[1024];
              int r = 0;
              while((r = is.read(data, 0, data.length)) != -1) {
                   out.write(data, 0, r);
              // close input stream, but ignore any possible exception for it
              try {
                   is.close();
              } catch(Exception e) {}
              out.writeBytes(NEWLINE);
              out.flush();
          * Writes the given bytes.  The bytes are assumed to be the contents
          * of a file, and will be sent as such.  If the data is null, a
          * <code>java.lang.IllegalArgumentException</code> will be thrown. 
          * @param  name      the field name
          * @param  mimeType  the file content type (optional, recommended)
          * @param  fileName  the file name (required)
          * @param  data      the file data
          * @throws  java.io.IOException  on input/output errors
         public void writeFile(String name, String mimeType,
                   String fileName, byte[] data)
                   throws java.io.IOException {
              if(data == null) {
                   throw new IllegalArgumentException("Data cannot be null.");
              if(fileName == null || fileName.length() == 0) {
                   throw new IllegalArgumentException("File name cannot be null or empty.");
              --boundary\r\n
              Content-Disposition: form-data; name="<fieldName>"; filename="<filename>"\r\n
              Content-Type: <mime-type>\r\n
              \r\n
              <file-data>\r\n
              // write boundary
              out.writeBytes(PREFIX);
              out.writeBytes(boundary);
              out.writeBytes(NEWLINE);
              // write content header
              out.writeBytes("Content-Disposition: form-data; name=\"" + name +
                   "\"; filename=\"" + fileName + "\"");
              out.writeBytes(NEWLINE);
              if(mimeType != null) {
                   out.writeBytes("Content-Type: " + mimeType);
                   out.writeBytes(NEWLINE);
              out.writeBytes(NEWLINE);
              // write content
              out.write(data, 0, data.length);
              out.writeBytes(NEWLINE);
              out.flush();
          * Flushes the stream.  Actually, this method does nothing, as the only
          * write methods are highly specialized and automatically flush. 
          * @throws  java.io.IOException  on input/output errors
         public void flush() throws java.io.IOException {
              // out.flush();
          * Closes the stream.  <br />
          * <br />
          * <b>NOTE:</b> This method <b>MUST</b> be called to finalize the
          * multipart stream.
          * @throws  java.io.IOException  on input/output errors
         public void close() throws java.io.IOException {
              // write final boundary
              out.writeBytes(PREFIX);
              out.writeBytes(boundary);
              out.writeBytes(PREFIX);
              out.writeBytes(NEWLINE);
              out.flush();
              out.close();
          * Gets the multipart boundary string being used by this stream. 
          * @return  the boundary
         public String getBoundary() {
              return this.boundary;
          * Creates a new <code>java.net.URLConnection</code> object from the
          * specified <code>java.net.URL</code>.  This is a convenience method
          * which will set the <code>doInput</code>, <code>doOutput</code>,
          * <code>useCaches</code> and <code>defaultUseCaches</code> fields to
          * the appropriate settings in the correct order. 
          * @return  a <code>java.net.URLConnection</code> object for the URL
          * @throws  java.io.IOException  on input/output errors
         public static URLConnection createConnection(URL url)
                   throws java.io.IOException {
              URLConnection urlConn = url.openConnection();
              if(urlConn instanceof HttpURLConnection) {
                   HttpURLConnection httpConn = (HttpURLConnection)urlConn;
                   httpConn.setRequestMethod("POST");
              urlConn.setDoInput(true);
              urlConn.setDoOutput(true);
              urlConn.setUseCaches(false);
              urlConn.setDefaultUseCaches(false);
              return urlConn;
          * Creates a multipart boundary string by concatenating 20 hyphens (-)
          * and the hexadecimal (base-16) representation of the current time in
          * milliseconds. 
          * @return  a multipart boundary string
          * @see  #getContentType(String)
         public static String createBoundary() {
              return "--------------------" +
                   Long.toString(System.currentTimeMillis(), 16);
          * Gets the content type string suitable for the
          * <code>java.net.URLConnection</code> which includes the multipart
          * boundary string.  <br />
          * <br />
          * This method is static because, due to the nature of the
          * <code>java.net.URLConnection</code> class, once the output stream
          * for the connection is acquired, it's too late to set the content
          * type (or any other request parameter).  So one has to create a
          * multipart boundary string first before using this class, such as
          * with the <code>createBoundary()</code> method. 
          * @param  boundary  the boundary string
          * @return  the content type string
          * @see  #createBoundary()
         public static String getContentType(String boundary) {
              return "multipart/form-data; boundary=" + boundary;
    }Usage: (try/catch left out to shorten the post a bit)
    URL url = new URL("http://www.domain.com/webems/upload.do");
    // create a boundary string
    String boundary = MultiPartFormOutputStream.createBoundary();
    URLConnection urlConn = MultiPartFormOutputStream.createConnection(url);
    urlConn.setRequestProperty("Accept", "*/*");
    urlConn.setRequestProperty("Content-Type",
         MultiPartFormOutputStream.getContentType(boundary));
    // set some other request headers...
    urlConn.setRequestProperty("Connection", "Keep-Alive");
    urlConn.setRequestProperty("Cache-Control", "no-cache");
    // no need to connect cuz getOutputStream() does it
    MultiPartFormOutputStream out =
         new MultiPartFormOutputStream(urlConn.getOutputStream(), boundary);
    // write a text field element
    out.writeField("myText", "text field text");
    // upload a file
    out.writeFile("myFile", "text/plain", new File("C:\\test.txt"));
    // can also write bytes directly
    //out.writeFile("myFile", "text/plain", "C:\\test.txt",
    //     "This is some file text.".getBytes("ASCII"));
    out.close();
    // read response from server
    BufferedReader in = new BufferedReader(
         new InputStreamReader(urlConn.getInputStream()));
    String line = "";
    while((line = in.readLine()) != null) {
          System.out.println(line);
    in.close();------
    "Useful Code of the Day" is supplied by the person who posted this message. This code is not guaranteed by any warranty whatsoever. The code is free to use and modify as you see fit. The code was tested and worked for the author. If anyone else has some useful code, feel free to post it under this heading.

    I have a weird problem here. I'm using the Java POST (slightly altered for my purposes) mechanism but the receiving script doesn't receive any form variables (neither files nor regular form fields). If I try using the same receiving script with a regular upload form, it works. Because I've been pulling my hair out, I even went so far as to analyze the ip-packets. I can see that the file is actually sent through the Java POST mecahnism. Anybody any ideas. Here's the ip-packet of the failing upload:
    ----- Hypertext Transfer Protocol -----
    HTTP: POST /fotoxs/upload.cfm HTTP/1.1
    HTTP: Connection: Keep-Alive
    HTTP: Content-Type: multipart/form-data; boundary=-----------------------------fb2649be18
    HTTP: User-Agent: Mozilla/4.7 [en] (WinNT; U)
    HTTP: Accept-Language: en-us
    HTTP: Accept-Encoding: gzip, deflate
    HTTP: Accept: image/gif, image/jpeg, image/pjpeg, */*
    HTTP: CACHE-CONTROL: no-cache
    HTTP: Host: newmarc
    HTTP: Content-Length: 15511
    ----- Hypertext Transfer Protocol -----
    HTTP: -----------------------------fb2649be18
    HTTP: Content-Disposition: form-data; name="uploadFile"; filename="out.jpg"
    HTTP: Content-Type: image/jpeg
    HTTP: Data
    ....[data packets]
    The one that works (from the regular post) is as follows:
    ----- Hypertext Transfer Protocol -----
    HTTP: POST /fotoxs/upload.cfm HTTP/1.1
    HTTP: Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-gsarcade-launch, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
    HTTP: Referer: http://localhost:8500/fotoxs/test.cfm
    HTTP: Accept-Language: nl
    HTTP: Content-Type: multipart/form-data; boundary=---------------------------7d41961f201c0
    HTTP: Accept-Encoding: gzip, deflate
    HTTP: User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
    HTTP: Host: newmarc
    HTTP: Content-Length: 59022
    HTTP: Connection: Keep-Alive
    HTTP: Cache-Control: no-cache
    ----- Hypertext Transfer Protocol -----
    HTTP: -----------------------------7d41961f201c0
    HTTP: Content-Disposition: form-data; name="FiletoUpload"; filename="D:\My Documents\My Pictures\fotomarc.jpg"
    HTTP: Content-Type: image/pjpeg
    HTTP: Data
    ----- Hypertext Transfer Protocol -----
    HTTP: HTTP/1.1 100 Continue
    HTTP: Server: Microsoft-IIS/5.0
    HTTP: Date: Sun, 07 Mar 2004 17:14:41 GMT
    ....[data packets]
    One detail worth mentioning is that I don't read a file from harddisk, I'm streaming it directly to the connection outputstream from an image compression utility. But I can see the data in the ip-packets, and even if that somehow didn't work right, it doesn't explaing the fact that the receiving scripts reports no form fields whatsoever.
    Thanks,
    Marc

  • File upload through BlazeDS remote object?

    Hi,
    After researching file upload options in flex, it seems like the only option is through HTTP service requests, such as:
    private var fileRef:FileReference;
    fileRef.upload(new URLRequest(FILE_UPLOAD_URL));
    Is there any way to use BlazeDS remote objects to upload a file from Flex interface? Perhaps passing in a FileReference object and marshalling it into an equivalent Java object?
    Thanks!

    I know there is a workaround like this. It uses a servlet to upload a file and returns a url. The uploaded file is either stored in session or server file system until the session expires. Use the PropertyProxy to register a custom class which contains this url and convert to java.io.File. It is the limitation of the player. It cannot read the local file system for security reason. There is a sample in blazeds/trunk/qa/apps/qa-regress/WEB-INF/src/blazeds/qa/remotingService/Echo.java
    static
    PropertyProxyRegistry registry = PropertyProxyRegistry.getRegistry();
    PropertyProxy proxy = registry.getProxy(java.io.File.class);
    if (proxy == null)
    registry.register(java.io.File.class, new FileProxy());
    proxy = registry.getProxy(FileReference.class);
    if (proxy == null)
    registry.register(FileReference.class, new FileReferenceProxy());
    Hope it can help

  • Issue in Flat File load through FTP set up

    Hi All,
    I am trying to load the  flat file using FTP set up ( through process chain ).
    I put a file in the FTP server, the file is being picked up from the FTP server but I cannt see the same in Interface file manager (ZIFM) under unfinished or comleted jobs.
    I am not able to understand where is the eror?
    any suggestion for this would be of great help.
    regards
    Amol
    Edited by: Amol Jaiswal on Nov 8, 2008 12:33 PM

    i don't get you.
    You are trying to FTP a file to your application server in your process chain; is that correct?
    Marco

  • Flat file upload through BPS webinterface

    Hi ,
    I want to load a flat file ( format in CSV) through web upload  into a master data infoobject.
    that is i want to upload through BPS webinterface . (3.5 version)
    Is it possible to write everything in a BSP application without the help of Planning level or layout or functions.
    but only through webinterface and a BSP application and can abap coding be included in directly in .htm page.
    kindly help me out.

    Hi,
    I don't think so you 'll be able to write the abap code directly in htm page.Web interfaces are used for the purpose of creating and using user interface .It is no where linked to the logic or the activity that has to be performed using abap code directly.
    You have to use the planning level and planning function for uploading the data through flat file.You can check the How to guide in forum's.
    You can also create Transaction code for uploading the master data,through abap code you can provide buttons to upload it.
    Regards,
    Indu

  • Save a copy of file sent through FTP Send Port

    How can we save a copy of the file sent through an FTP Send Port?
    Here are the details of the scenario:
    1. I have an Orchestration which after processing, creates a Flat File
    2. Orchestration has a Static One Way Send Port with specify later
    3. FTP Send Port is bind to the orchestration
    Problem is, I don't want to create an extra file send port in the orchestration.
    Requirement is:
    When orchestration send the flat file to FTP, I want a copy of the file in a local file location.
    BizTalk Specialist

    Create a Send Port Group with the two ports in question and bind your orchestration to the Group.
    Alternatively you can leverage the BizTalk Archiving Pipeline component from codeplex at
    http://biztalkarchiving.codeplex.com/ and use this pipeline on your existing send port.
    Regards.

  • Steps for File Transfer through FTPS...!!!

    Hi ,
    Can anyone please tell the steps for file transfer with FTPS.
    Does PI file adapter has bulilt in feauture to handle this? or
    Do we need to deploy anything to handle this?
    Do we need to install any certificates by requesting from partner or It will do the encryptions/authentications on its own?
    Any additional Steps we need to mention in File receiver adapter while we send the file through FTPS?
    File is going through port 1090(unsecure connection) but it is not going through port (990) which is a secure connection.
    Please suggest me.
    Thanks
    Krupakar

    Hi Shabarish,
    We got the certificate from the partner and loaded into the trusted CA's. I tried running by giving
    Connectivity Security as "FTPS for Control and Data Connection" and Command Order as "AUTH TLS,USER,PASS,PBSZ,PROT"
    Ip: XXX.YY.YY.ZZZ
    Port: 990
    User and pwd.
    and I am getting the same below error
    Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: Error when getting an FTP connection from connection pool: com.sap.aii.af.service.util.concurrent.ResourcePoolException: Unable to create new pooled resource: iaik.security.ssl.SSLCertificateException: Peer certificate rejected by ChainVerifier
    I tried by selecting different options like
    1. Without selecting the X509 certificate for client authentication.
    2.  Keystore as TRUSTED\view\entry-cert
       X509 certificate and private key as TRUSTED\view\entry-cert
    3. Keystore as TRUSTED\view
      X509 certificate and private key as TRUSTED\entry-cert
    4.Keystore as "view"
      X509 certificate and private key as "entry-cert"
    Please help me in this.
    Thanks
    Krupakar

  • Using MessageDigest Class to check if a File was changed

    Hello,
    i want to write an application which times out at a Certain date.
    I would like to store this date in a seperate File and each time the apllication starts, it has to check first if the File has been manipulated or Changed.
    So, how can I remind what the original message digest is

    no idea

  • Finding songs in iTunes after  you change name of file

    Hi:
    Ok, sometimes my songs are not titled as I would like them to be. For example, a song might be titled "Dido--thanks.mp3" and it lives in the Various artists folder simply because iTunes automatically put it there when I imported it.
    I want to rename it "Thanks" and move it to the "Dido-->AlbumY "folder.
    I do this by right clicking and selecting Show in Finder, then physically renaming the file and moving it. I do it this way because I want the actual file to have the correct name, not just the iTunes tag. So that if I want to find it in the finder or use it with another player it is easy to find.
    However, when I do this, the newly renamed and moved file is not automatically added to iTunes or automatically updated. How can I get this to happen?
    Also, anyone know of a great software to change iTunes tags once I get them right in the actual file. I can't figure out how to use GimmeSomeTunes and iEatBrainz can never find my songs...
    Thanks for help!

    You'd probably be better off doing this sort of editing in iTunes, and letting it move the files appropriately.
    Go to the preferences, Advanced tab, and check the box to 'Keep iTune Music folder organized'. Then any changes you make to song names or other info (within iTunes) will automatically be applied.

Maybe you are looking for

  • Iphone 5c no longer charges since updating to ios 8.1.2

    I have updated my iphone 5C to IOS 8.1.2 and since then I can no longer charge my phone properly.  The only way I can charge is connecting the cable to my pc and charging through the pc or laptop.  It no longer works if I connect my phone directly to

  • Creation of Applicant with Refrence Emplyee

    Dear Experts, I am new to HR module, there is a requiremnt where in I have written a report to create applicants using the standard BAPI BAPI_APPLICANT_CREATE by giving the required parameters.But for creation of Applicats with existing employee refr

  • I can't move tv show to ipod when used as external drive

    I have been putting itunes purchased tv shows on my 60g ipod as a hard drive untill it stopped working. I drag the show to the ipod icon on the desktop and the plus sign appears then nothing happens. I have 28g free and it's worked fine untill now. I

  • Adobe air 2.6 auto update problem..

    hi friends, i am writing a multitouch application for like kiosk machine.. and i want to add auto update functionally, i write this codes, but i am getting There was an error downloading the update. Error# 16824 error after downloading update... upda

  • Creating a module level variable??

    Greetings, I'm trying to create a variable that stays in memory during the duration of the current open module. I want to be able to access it and also change it in multiple blocks. I tried using a Global Variable, but learned finally that it can onl