Question on URLFilePromise for dragging remote file out

Now I'm on-going developing an Air desktop application in which remote files need to be dragged out and stored in local file system.
Remote files can be dragged out and stored in local file system in my demo project,however when I merged the demo code to my
app project,it can't work correctly.I find that the URLStream wasn't connected as I registered a function to listen the
    event: Event.OPEN
and the listener function wasn't called.
And also there is no corresponding http request captured with the capture utility:Wireshark.
Could anyone give me some tips to work out the problem.
Thanks a lot!
Below is my code:
private function onMouseDown(event:MouseEvent):void 
var dragAttach:Clipboard = new Clipboard();
if(true == dragAttach.supportsFilePromise)
var filePromise:URLFilePromise = new URLFilePromise();
  var attachURl:String = GlobalConfig.HTTP_SERVER_ADDRESS +
"/" + _srcUname +
"/" + _fileType +
"/src/" + _attachID;
trace(attachURl);
filePromise.addEventListener(Event.OPEN, onURLStreamOpen);
filePromise.addEventListener(IOErrorEvent.IO_ERROR, onError);
filePromise.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onSecrityError)
filePromise.addEventListener(ProgressEvent.PROGRESS, onProgress);
filePromise.addEventListener(HTTPStatusEvent.HTTP_STATUS, onHttpStatus);
//attachURl = "http://192.168.6.229/dragAttach/hello.png";
attachURl = "http://ln.cn/swf/mm.png";
trace(attachURl);
filePromise.request = new URLRequest(attachURl);
filePromise.relativePath = _fileName;
var fileList:Array = new Array();
fileList.push(filePromise);
// only allow the file to be copied
var dragOptions:NativeDragOptions = new NativeDragOptions();
dragOptions.allowMove = false;
dragOptions.allowCopy = true;
dragOptions.allowLink = false;
var setRes:Boolean = dragAttach.setData(ClipboardFormats.FILE_PROMISE_LIST_FORMAT, fileList);
this.addEventListener(DragEvent.DRAG_COMPLETE, onDragComplete);
NativeDragManager.doDrag(this,
  dragAttach,
  _dragImage,
  new Point(-mouseX, -mouseY),
  dragOptions);
return;

yes..EOIO will block the queues if its predecessor are not in final state...
for ur design u can rfer the below wiki...instead of RFC u can use soap adapter..
http://wiki.sdn.sap.com/wiki/display/XI/File-RFC-File%28Without%20BPM%29

Similar Messages

  • How do I drag a file out of Swing to Windows

    I have an application which has BLOBs stored in a DB. From either Windows or Linux I can drag a file and drop it into my application and store it in the DB.
    I have also enabled a JTable to act as a Drag source, and I by encoding the result as a uri-list I can send back a reference to the data as a URL pointing to the internal web server in my app (using the new internal server in Java-6) and I can drag the object onto a KDE folder, or a KDE media player, or Konqueror and it works as expected.
    But under Windows only IE (or I presume Firefox but I have not tried that) seems to want to accept this uri-list, Windows Media Player and file Folders do not want to accept it.
    I need to stream the data out as the files are quite large and so creating a temporary file as the drag starts slows the start of the drag down in a very non-intuative way (for the user).
    I am using the Java-6 D&D mechanisms, using a TransferHandler.
    I also tried sending the data out as a file:// entry in the uri-list, but again only explorer seemed to understand it.
    Looking at the tutorial on D&D it only talks about object drags, where the object is the content rather than transfering files.
    Thanks for any help
    David

    That works if all the data is available as a file at the point where you start the drag.
    In my case it is not, I have got to go get it from the database, and that can take up to 30 seconds.
    So I want to do that bit when the drop happens (which users are used to as for instance when they copy a large file in Windows at the moment), not when the drag starts (which is very difficult to provide any visual feedback for).

  • Simple question: I can't get my files out of the trash and back in iMovie

    I was working on a project just now and iMovie crashed on me. Fortunately, all the clips I was importing were saved in the iMovie trash, but I can't drag them out of the trash and back into the clip menu! There's got to be something simple I'm doing wrong. Help!

    If the project is saved on an external drive, check the disk format. And rule out software compatibility issues with third-party iMovie plug-ins and QuickTime codecs.
    http://discussions.apple.com/message.jspa?messageID=2920540#2920540
    Karl

  • App for accessing remote files on a mac that you can play in another app

    Hey all,
    Anyone know of an app that will allow me to access files stored on a mac connected to the same wifi that I can play the file through another app in the iPhone without the file being transferred to the phone?
    For example, I want to be able to access a m4v stored on my mac over wifi, within the iPhone, to be played with a video player that I can send to a TV with the composite cable.
    I found NetPortal, which works quite well, but you need to transfer the file to your iphone and even then, it wont open with many apps. I tried transferring a m4v file to my phone and it only gave me goodreader as an app to open the file with. I could simply transfer the file I want to access using my USB cable to my iPhone much faster.
    Simply, I want to be able to stream movies from my Mac, through my iPhone to a TV and I am finding it hard to find Apps that allow such a thing.
    Any suggestions?

    I already have that setup at home. I want to be able to use this when I am on the road.
    I already use StreamToMe and Airvideo, but sometimes the quality is quite bad, which is mainly cause by my low upload speed. So I am looking for higher quality alternatives. I carry around a macbook air a lot so I figured I could store lots of movies for on the road to be played on other's tvs when were taking it easy.
    I am always so amused by responses on this forum. The solution is always to buy something.

  • Mac Mini Sever - Public Share - how enable read and write permissions for new remote files

    Hi,
    this Sunday a friend ask me to help hum with a problem on is Man Mini Server. He has a small office and uses the mini server to share a public folder to all his employees.
    Everyone that creates a file, saves it to the public folder at the mini mac.
    That problem is that, who creates the file owns it and remains with read-only permissions to everyone else. The owner has to change the file permission in order to the rest of the employees can work on it.
    I do not know mac arquitecture, I only work with windows and linux, but i suspect the principles are the same.
    We try to create another folder , and share it, but it happens the same. Have you any ideas on what is wrong?
    I suspect it has anything to do with de file Sharing at the mini mac, but it has read and write permissions for everyone.
    Thanks for your help.

    signed applet. You aren't going to find any easy way to distribute that policy file to users, and that policy file, if you asked me to put it on my PC, I'd tell you to take a flying leap. That would open any applet to access.

  • Air Web browser with drag out remote files

    Hi
    I'm new in AIR so I have few questions.
    I want to create my own simple web browser where users can drag out files on desktop using links on web pages instead of normal OS download system.
    I've found function which works fine when I use static url and name but I don't know method how I can actually get real url and name.
    Method:
                 addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
                 public var fileDown:URLFilePromise;
                 public function mouseDownHandler(event:MouseEvent):void
                    fileDown = new URLFilePromise();
                    fileDown.request = new URLRequest("http://www.example.com/file.txt");
                    fileDown.relativePath = "file_name.txt";
                    var promises:Array = new Array();
                    promises.push(filePromise);
                    var clipboard:Clipboard = new Clipboard();
                    clipboard.setData(ClipboardFormats.FILE_PROMISE_LIST_FORMAT, promises);
                    NativeDragManager.doDrag(this, clipboard);
    Can anyone help with this ??

    Until the introduction of file promises in AIR Athena, it  has never been possible to drag remote files out of an AIR application.
    You could refer to the http://www.adobe.com/devnet/air/flex/articles/using_file_promises.html
    Hope this is helpful. Please let me know if I could help more.

  • Drag file OUT of portfolio onto another program

    By default a user is able to drag a file out of a pdf portfolio onto their desktop or a folder. I'm wondering if it's possible to grant permission to drag the file out of the portfolio into a specified document. Is this possible? Where/how could I modify this permission? Specifically, I have image files that I want to drag out of the portfolio and into another pdf document.

    I posted this on another thread. See if this works:
    1) Uncheck "Backup previous version" in Keynote's Preferences.
    2) Make a duplicate copy of your file that has issues and save it.
    3) If you still get spinning wheels from switching between apps after editing or 10 seconds of inactivity, manually save with command+s. It may beach ball here but be patient and wait for it to finish! Try editing and resume doing work now.
    Command+s may be a bit slow but I think that might be normal since the files are so big.
    Good luck and let me know if this works.

  • Dragging files out of portfolio

    By default a user is able to drag a file out of a pdf portfolio onto their desktop or a folder. Permission to drag those items onto another document or program is restricted. I'm wondering if it's possible to grant permission to drag the file out of the portfolio into a specified document/program. Is this possible? Where/how could I modify this permission? Specifically, I have image files that I want to drag out of the portfolio and into another pdf document.

    Hi,
    I don't think you are going to have much luck with this task.
    While you can drag out of a portfolio, it is generally just to Explorer. You can't drag a file into another PDF, using drag and drop. This functionality is not available within Acrobat.
    In addition you will not be able to drag images from a portfolio or from Explorer into an image field in an XFA form.
    Sorry,
    Niall

  • Oracle B2B 11g question about pulling data from remote TP sftp server

    Hi,
    We would like replace our custom b2b solution with oracle b2b, but without resulting much changes in remote TP side. To do that the following issues are to be resolved.
    1) in the existing custom b2b, host tp is pulling data from remote TP location. How does oracle b2b pull data from remote location using sftp(AS1 1.1)? Oracle document says that by using global listening channel, we can make oracle b2b listen to the sftp server? Is that correct? Is there any sample about how to configure and test it.
    2) For outbound file we would like to preserve the file name. If you use sftp for sending the file out, is it possible to preserve the filename?
    3) Some incoming files which are datafiles , does not have any identification pattern. Is there any other way to identify the document type? For example from which location we are pulling the file can tell us the document type.

    1) in the existing custom b2b, host tp is pulling data from remote TP location. How does oracle b2b pull data from remote location using sftp(AS1 1.1)? Oracle document says that by using global listening channel, we can make oracle b2b listen to the sftp server? Is that correct? Is there any sample about how to configure and test it. I am not sure what do you mean by AS1 1.1 but yes, SFTP is supported in Oracle B2B and if you want to poll a SFTP location, then you need to create a listening channel in Oracle B2B. For creating a listening channel, please refer -
    http://download.oracle.com/docs/cd/E14571_01/integration.1111/e10229/bb_listen_chan.htm#BAJJICJJ
    2) For outbound file we would like to preserve the file name. If you use sftp for sending the file out, is it possible to preserve the filename?Yes, it is possible. There is a setting "Preserve Filename" in transport protocol parameter of a SFTP channel which should be enabled for this purpose.
    3) Some incoming files which are datafiles , does not have any identification pattern. Is there any other way to identify the document type? For example from which location we are pulling the file can tell us the document type. In case of FTP/FILE/SFTP, file name can be used to pass document type and revision information to Oracle B2B. Please refer "Filename format" setting on the above mentioned link.
    I figured it out from another thread about how to pull the file. I configured the listening channel so that it reads from a remote server using sftpo protocol. And I have given the filename format as %FROM_PARTY%.dat. I am putting a file like TESTBC.dat. TESTBC is the name of the remote TP. B2B is reading the file but, recognizes the document tupe, but says that FromTP null. What is the solution?
    Make sure that TP name is same as what you are giving in filename (cross-check for spelling). You may also try with default naming convention (do not mention anything in Filename format in listening channel configuration) - %FROM_PARTY%_%TIMESTAMP%.dat
    for eg -
    Acme_12345.dat
    Regards,
    Anuj

  • Service for delete local files in Business Connector

    I have used the "get" service for copy the files in the Business connector, does anybody know if there is any service for delete local files, i have seen the service for delete remote files with ftp, but i don´t know how to delete the copied files in my server.
    Thanks in advance
    regards

    Hi Carlos,
    For this issue the best choice is create your own Java Service. I attach you the Java code:
      Put this code in a new Java Service
             boolean success = (new File("filename")).delete();
             if (!success) {
                 // Deletion failed
       Before, you must to create an input parameter in the new service where you must to save the file path. Change Filename with the input parameter variable.
       It's not difficult.
    Best Regards
    Ivá

  • Very basic question regarding drag/drop files in 10.6.5

    Just (finally) updated to Snow Leopard and the simple way of dragging a file to the bar (just above the list of items in the folder) so as to move it to that folder no longer works.
    I prefer not to drag it to above other files in the folder and hoping that the file won't end up in a folder (which has now happened several times).
    There must be a simple-no-brainer way of doing this as there was before in 10.5 and as far back as I can remember (been using Macs since the mid-90's).
    Why did Apple decide to change this? Did they find a simpler way that I haven't figured out?
    Thanks for any advice.
    RonL

    MacRumors forum answered my question almost immediately... and yes they acknowledged that Apple had changed this in Snow Leopard for no good reason.
    On both my Leopard and Snow Leopard systems, you cannot drag a file to the title bar (not the "name bar"). On both systems, you can drag a file to the empty space in a window. I just tested to make sure. So, either your description of the problem is completely and utterly inadequate, you are misunderstanding what was said on MacRumors, or someone on MacRumors doesn't know what they're talking about.
    How long have you guys been using Macs?
    26 years, like baltwo. As a Mac support professional, programmer, web designer and more. I've forgotten more about Macs than you have ever known, I'm sure. Nobody here is impressed that you have used Macs for a little more than half that time, and your rudeness is most definitely not appreciated.
    It's one thing to not give me an answer... no problem, fine, but it is an entirely different thing to say that what I have done for years, and that has worked easily for me, has never worked.
    You claim that it changed with Snow Leopard. Clearly, it did not. As I've said, I have both Leopard and Snow Leopard systems and have verified that as fact. Once upon a time you could drag to the title bar, but I honestly don't have any idea when that behavior changed. I'd guess in 10.0, but have no way to verify that at this point.

  • After burning a successful DVD in iDVD out of FCPX, how can I see the settings it used?   So I finally burned a DVD out of a Apple Pro Res file into iDVD in PAL format. My question now is how can I find out what the exact burn properties were so that I ca

    After burning a successful DVD in iDVD out of FCPX, how can I see the settings it used?
    So I finally burned a DVD out of a Apple Pro Res file into iDVD in PAL format. My question now is how can I find out what the exact burn properties were so that I can apply the same burn properties to a project in Compressor 4?
    Is it possible to see what iDVD did?

    I don't know any way you can interrogate iDVD to reveal settings to the extent that you can in a Compressor project. What you could do is open up the show's VOB in MPEG STreamclip, go to File and Reveal Stream Information; that will at least give you some rudimentary info like average bit rate. Perhaps someone, with more iDVD experience, can chime in here.
    The broader question is why use Compressor at all if your current workflow is doing the job to your satisfaction?
    The value of Compressor is that it gives you control over the many parameters that affect size quality.  and playability. The Compressor presets can give you a starting point for DVD delivery, Web, etc. From those presets, people typically experiment by adjusting the parameters until they get the desired results for their specific show. It's a little bit science and a little bit art. After experimenting, you may be able to get slightly better quality for the project you've successfully burned in iDVD by using Compressor and something likeToast…or maybe not.
    Good luck.
    Russ

  • I have been dragging my files to a external drive to have a back-up for them and I lost some of my folders. They just went completely missing. I didn't delete them, and it was all stuff that I have worked on in the past month. How do I get them back?

    I have been dragging my files to a external drive to have a back-up for them and I lost some of my folders. They just went completely missing. I didn't delete them, and it was all stuff that I have worked on in the past month. How do I get them back?

    You really should be doing backups with an actual backup application, especially one that will work automatically, and, if your external HD is large enough, back up your entire system.  These can automatically back up only what's changed since the  previous backup, and some will keep "archive" copies of things you've changed or deleted, also.
    Too many things can go wrong, such as your internal HD failing, and you'll have a major project to reinstall everything.
    You already have Time Machine, built-in to OSX.  You might want to review the Time Machine Tutorial, and perhaps browse Time Machine - Frequently Asked Questions.
    #27 in the second link mentions some alternatives, too.

  • Can't drag files out of the dock folders/stacks

    On Mavericks I'm able to drag files out of the folders/stacks I have on the Dock (Downloads, Documents, etc.) just as you would anywhere on OSX. But, for some reason my mom (Mavericks) and my fiancee (Mountain Lion) can't. I've tried checkin the permissions for those folders (in Get Info) and they have read/write permissions. This only happens in list view, not in fan, grid or automatic. Is there some hidden setting or something else that would allow them to be able to drag files?

    For downloads, go to your user folder downloads and remove them there. Same for Applications. To remove alias from the Dock hold down the command key while dragging them from the Dock.
    If that does't work, go to Finder and select your user/home folder. With that Finder window as the front window, either select Finder/View/Show View options or go command - J.  When the View options opens, check ’Show Library Folder’. Then try a Dock reset.
    Try doing a Dock restart using the following Terminal command:
    killall Dock
    Log out/in and test. If that doesn’t work, you need to look in your user Library/Applications Support/Dock for the .db. Use the Finder “Go To Folder” command. Enter ~/Library/Applications Support/Dock.  Move the .db to your desktop.
    Then try a dock reset.
    Applications/Utilities/Terminal enter the command
    killall Dock
    Log out/in test. If it works okay, delete the .db from the desktop.
    If the Dock is the same, return the .db to where you got them from, overwriting the newer ones.

  • Mount-DiskImage in a remote session exeception- Cannot process Cmdlet Definition XML for the following file:

    Hi everybody,
    I have a strange problem with Mount-DiskImage command.
    Environment: Windows server 2012 without any updates.
    All scripts signed as it was in Hanselman's blogpost
    http://www.hanselman.com/blog/SigningPowerShellScripts.aspx
    First script(script1) executing on one machine (server1), then copy another script(script2) to the remote server(server2) and run script2 in a PS-Session. Both are signed. Certificates are located on both servers.
    In a script I tried to
     Import-Module Storage
     $mountVolume = Mount-DiskImage -ImagePath $ImageSourcePath -PassThru
    where ImageSourcePath is a networkpath to iso image.
    But getting exception.
    Exception Text:
    Cannot process Cmdlet Definition XML for the following file:
    C:\Windows\system32\WindowsPowerShell\v1.0\Modules\Storage\Disk.cdxml. At line:138 char:17
    +                 $__cmdletization_objectModelWrapper = Microsoft.PowerShell.Utili ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Executable script code found in signature block.
    At line:139 char:17
    +                 $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $scrip ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Executable script code found in signature block.
    At line:143 char:21
    When I look into the C:\Windows\system32\WindowsPowerShell\v1.0\Modules\Storage\Disk.cdxml I didn't get what's happend, because in line 138- was xml comment.
    Any ideas?

    Hi,
    I suggest referring to the following links:
    http://blogs.msdn.com/b/san/archive/2012/09/21/iso-mounting-scenarios.aspx
    http://blogs.technet.com/b/heyscriptingguy/archive/2012/10/15/oct-15-blog.aspx
    Best Regards,
    Vincent Wu
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

Maybe you are looking for

  • N9 Mail for Exchange: Calendar sync incomplete

    Hi all, I've set my N9 (64 GB, PR1.3) to sync with Outlook Exchange 2010. Everything used to work nicely, but recently I discovered that not all calendar entries are synced to my device. Some appointments that show up in Outlook (and on other devices

  • Manual backup

    I'm trying to manually back up pertinent mail/contact info to use to restore a crashed machine. I can't locate the library. It used to be simple user/library/mail . . . etc. Where do I find it now with Lion?

  • No images in design view

    I know this has been asked before and I've searched out each one and went through to make sure I had everything in line before I asked. 1.) "Display External Files" is checked in the View menu 2.) The files are stored on a server AND I have them on m

  • NetBeans not showing files in file select browser

    I am trying to add my Sun Java Platform Server to NetBeans, in the New Server Instance procedure, after selecting Sun Java System Application Server, I went to select the Java Binary from here C:\Program Files\Java\jdk1.6.0\bin. However after opening

  • Chart designer

    Dear colleagues, where can I find documentations to the Chart designer and classes cl_gui_chart_engine  and cl_igs_chart_engine ? Are there any exercise programs too ? Thanks a lot and kind regards Peter