“1. convert *input from stream to bytes using pub.io.streamToBytes”
There have been a number of posts talking about “converting” streams to bytes. Strictly speaking, this is not a “conversion” (even though the wM docs refer to it that way too). One reads from a stream to get the bytes–this is an I/O operation. I point this out only to help people realize what a stream really is so they can understand what they can and cannot do with it.
Depending on the service needs, one may not need to read the the entire stream by calling streamToBytes. Indeed, in the steps outlined by Satya above, reading the stream into a byte array is unnecessary. The convertToValues service accepts the ffData input parameter, which can be a String, an InputStream or a ByteArray. Just pass along the ffdata variable to convertToValues and it will work.
This is particularly important to do if the file is considered large and one uses the node iterator services to processes parts of the file at a time. If one reads the entire stream into memory, then you’ve defeated the purpose of using streams and node iteration.
#edi#Integration-Server-and-ESB#webMethods