empty mime body part

Hi All,

Ive scoured through the forums and i cant find a post related to the problem i am facing.

I am trying to create an smime message with content as an EDI string. I set the content-type to application/edifact; name=“attachment.edi” when i call the addBodyPart service. For testing purposes i then extract the payload from the smime message but i get inconsistent results! I either get the original payload or i get an empty payload!!! Now the funny thing is that when i change the content-type to text/plain it works all the time…I know there are few posts regarding writing content-handlers but i wouldnt need to write one for application/edifact would I? We use the AS2 connectivity quite a bit here so we can receive/send content with content-type of application/edifact so i find it very strange that the IS produces these inconsistent results when i create the mime data!

Has anyone seen this before or can anyone help?! I have attached some sample code that i have been using to test this interface.

ps the reason why i need to use application/edifact is that it is crucial for the customer.
SMimeSample.zip (23.4 KB)