Good response. But I don't think pub.io:streamToFile exists in any version. Perhaps you meant pub.file:streamToFile. Make sure to call pub.io:close on the stream after
Original Message:
Sent: Thu March 05, 2026 08:42 AM
From: Holm Steinland
Subject: Using pub.client:http for downloading files
Hi Fanny - great question.
You can absolutely download files via pub.client:http from IBM webMethods Integration Server
(and the same approach applies when your service runs on Edge Runtime in a DADA SaaS setup).
Below is a practical, step‑by‑step guide:
When file is small/medium (fits into memory):
pub.client:http
method = "get"url = (the full download URL you tested in the browser)headers (optional) = if your partner requires them (e.g., Authorization)followRedirects = true (good for "signed" or pre-signed URLs that redirect)loadAs = "bytes" (returns the body as bytes)
Outputs of interest:
status (e.g., 200)responseStatus (e.g., 200 OK)responseHeaders (for filename hints in Content-Disposition)body (the file content as bytes)
(Optional) Determine a filename from headers
- Parse
responseHeaders/Content-Disposition if present (e.g., attachment; filename="data_20260305.csv"). If absent, fallback to a configured or URL‑derived name.
pub.file:bytesToFile
bytes = pipeline bodyfilename = e.g., /interfaces/inbound/partner1/data_20260305.csvappend = false
That's it. You'll have the file on the IS/Edge host filesystem.
Note: For large files, avoid loading the entire content into memory:
pub.client:http
- Same as above, but set
loadAs = "stream".
Outputs of interest:
responseStream (InputStream)
Write stream to disk
- Prefer
pub.io:streamToFile if available in your version:stream = responseStreamfileName = target pathoverwrite = true
- If
pub.io:streamToFile is not present in your IS version, you have two common alternatives:pub.io:streamToBytes → pub.file:bytesToFile (still loads in memory; OK for medium sizes).- Implement a tiny Java service to copy the stream to file in chunks (true streaming, minimal memory).
(( AI generated summary and Examples ))
------------------------------
Holm Steinland
IBM
Ehningen
Original Message:
Sent: Thu March 05, 2026 04:50 AM
From: Fanny Tirtasari
Subject: Using pub.client:http for downloading files
Hi Webmethods expert,
I'm trying to understand how to use 'pub.client:http' for downloading files, but I can't find specific information in the available IBM documentation.
Can anyone guide me or share their experience on how this can be accomplished using 'pub.client:http'?
Basically we want to download some file from our Trading partners.
Instead of providing us the SFTP server, they just give us the URL to download it.
If we tried the URL in the browser, it can download the file instantly.
Just wondering how to accomplish this using Webmethods Designer.
Your insights would be greatly appreciated.
Thank you.
Fanny T