use the service: pub.client:http to post, you can populate either: data/stream
or: data/mimeStream
with a stream object
also set:
Content-Type=application/octet-stream
under headers
on the receiver side, you will have a Stream object with name:
contentStream
It worked after setting the Content-type to octet-stream, previously I had it as multipart/mixed.
However, I have an issue while extracting the content of the mime message. On the sender side, I’m adding two body parts. File Content and XML data but on the receiver end when I used getNumParts service, it just shows me 1.
The sender has following steps to build the mime message
createMimeData
convert xml string to stream
addBodyPart (content as above stream, contentype as text/plain)
Read file as Stream
addBodyPart ( content as above stream, contentype as text/plain)
getEnvelopeStream - createMultipart to yes
call http (data/mimeStream as above stream, method - post, Content-type - application/octet-stream
Receiver has createMimeData to create mime object out of contentStream and invoke getNumParts to get a list of parts
I tried all the options I could think of but could not get the mime part working as it all the time gives me that the message has only one parts.
Can I send the variables in the args and send the file content as stream in the http call ?
Is it a good idea or can I use http headers to go around this problem ??
Yes you can in deed send vars in args and stream content (with appropriate content-type) in the http call and make sure the end point also accept the args.