Layer7 API Management

 View Only
  • 1.  Add a binary attachment to a message

    Posted May 10, 2016 12:04 PM

    We need to read a (binary or text) file from the MySQL database and attach it as a binary file to a SOAP message (as a multipart/related attachment). In other words, we need an assertion “add attachment to message” where the attachment can be text or binary data. That assertion should create a new multipart related message and change the original message as the mainpart, if the current message is not already multipart/related. The preceding step, retrieving the data from the database, should also preserve the binary data and not convert it to text. Does anyone know how to do this?



  • 2.  Re: Add a binary attachment to a message

    Broadcom Employee
    Posted Sep 07, 2016 03:56 PM

    I don't know, short of using an XSLT or building it out in a template. I assume you would want this as SOAP with Attachment? Or MTOM? Or are you thinking about something different?



  • 3.  Re: Add a binary attachment to a message

    Broadcom Employee
    Posted Sep 07, 2016 04:34 PM

    There is  a custom assertion called AssembleMimeMessageAssertion that can be used to build a Multipart message and include SOAP attachments in response. This assertion is not supplied Out of the Box but  can be obtained via a support  ticket request



  • 4.  Re: Add a binary attachment to a message

    Broadcom Employee
    Posted Sep 16, 2016 11:56 AM

    Heiko,

     

    Did either of the posts answer your question?

     

    Sincerely,

     

    Stephen Hughes

    Director, CA Support