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.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
Expand all | Collapse all

HTTPS Get and Save Data to File

  • 1.  HTTPS Get and Save Data to File

    Posted 10/21/03 09:13 PM

    Hi everyone,

    I am trying to get an encrypted file via HTTPS. I can successfully get the file, but I then want to save it as a text file. I am trying to use convertToString, but it is creating an empty file, probably because of the schema parameter. Is there a better way to do this?

    Thanks,
    Kim


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


  • 2.  RE: HTTPS Get and Save Data to File

    Posted 10/21/03 10:07 PM

    Just use pub.string:bytesToString and then save the string, or map the bytes (or stream) from the response into your save method (assuming it takes bytes or alternatively a stream).


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


  • 3.  RE: HTTPS Get and Save Data to File

    Posted 10/22/03 12:30 AM

    Thanks, I used the bytesToString… but what do you mean by saving it? I tried savePipelineToFile, but I’m getting xml tags at the top, otherwise it works great. Do you know how to get rid of the tags?

    Thanks again!
    Kim


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


  • 4.  RE: HTTPS Get and Save Data to File

    Posted 10/22/03 01:21 AM

    There is no built-in save functionality but you might be able to obtain some utility services from webMethods support or professional services.

    The savePipelineToFile method saves the pipeline variables at a specific point in your flow into a special directory on the server(ie. all the strings and objects in your flow) webMethods uses a special XML file to load and save these variables. It’s not for saving your own files to disk. You need your own java service for this.


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


  • 5.  RE: HTTPS Get and Save Data to File

    Posted 10/22/03 03:15 AM

    > savePipelineToFile method saves the pipeline variables at a specific
    > point in your flow into a special directory on the server

    Just a small correction - savePipelineToFile can save a pipeline to anywhere on disk (you just have to specify the full or relative path).


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


  • 6.  RE: HTTPS Get and Save Data to File

    Posted 10/22/03 05:32 PM

    Thanks Sonam - as you say if you provide a relative path however it will be relative to the install directory.


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


  • 7.  RE: HTTPS Get and Save Data to File

    Posted 10/22/03 08:54 PM

    Kim, if you want to write a file to disk, I suggest you take a look in the WmSamples package. There is an example of using Java IO classes to write to a flat file. Take a look at the sample.IO.test:writeToFile service and the supporting Java services in the sample.IO.utils folder.


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


  • 8.  RE: HTTPS Get and Save Data to File

    Posted 10/23/03 08:55 AM

    Hello,

    use PSUtilities package from webMethods Advantage.
    In it, you will find, among others, utilities to save file anywhere you want.

    HTH

    Gordan


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


  • 9.  RE: HTTPS Get and Save Data to File

    Posted 11/24/03 10:50 PM

    Kim,
    I have a similar requirement to grab a text file from a HTTPS site. I was wondering if you could share how you grabbed the file initially? Did you utilize the “GET” method or did you use some other means?

    thanks in advance,
    Michael


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


  • 10.  RE: HTTPS Get and Save Data to File

    Posted 11/25/03 12:39 AM

    If you’re dealing with large files, I’d suggest retrieving the resource as a stream in the HTTP service. This allows you to perform streaming from network to disk to reduce overall resource use.


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