wm.EDIINT:send Issues (AS2, EDI)

Im trying to send a customer a 997 back using AS2. I have the 997 and everything but when I hit the send it is giving me some mime error.

It gets past the profiles but when trying to create the mime data from the data to be encrypted it kills me. I pass in

data/contentType = application/edi-x12;
data/stream = java.io.ByteArrayInputStream

Actual EDI: ISA00 00 ZZXXXXXXXXXX ZZSSSSSSS 0903191425U004010000000270T>~GSFAfdfasdfdfBdsddf20090319142527X004010~ST9970001~AK1PO27~AK9A333~SE40001~GE127~IEA1000000027~

Unable to construct mime message javax.mail.internet.ParseException javax.mail.internet.ParseException at javax.mail.internet.ParameterList.(ParameterList.java:61) at javax.mail.internet.ContentType.(ContentType.java:83) at javax

what is the delivery method protocol defined in the profiles, which are used to send/receive the message?

My delivery method is set to “PrimaryHTTPS”.