We help IT Professionals succeed at work.

SMIL as SOAP Attachment using SAAJ

Last Modified: 2013-11-23
I have been building a SOAP based client using SAAJ.

What I need to do is create a SMIL attachment.

Lets say my SMIL XML has an image element:
- Do I have to add both these elements as attachments in the SOAP body?

XML Sample:
String smilContent = "<smil>
<img href="cid:smil_image" />

Code Sample:
AttachmentPart attachment = message.createAttachmentPart();

attachment.setContent(smilContent, "multipart/Related;Type=\"application/smil\";Start=\"<SMIL>\";");

attachment.setContent(imageContent, "image/jpeg");

Or is there a better way of handling SMIL as SOAP attachments?
Watch Question

Unlock this solution and get a sample of our free trial.
(No credit card required)
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.