We help IT Professionals succeed at work.

SMIL as SOAP Attachment using SAAJ

785 Views
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>
...
<body>
<img href="cid:smil_image" />
</body>
...
</smil>";

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

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

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

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

Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
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.

OR

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.