IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

SFTP How to

  • 1.  SFTP How to

    Posted Tue November 09, 2004 06:15 AM

    Dear all,

    Tried my level best to impleiment sFTP connectivity from IS 6.1 - but failed!

    Can anyone tell us how to? We followed the steps given in advantage by using OpenSSH package suggested by webMethods.

    Thanks in advance,
    Anil Kurnool

    PS:: If you have implimented it, please give your voice number, will call you.


    #webMethods
    #Integration-Server-and-ESB
    #webmethods-Protocol-and-Transport


  • 2.  RE: SFTP How to

    Posted Tue November 09, 2004 07:44 PM

    Hello,
    Not really helpful advice, but it may be nice for a responder to type in some of those procedures for a working implementation as “all” will benefit. Not only that, but there may be some optimizations or safeguarding tips that can be exchanged across messages. Thank you.


    #Integration-Server-and-ESB
    #webmethods-Protocol-and-Transport
    #webMethods


  • 3.  RE: SFTP How to

    Posted Tue November 09, 2004 09:07 PM

    Anil,

    I would suggest turning on debug on both client and server side to see where the public key auth is failing. You should see something like this:

    $ ssh -v yourhostname:
    . . .
    debug1: Next authentication method: publickey
    debug1: Trying private key: /home/tbond/.ssh/identity
    debug1: Offering public key: /home/tbond/.ssh/id_rsa
    debug1: Server accepts key: pkalg ssh-rsa blen 149
    debug1: read PEM private key done: type RSA
    debug1: Authentication succeeded (publickey).
    debug1: channel 0: new [client-session]
    debug1: Entering interactive session.

    It can be permissions on the authorized_keys file on the server side (they need to be locked down).


    #Integration-Server-and-ESB
    #webmethods-Protocol-and-Transport
    #webMethods


  • 4.  RE: SFTP How to

    Posted Wed November 10, 2004 12:01 PM

    I am posting this as a follow up to what Anil has posted. I work with him. We have created a java service and tried to execute it from a standalone java program and it works. When we do it from webMethods we get the following error in the sftp server (WinSSHD)

    094] WinSSHD 3.28d: Session thread 1009 handling
    connection from 192.168.1.13:4173:
    The client has been disconnected, we sent the
    following disconnect reason:
    SSH_DISCONNECT_KEY_EXCHANGE_FAILED, description:
    invalid DH value

    The same keys and ids work in standalone mode. We had the same problem when we tried simple password authentication without keys. In that case the standalone java program is working while from WM integration server flow service it does not.


    #webmethods-Protocol-and-Transport
    #webMethods
    #Integration-Server-and-ESB


  • 5.  RE: SFTP How to

    Posted Tue November 23, 2004 01:58 PM

    Update >>>

    We changed the sFTP server from winSSH to openSSH server. The services in the openSSH package are working fine now and are able to do the transport.

    Why?

    Any inputs in this regard is welcome.

    Regards
    Anil


    #webmethods-Protocol-and-Transport
    #Integration-Server-and-ESB
    #webMethods


  • 6.  RE: SFTP How to

    Posted Wed May 28, 2008 09:58 PM

    Hi Anil,
    Could you please provide the steps/document to impliment SSH on webMethods to send file to another server.
    Your help is highly appreciated .

    Regards
    Rav


    #Integration-Server-and-ESB
    #webmethods-Protocol-and-Transport
    #webMethods


  • 7.  RE: SFTP How to

    Posted Thu May 29, 2008 02:32 PM

    Hi Anil and co,

    I’ve written my own SFTP package using Java services based on the JSch library as stated in some of the forum posts.

    I’ve put a copy of this on the public wiki of my company. here is a link:
    http://www.customware.net/repository/display/WMFAQ/How+to+use+SFTP+in+webMethods

    Regards,

    Aditya Gollakota


    #Integration-Server-and-ESB
    #webmethods-Protocol-and-Transport
    #webMethods


  • 8.  RE: SFTP How to

    Posted Thu May 29, 2008 02:34 PM


  • 9.  RE: SFTP How to

    Posted Fri July 18, 2008 05:43 AM

    Hi Aditya,
    Thanks for your code, it’s excellent.
    Regards
    Rav


    #Integration-Server-and-ESB
    #webMethods
    #webmethods-Protocol-and-Transport


  • 10.  RE: SFTP How to

    Posted Fri October 03, 2008 03:33 PM

    Hi,

    I am having a requirement to get a file from a SFTP server. When I searched in WMUSERS I found this thread where I see a solution for my problem. I have downloaded the package BW_Utilities.zip and installed it. Also I have downloaded the jar jsch-0.1.37.jar and copied to ./Integration Server/lib/jars/ and re-started the IS.

    However when I tried to login i am getting the following output…

    channleSFTp # null
    Session Factory # com.jcraft.jsch.Session
    Status # Unable to connect to FTP server. com.jcraft.jsch.JSchException: Session.connect: java.io.IOException: End of IO Stream Read

    If anybody can throw some light on this issue and help me out it would be a great help.

    Thanks in advance…

    — Ram


    #webMethods
    #Integration-Server-and-ESB
    #webmethods-Protocol-and-Transport


  • 11.  RE: SFTP How to

    Posted Fri July 08, 2011 03:45 AM

    Hi Aditya,
    Thanks for your package. The code works great!!!
    Thanks again… it saved a lot of time for me.
    Priyanka


    #webmethods-Protocol-and-Transport
    #webMethods
    #Integration-Server-and-ESB


  • 12.  RE: SFTP How to

    Posted Fri May 25, 2012 02:43 PM

    Hi Ram

    Coould you pl. share the link from where you have got this BW_Utilities package ?

    Regards
    Dimpy Sanghvi


    #webmethods-Protocol-and-Transport
    #webMethods
    #Integration-Server-and-ESB


  • 13.  RE: SFTP How to

    Posted Mon May 28, 2012 09:46 AM

    Hi Sanghvi,
    If you are looking for code to connect to SFTP server from webMethods, below links will help you.

    [URL]http://wiki.customware.net/repository/display/WMFAQ/How+to+use+SFTP+in+webMethods[/URL]

    The above link has the code to work with Sftp… Some sftp servers will work only with certificates, and password might not be required. In such case, remove/comment the below line from the code, and you should be set to connect to SFTP server.

    session.setPassword(ftpPassword);

    [URL]http://webmethodsarchitect.com/integrationserver/11[/URL] - this has a package attached, it should help u… (i didnt check the content of the package)

    HTH
    Senthil


    #webMethods
    #webmethods-Protocol-and-Transport
    #Integration-Server-and-ESB


  • 14.  RE: SFTP How to

    Posted Tue June 26, 2012 01:17 PM


  • 15.  RE: SFTP How to

    Posted Fri June 07, 2013 07:22 AM

    Hi Ram,

    Even I am also facing the same problem while connecting to the SFTP server.

    Unable to connect to FTP server. com.jcraft.jsch.JSchException: java.net.ConnectException: Connection refused: connect

    May I know what could be the reason?

    Thanks,


    #webmethods-Protocol-and-Transport
    #webMethods
    #Integration-Server-and-ESB


  • 16.  RE: SFTP How to

    Posted Fri June 07, 2013 11:15 AM

    Which package are you using SFTP implementation?

    OpenSSH or waSFTP (unofficially support but works)?

    HTH,
    RMG


    #webmethods-Protocol-and-Transport
    #Integration-Server-and-ESB
    #webMethods


  • 17.  RE: SFTP How to

    Posted Sun December 15, 2013 07:27 PM

    Thanks a lot for your package Aditya.


    #webMethods
    #Integration-Server-and-ESB
    #webmethods-Protocol-and-Transport


  • 18.  RE: SFTP How to

    Posted Mon October 13, 2014 03:51 PM

    I have implemented sftp with a java service. When I tried to upload the catalog from webMethods it throws an exception, but when I run the java program in eclipse and give the path of input file and provide the destination file name it works fine.

    Any suggestions?

    java.lang.StringIndexOutOfBoundsException: String index out of range: 0
    at java.lang.String.charAt(String.java:686)
    at com.jcraft.jsch.ChannelSftp.remoteAbsolutePath(ChannelSftp.java:2186)
    at com.jcraft.jsch.ChannelSftp.put(ChannelSftp.java:331)
    at com.jcraft.jsch.ChannelSftp.put(ChannelSftp.java:319)
    at PngUtilities.SSSH.sshPwdAuthentication(SSSH.java:95)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.wm.app.b2b.server.JavaService.baseInvoke(JavaService.java:443)
    at com.wm.app.b2b.server.invoke.InvokeManager.process(InvokeManager.java:643)
    at com.wm.app.b2b.server.util.tspace.ReservationProcessor.process(ReservationProcessor.java:41)
    at com.wm.app.b2b.server.invoke.StatisticsProcessor.process(StatisticsProcessor.java:44)
    at com.wm.app.b2b.server.invoke.ServiceCompletionImpl.process(ServiceCompletionImpl.java:243)
    at com.wm.app.b2b.server.invoke.ValidateProcessor.process(ValidateProcessor.java:51)
    at com.wm.app.b2b.server.invoke.PipelineProcessor.process(PipelineProcessor.java:171)
    at com.wm.app.b2b.server.ACLManager.process(ACLManager.java:282)
    at com.wm.app.b2b.server.invoke.DispatchProcessor.process(DispatchProcessor.java:30)
    at com.wm.app.b2b.server.AuditLogManager.process(AuditLogManager.java:363)
    at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:547)
    at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:386)
    at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:244)
    at com.wm.app.b2b.server.comm.DefaultServerRequestHandler.handleMessage(DefaultServerRequestHandler.java:119)
    at com.wm.app.b2b.server.HTTPMessageHandler.process(HTTPMessageHandler.java:160)
    at com.wm.app.b2b.server.HTTPDispatch.handleRequest(HTTPDispatch.java:186)
    at com.wm.app.b2b.server.Dispatch.run(Dispatch.java:368)
    at com.wm.util.pool.PooledThread.run(PooledThread.java:131)
    at java.lang.Thread.run(Thread.java:662)


    #webmethods-Protocol-and-Transport
    #Integration-Server-and-ESB
    #webMethods


  • 19.  RE: SFTP How to

    Posted Fri November 21, 2014 11:03 AM

    Information about SFTP for Upgraders to wM 9.5 or newer:

    You should consider to migrate to the new build-in SFTP-feature introduced in IS 9.5.

    Benefits:

    • no need to custom code the handler any longer
    • documented in the Build-In-Sevices Guide
    • officially supported by SAG

    Regards,
    Holger


    #webMethods
    #Integration-Server-and-ESB
    #webmethods-Protocol-and-Transport