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
  • 1.  Cannot extract multipart MIME data sent through REST

    Posted 02/21/18 11:07 AM

    Hi. I have a problem with extracting multipart MIME that I received through REST. The MIME data has 2 parts: a parameter and a zip file. It seems that it extracts only 1st part of the message. However, if I use pub.is.streamToString and I log it, then I see that the whole message.

    The service components that creates MIME data and sends it :
    pub.file:getFile (got stream)
    pub.mime:createMimeData (empty container)
    pub.io:stringToStream (the parameter will be streamed)
    pub.mime:addBodyPart (stream-parameter will be added)
    pub.mime:addBodyPart (zip file will be added)
    pub.mime:getEnvelopeStream
    pub.client:http (The envStream will be sent as mimeData.)

    Then I receive at the _post and I use the following services:
    pub.mime:createMimeData (contentStream as input)
    pub.mime:getPartsNum

    As the result I get always 1 instead of 2.
    Do you know how to deal with that?
    Many thanks,
    Krzysztof


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


  • 2.  RE: Cannot extract multipart MIME data sent through REST

    Posted 03/01/18 06:12 AM

    The solution is as follows:

    pub.flow:getTransportInfo
    pub.mime:mergeHeaderAndBody

    Input to pub.mime:mergeHeaderAndBody:
    headerLine (it’s from transport/http/requestHdrs)
    body/stream (contentStream from the begging in the pipeline)

    This solution was provided by SAG Support and tested by me.

    Greetings,
    Krzysztof


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


  • 3.  RE: Cannot extract multipart MIME data sent through REST

    Posted 03/15/21 06:30 PM

    hi Krzysztof Sochiera,

    Can you please help us in the above in detail.
    We are working on posting the Multipart file to REST API and we are getting the file at the target as 0 bytes.
    Please help us.

    Regards
    Dinesh


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