FTP connection in J2ME

Hi All,
can anyone tell me is FTP connection in J2ME possible or not? If it is possible, how it is possible?
Mahabub

AFAIK at present there is no FTP API's avalable from J2ME/MIDP front that you can use to establish an FTP connection.
Meanwhile I have a pretty easier solution for you. You can use Jakarta Commons Net API's at the App server end to communicate to the intended FTP server by means of Servlet so that you can form an Http response as per your requirements. for e.g.:- you issue ftp command from J2ME client and pass it over http to the Servlet residing in your app server. internally the web-tier component establishes the link to the FTP server and responds appropriately based on the issued commands.
You can also use a telnet client that uses socket communications but the approach mentioned above I rekon would be a feasible one bcause the Usability matters the most when it comes to Mobile applications.
Hope this information helps.
~Mohan

Similar Messages

  • FTP connection possible with J2ME?

    Hi all,
    Does anybody if it is possible to make an FTP connection for a J2ME midlet (like you would make an http connection). If so, how can I do this and where could I find some information about this?
    Kind regards

    In MIDP 1.0, only HTTP support is required. With only HTTP, you could set up a custom proxy (which could be a Java servlet, CGI script, etc.) that does FTP on behalf of the client. So the client would make an HTTP request to, say, http://www.example.com/ftpProxy?url=ftp%3A%2F%2Fftp.example.com%2Ffoo%2Fbar, and the server-side ftpProxy program would fetch and return the specified FTP URL.
    Some phones support raw sockets, in which case a proxy wouldn't be needed and you could implement FTP yourself (by reading the appropriate RFC). But this wouldn't be very portable as there are J2ME MIDP phones that only support HTTP.

  • Transfering .csv file from SAP to NON-SAP using FTP connection

    Dear All,
    I am able to place the .CSV file successfully to other system using FTP connection, but when i open the file I could see the gaps between each record. I mean 1st line with the 1st record and 2nd line having a GAP and 3rd line with the 2nd record and so ..on as shown below
    1     1/1/2009     0     41000027
    2     1/1/2009     0     41000027
    3     1/1/2009     0     41000027
    I have declared an internal table as below
    TYPES: BEGIN OF ty_charlist,
             line(5000) type c,
           END OF ty_charlist.
    DATA:  w_charlist TYPE ty_charlist,
                 t_charlist TYPE TABLE OF ty_charlist.
    And concatenating each field seperated by ','
    CONCATENATE  res1 res2 res3 res4 res5 res6 res7 res8 res9 res10 res11 res12 res13 res14 res15 res16 res17 res18 res19  res20 res21 res22 res23 res24 res25 res26 res27 res28 res29 res30 res31 res32 res33 res34 res35 res36 res37 res38 res39
    INTO w_charlist-line SEPARATED BY ','.
    APPEND w_charlist TO t_charlist.
    Now T_CHARLIST contains 50 records which needs to be placed on other system. I can see 50 records but gap is coming
    Here res1, res2 and so on are declared as TYPE STRING..
    Please do help me this issue
    Thanks
    Prava

    Hello dprava ,
    Try to be assisted with these examples .
    1. [http://wiki.sdn.sap.com/wiki/display/ABAP/FTPfiletransferinBackground]
    2. [Reg: FTP Connection; - SAP examples programs
    Thank you,
    Boaz

  • Adding a site to a ftp connection

    Hi,
    Just upgraded to DW CS4 and in doing so I pressed a wrong
    button...!
    I have numerous sites in my site manager window and one I am
    working on has reverted to being nothing more than an ftp
    connection. This was my fault as I went back into the set-up window
    for the site (edit site) and made it an ftp connection only, rather
    than a full site with connections to local folders as well as
    remote connections.
    Problem is, now on the site manager list the icon has changed
    from the folder with the name of the site to the ftp//sitename here
    icon and I have no idea how to get it back so I have access to my
    local folder.
    Any help?
    Thanks,
    SunsV

    > Problem is, now on the site manager list the icon has
    changed from the folder
    > with the name of the site to the ftp//sitename here icon
    and I have no idea
    > how
    > to get it back so I have access to my local folder.
    There really isn't any way to go back from that choice.
    so- Make a New site definition and pick "site" and not "RDS"
    connection.
    Alan
    Adobe Community Expert, dreamweaver
    http://www.adobe.com/communities/experts/

  • Need help to Configure FTPS connection for File Sender Adapter

    Hi,
    I want to Configure, FTPS connection (Secured Connection) for File Sender Adapter. Could anyone please guide me, what Information I require to configure. I just want to know what Information should I request the team inorder the configure FTPS so that it can be deployed properly.
    I have checked with [SAP Help Link|http://help.sap.com/saphelp_nw04/helpdata/EN/e3/94007075cae04f930cc4c034e411e1/content.htm] and while configuring the communication channel found that I need Keystore and the X.509 Certificate and Private Key.  which needs to be deployed on the J2EE server by using the Visual Administrator.
    Is there anything else, I need to configure.
    Any help would be appreciated in this regard.
    Thanks & Regards,
    Varun.K

    The basic things are Certificate/Keys which you already know. Usually it is enough for running a sceanrio.
    However, if you have additional requirements, like FTPS for "Connection Security" for encryption, then you may need additional details like commands. Rest all settings are same as FTP.
    Regards,
    Prateek

  • How do I get SQL Agent to perform an FTP connection through a SSIS package?

    I have created a number of SSIS packages that I am running through SQL Agent in various jobs.  I have set up a Credential / Proxy for the job steps and for the most part everything runs no problem.  The issue I have is with the step where I make
    a connection to a FTP server and download files.  In BIDS the step works fine but in SQL Agent the step times out.  I presume that it has to do with the account that it is being run under but that is what I thought the Credential / Proxy was supposed
    to handle (as it does for all the other steps).  I am running on SQL Server 2008 R2.  I have created a test job that has only one step which is to connect to the FTP server and download some text files.  I have tried utilizing package configuration
    files and have tried various ProtectionLevels to no avail.
    Anyone have any thoughts or direction for me to take?  Will continue to research and will post if I resolve this.
    Thanks, Andrew

    On the dev environment the ProtectionLevel is set to EncryptSensitiveWithUserKey and that is what I tried first on the prod server.  Subsequently I also tried utilizing a package config file (with ProtectionLevel then of DontSaveSensitive) and have
    also tried working with the ServerStorage.
    For deployment I copied the relevant dtsx files to a solution on the prod server.  I verified that the packages all had tested connections in the Connection Manager.  I have run all the packages in the BIDS on the prod server and they all worked. 
    I have created a test package from scratch on the prod server to test the ftp connection.  This test package runs from BIDS fine.  I have set the SQL Agent file to access through the file system (no luck) and have saved the package to the SSIS Packages
    and had the job step access from there (no luck either).

  • How can I find out the server port for a secured FTP site and creating a FTP Connection Manager

    I have to create a FTP Task to go out and get the files that our 3rd party vendor will be dropping on a secured FTP site. I have all the credentials to access that Secured FTP Site and have successfully done so through FileZilla.
    Now I need to set-up a FTP Task to go out and get their files and in so doing create a FTP Connection Manager. Is there any way I can determine the
    Server Port number from the Secured FTP site? I let it default to 21 and tried the Test Connect and it failed.
    Thanks for your review and am hopeful for a reply.

    Hi ITBobbyP,
    SSIS has a built in FTP task, while this only works for the FTP protocol, it doesn’t support SFTP. But there are some free clients like WinSCP and
    SSIS SFTP Task Control Flow Component
    available in the CodePlex which can invoked from SSIS.
    References:
    SSIS SFTP Task Control Flow Component approach
    WinSCP approach
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • FTP connection on mobile device works over wifi but fails over 3G

    Hi all,
    Hoping someone can help, or has come across this issue.
    I am developing a mobile app using flash builder 4.6 with the flex 4.6 sdk. My app needs to transfer files via ftp.
    The issue I am experiencing is that the ftp connection establishes and files transfer without a problem when connected via wifi, on both android and ios platforms.
    However, when only connecting via a 3G connection on a device, a problem occurs. While I can establish a connection, when I send the USER command, I never receive a response.
    A simple view with code to reproduce this issue is listed below. Has anyone come across this problem? I have been searching far and wide but cannot find anything related.
    Could this be an issue with Adobe Air or the socket class? I have written equivalent code using the android sdk in eclipse, and a connection to the same server and user details works on both wifi and 3g connections.
    Any help would be appreciated.
    Thanks.
    <?xml version="1.0" encoding="utf-8"?>
    <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
                        xmlns:s="library://ns.adobe.com/flex/spark" title="HomeView">
              <fx:Script>
                        <![CDATA[
                                  private var commands:Array;
                                  private var s:Socket;
                                  private var data_channel:Socket;
                                  private function connectToFtp():void
                                            var ftp_response:String;
                                            var data_response:String;
                                            var data_channel_ip:String;
                                            var data_channel_port:int;
                                            s = new Socket();
                                            s.addEventListener(Event.CLOSE, closeConnection);
                                            s.addEventListener(Event.CONNECT, connectionMade);
                                            s.addEventListener(IOErrorEvent.IO_ERROR, showError);
                                            s.addEventListener(SecurityErrorEvent.SECURITY_ERROR, showSecError);
                                            s.addEventListener(ProgressEvent.SOCKET_DATA, receiveReply);
                                            s.connect("mydomain.com", 21);
                                            function receiveReply(e:ProgressEvent):void{
                                                      ftp_response = s.readUTFBytes(s.bytesAvailable);
                                                      trace(ftp_response);
                                                      var code:String = ftp_response.substr(0, 3);
                                                      if (code == "220")
                                                                // connected.
                                                                // send user command
                                                                 s.writeUTFBytes("USER myUserName\n");
                                                                s.flush();
                                                      else if (code == "331")
                                                                // user command sent. password required
                                                                // send password
                                                                s.writeUTFBytes("PASS myPassword\n");
                                                                s.flush();
                                                      else if (code == "230")
                                                                // login successful
                                                                // change directory
                                                                s.writeUTFBytes("CWD /fibreSyncFtp/\n");
                                                                s.flush();
                                                      else if (code == "250")
                                                                // change directory successful
                                                                // send passive command
                                                                s.writeUTFBytes("PASV\n");
                                                                s.flush();
                                                      else if(code == "227")
                                                                //get the ip from the string response
                                                                var temp:String = ftp_response.substring(ftp_response.indexOf("(") + 1, ftp_response.indexOf(")"));
                                                                var data_channel_temp:Array = temp.split(",");
                                                                data_channel_ip = data_channel_temp.slice(0,4).join(".");
                                                                //calculate the port number from the last two digits - if this makes no sense, google
                                                                // FTP PROTOCOL - there are loads of guides that explain the server responses.
                                                                data_channel_port = parseInt(data_channel_temp[4]) * 256 + int(data_channel_temp[5]);
                                                                data_channel = new Socket(data_channel_ip, data_channel_port);
                                                                data_channel.addEventListener(ProgressEvent.SOCKET_DATA, receiveData);
                                                                s.writeUTFBytes("LIST\n");
                                                                s.flush();
                                                      else if (code == "125")
                                                                //use the new IP to open a second socket - this will transmit the data.
                                                                // Your first socket will transmit any commands you issue and this new socket will transmit the data
                                                      else if (code == "226")
                                                                // transfer complete
                                                                // close the connection
                                                                //s.close();
                                                      else if (code == "425")
                                                                // can't open connection
                                            function connectionMade(e:Event):void
                                                      trace("Connection Made");
                                            function receiveData(e:ProgressEvent):void{
                                                      data_response = data_channel.readUTFBytes(data_channel.bytesAvailable);
                                                      trace(data_response);
                                            function showError(e:IOErrorEvent):void{
                                                      trace(e.text);
                                            function showSecError(e:SecurityErrorEvent):void{
                                                      trace(e.text);
                                            function closeConnection(e:Event):void{
                                                      trace(e.type);
                        ]]>
              </fx:Script>
              <fx:Declarations>
                        <!-- Place non-visual elements (e.g., services, value objects) here -->
              </fx:Declarations>
              <s:Button top="10" label="FTP" click="connectToFtp()" horizontalCenter="0"/>
    </s:View>

    Probably you need to write your own AIR native extension, which uses the native Android sockets..I have the same problem and I'm just starting writing the extension...I guess there is no other way..At least you test with native android socket and you confirm is fine, so we know it should work

  • Background scheduling of FTP Connection through R/3

    Hello Friends,
      I have done FTP connection by using Z-pgm which uses function FTP_CONNECT. This is working fine in Foreground mode. 
    But in background scheduling of the z-pgm, i am getting the <b>error as 'RFC to program SAPFTP failed'.</b>
    I checked RFC destination SAPFTP in SM59. There Activation type is 'Start on Front End Work Station'. I tested the connection also. Its alright.
    How to do FTP processing in Background?
    Cheers,
    Seema

    Hello,
    you could try to use RFC destination 'SAPFTPA' - it's ftp on the application server. Since SAPFTP is  'Start on Front End Work Station' and in background there is no front end work station, it can't work.
    Regards Wolfgang

  • FTPs connection error:When using Variable substitution for Directory path

    Hi
    I am transferring data from BI to xml file via PI: Here a Client proxy from BI sends the data to PI and the PI FTPs the XML file to a remote location. For FTP I am using FTPs SSL connection.
    It was working fine untill I used Variable susbstitution to determine Directory path dynamically. I am using this because different xml files are intended to goto the different locations.
    I did the variable substitution like this:
    Target Message Structure:
    ---> Target Directory: %var1%
    <?xml version="1.0" encoding="UTF-8" ?>
    <MT_BI_EXTRACT_FILE>
      <Header>
         <Directory>/Customer</Directory>
    </Header>
    <Detail>
    </Detail>
       </MT_BI_EXTRACT_FILE>
    And in the variable substitution I am doing it this way
    payload:MT_BI_EXTRACT_FILE,1,Header,1,Directory,1
    And the error I am getting is:
    Attempt to process file failed with 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.SSLException: Peer sent alert: Alert Fatal: handshake failure
    MP: Exception caught with 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.SSLException: Peer sent alert: Alert Fatal: handshake failure
    Exception caught by adapter framework: 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.SSLException: Peer sent alert: Alert Fatal: handshake failure
    Delivery of the message to the application using connection File_http://sap.com/xi/XI/System failed, due to: 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.SSLException: Peer sent alert: Alert Fatal: handshake failure.
    Does anybody have some Idea of this ??
    Regards
    Naina

    Hi,
    I guess the problem is not with Variable Substitution..
    Error when getting an FTP connection from connection pool:
    So its a connection problem..
    Also check the option Disable Security check and try again...
    Try to check again if the interface is executing properly without Variable substitution and let us know..
    Babu
    Edited by: hlbabu123 on Jan 7, 2011 2:46 PM

  • FTP connection error whil,e using flat file adapter error

    while using file adapter in the reciever end for proxy to file
    i am giving  paranters like server IP address and the port , i dont know which port to give by default it is giving me 21 , anyway how to check whether the connection is correct
    and more over
    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: ConnectException: Connection timed out: connect
    please help me in this thanks

    HI Sridhar ,
    First check wether server started or not and then check you are connecting to FTP server by
    go to run -> cmd and write ping and ipaddress which is used and see whether u r getting reponse from teh FTP server.
    Try to login to the ftp server which you have mentioned in CC using the user name and pwd, to chk whether you have the permissions to login to the server.
    Also the check whether the folder you are trying to access is having permission for delete/read/write.
    Restart the FTP server and try it again.
    Regards
    Sridhar Goli

  • File has to pass through FTPS connection.. Connection parameters?

    Hi,
    I want to transfer the file through FTPS connection. Partner side provided the following details as connection parameters.
    - IP : 129.32.169.140 
    - POrt: 990
    User name
    Password
    PASV mode
    SSL Direct, OpenSSL,SSL Listing, SSL Transfers.
    Kindly let me know what are all the parameters I need to pass in Receiver file adapter.
    FTP Connection Parameters:
    Server
    Port
    Data connection: Passive
    Connection Security:  FTPS for control connection or FTPS for control and Data connection.???
    Command Order :  ?????
    Please let me know what are the security and command order parameters I need to use in Receiver file adapter.
    They didn't provide any certificates.
    Thanks
    Deepthi.

    Hi Rajesh,
    The message is not even failing.. It is in the status of "Delivering". The below are the logs from adapter and Messaging system.
    File Adapter Log:
    Success   Message successfully received by messaging system. Profile: XI URL: http://xi-dev.intranet.XI.com.au:50200/MessagingSystem/receive/AFW/XI Credential (User): PIISUSER
    Success  Using connection File_http://sap.com/xi/XI/System. Trying to put the message into the receive queue.
    Success  Message successfully put into the queue.
    Success  The message was successfully retrieved from the receive queue.
    messaging system log:
    Message ID  44b756da-d9bd-42e2-3136-e34d75adfe03 
    Message Type  Asynchronously Received Message (RECEIVE) 
    From Service   Name:  BS_1  
    To Service   Name:  BS2  
    Action   Namespace  http://XI.com/SAP_PI/ControlData Name:  BYPASS  
    Connection Name   File_http://sap.com/xi/XI/System 
    Status   Delivering 
    Error Category    
    Error Code    
    Profile   XI 
    Transport   HTTP 
    Delivery Semantics   Exactly Once 
    Times Failed   0 
    Number of Retries   3 
    Sent / Received  09/09/2009 11:22:52 
    Transmitted / Delivered  09/09/2009 11:22:53 
    Next Delivery  09/09/2009 11:22:53 
    Persist Until  10/09/2009 11:22:52 
    Valid Until  01/01/1970 10:00:00 
    Retry Interval   5 Minutes 
    Address   http://xi-dev.intranet.XI.com.au:50200/MessagingSystem/receive/AFW/XI 
    Transport Headers   authorization=Basic UElJU1VTRVI6dDFhbTRyaWE= Content-Length=3010 accept-encoding=gzip sap-xi-messageid=44B756DAD9BD42E23136E34D75ADFE03 content-length=3024 host=xi-dev.intranet.XI.com.au:50200 user-agent=SAP Web Application Server (1.0;700) content-type=multipart/related;boundary=SAP_4AA4E14330050131E10080000A722149_END;type="text/xml";start="" HTTP=POST soapaction="http://sap.com/xi/XI/Message/30" 
    Principal Propagation

  • Sender File Adapter - FTP Connection Error 530

    Need help!!!
    I am getting the following error in XI when I try to connect to an ftp server.
    "An error occured while connecting to server xxx.xx.x.xx:xx. The FTP server returned the following error message:'com.sap.aii.adapter.file.FTPEx: 530 Can't open passive connection---(4013)'. For details, contact FTP server vendor"
    When I try the FTP connection on the OS level I am able to log in, but through XI I am unable to.
    Has anyone seen this error before?

    I have seen Error Code 530 earlier, it is typically related to login related issues.
    Check if the user mentioned in the Comm Channel has the correct password and read as well as write rights on the Server.
    The most likely problem is with the User Credentials or Authorizations

  • File selection sequence in the FTP connection for File Sender Adapter

    Hi,
    I have a file to Proxy scenario using FTP connection parameters.
    If there are multiple files in the sender folder, XI picks up the files randomly with no processing sequence.
    I want XI to pick up the files based on the date time stamp meaning the  oldest file created in the folder should be processes first and rest all in sequence there after.
    I know processing sequence can be set for NFS connection but not for FTP .
    Please suggest if there's any way to make this work.
    Thanks in advance.
    Thanks and Regards,
    Amit Bhagwat.
    Edited by: Amit Bhagwat on Nov 4, 2009 5:17 AM

    Hi
    For the Transport Protocol "File Transfer Protocol (FTP)" files are always processed in ascending alphabetical order
    If you want the file to be processed in sequence then you can use Quality of Service EOIO in the sender adapter.
    The files are processed in the sequence they are picked up.
    otherwise use BPM for File Sequencing..
    Refer the following Threads
    FTP Sender Adapter - Processing Sequence
    Processing Sequence issue of FTP protocol
    Regards
    Abhijit
    Edited by: Abhijit Bolakhe on Nov 4, 2009 10:32 AM

  • Adobe Dreamweaver FTP connection doesn't work with german "Umlaut" like "ö" in the severadress

    Hi
    Today I tried to establish a FTP connection to the serveradress "ftp.möbelverwandlung.com", but I get the error message that the program couldn't connect to the host. As Dreamweaver works perfectly with other serveradresses and I managed to establish a connection to "ftp.möbelverwandlung.com" with other programs, I think that the problem is the german "Umlaut" "ö". Did anyone recognize the same problem and does someone know a solution?
    Thank you very much for your help

    Here is the English translation of your previous post -
    Hello Maximilian,
    I got a even looked at my provider. Usually there must pay the original domain for the agreed period and agree a new. However, they show a accommodating for so short "duration" of a few hours like you. Try to contact your ISP phone support.
    MfG
    Hans-Günter
    Anyhow, I think you have covered the options!

Maybe you are looking for

  • GET_DYNAMIC_QUERY_RESULT ( ) of GenIL IMPL Class is not working properly

    Hi Experts, Please guide me to resolve the following issue ! The input parameter ( it_selection_parameters )  of the GET_DYNAMIC_QUERY_RESULT are not being populated when I tested in Debugger this is blank. When I tested my Search Object from GenIL B

  • Where did my pro go?

    I ordered and paid for QT Pro a little over a year ago. Since, I have used it to edit several videos w/o a problem. BUT recently when I load QT, I can not access the PRO settings. I try to re-register but do not know where to find the reg. key. It is

  • Updated to iTunes 11.2.1, phone won't sync and have to force quite iTunes.

    Hi, I just updated iTunes to 11.2.1, as well as the most recent Lion (? at work, can't look up which OS or version) update for my MacBook. Now iTunes will open, but it will not sync with my phone (I have an iPhone 4, A1332), and won't iTunes won't cl

  • Crystal report : refresh

    i have called crystal report from the from using DDE as follows..... declare AppID PLS_INTEGER; begin AppID := DDE.App_Begin('C:\Program Files\Crystal Decisions\Crystal Reports 9\crw32.exe Report2G.rpt', DDE.APP_MODE_MINIMIZED); end; .... now this is

  • How to get name of a JSP

    Hi all, I want to see the name of the current JSP... is it somewhere in "About this page" or not? Thanks, Alexander.