Link to home
Start Free TrialLog in
Avatar of maskedavenger
maskedavenger

asked on

SMIL as SOAP Attachment using SAAJ

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?
ASKER CERTIFIED SOLUTION
Avatar of rama_krishna580
rama_krishna580
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of maskedavenger
maskedavenger

ASKER