Layer 7 API Management

Expand all | Collapse all

Creating Multipart messages with binary attachments

  • 1.  Creating Multipart messages with binary attachments

    Posted 10-04-2017 03:58 AM

    Hi All,

     

    We are trying to make a multipart message from scratch - with a binary attachment (e.g. a zip or pdf file). 

    Is there any way to create such a message? When we try to use the set context Variable assertion and add the attachment as text, it's not a binary file anymore. Base 64 is not an option.

     

    Perhaps there is a tactical assertion - create a multipart message, or something like that?

     

    Thanks,

     

    Jan Jaap



  • 2.  Re: Creating Multipart messages with binary attachments

    Posted 10-04-2017 08:57 AM

    Hi Jan,

     

    There is a tactical assertion for creating a MIME message. You will need to create a support ticket requesting access to the tactical assertion.



  • 3.  Re: Creating Multipart messages with binary attachments

    Posted 10-04-2017 09:03 AM

    Hi Barry,

     

    Thanks for your help. Do you happen to know if this works for a binary multipart too?

    Will open a case an request to check.

     

    Thanks,

     

    Jan Jaap



  • 4.  Re: Creating Multipart messages with binary attachments

    Posted 10-04-2017 12:18 PM

    Jan,

    The Tactical assertion you want to request is AssembleMimeMessage 

    Support will need you exact gateway version from the rpm -qa | grep ssg.

    There is no specific reference to binary in the user documentation of the tactical assertion.

    But you can specify the content header type and at first glance I dont see a reason why it couldnt include binary files, but I havent specifically tested it.

    Thanks.



  • 5.  Re: Creating Multipart messages with binary attachments

    Posted 10-05-2017 02:56 AM

    Hi Charles, 

     

    Thanks for your reply, I have opened a case and requested the assertion. Creating a multipart message with set context var doesn't work since the gateway tries to interpred the binary string which fails - creating a corrupted file. I fear that the tatical assertion also only works for string values (or base 64 encoded attachments) but will try it to be sure.

     

    Thanks.



  • 6.  Re: Creating Multipart messages with binary attachments

    Posted 11-09-2017 10:19 AM

    Please let us know if the assertion did what you are looking to do. If not please log a idea on our community for this use case.

     

    Sincerely,

     

    Stephen Hughes

    Director, CA Support