How to receive files (Pdf, Doc, JPG etc)

Hello Experts,

We have one requirement where source system is sending files in PDF, Doc, PPT, JPEG etc format. webMethods system will reroute these files to other system using rest API.
Can anyone please suggest how to receive files using webMethods flow service.

Thanks in Advance

This can be done using a flow service with contentStream as input and then you can convert it to bytes and process the files. If the source system specifies the file name with extension or file type it will be easy to re-route from ESB layer to the target system.

Let me know if you have any questions.

Points to consider:

What is the max file size?

Have you considered using other file transfer protocols like ftp,sftp?

Thanks M@he$h
I tried with inbuilt service pub.io.streamToBytes but received below error.
lastError error [ISS.0086.9167] stream is a required field
errorType com.wm.app.b2b.server.ServiceException
errorDump com.wm.app.b2b.server.ServiceException: [ISS.0086.9167] stream is a required field at pub.io.streamToBytes(io.java:126) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:94) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55) at

My Code flow is as below.
Sequence(Main)
Sequence(Try)
pub.io.streamToBytes
Sequence(catch)
Input data type - Object

Share your code sample or contact me via email. I did try a sample and it is working I am able to send and receive attachments and store them in the FS.