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

Using pub.client.ftp:put with a Stream

  • 1.  Using pub.client.ftp:put with a Stream

    Posted Wed November 23, 2011 12:31 PM

    Hi,
    I am trying to send a file using the service pub.client.ftp:put, and since the file may be quite large (>50MO), I’d like not to load it in memory.
    So I’ve decided to use
    pub.file:getFile(loadAs: stream).

    Then I map the stream object into the put service.

    As a result, I do get a file… which contains exactly:
    “java.io.BufferedInputStream” :confused:

    Apparently my stream was serialized before being used, but that was not exactly what I was going after :frowning:

    I’ve called stream.getClass().getName() on the object I got from the “getFile”, and it IS a “java.io.BufferedInputStream”.

    So, has anyone ever experienced this?

    I will try to call the put service inside a java service so I’m sure what happens to my stream, but this is not a really good solution…

    I’m using IS 6.5 and Developper 6.5

    Thanks in advance!


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 2.  RE: Using pub.client.ftp:put with a Stream

    Posted Wed November 23, 2011 03:18 PM

    BufferedInputStream is a subclass of InputStream. The getFile service is functioning properly. It is not loading the file into memory. What you see in the Results pane in Developer is the result of Object.toString applied to BufferedInputStream.

    Pass that to the put service. It will function as you desire.


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 3.  RE: Using pub.client.ftp:put with a Stream

    Posted Wed November 23, 2011 03:31 PM

    I think I’m going to cry…

    Actually the “put” service works as it should, but I was looking at another file which was written using a custom service that does write the stream directly (which I admit is a stupid idea)

    Sorry for the inconvenience :o


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods