• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 695
  • Last Modified:

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?
0
maskedavenger
Asked:
maskedavenger
1 Solution
 
rama_krishna580Commented:
Hi,

The problem could be with the missing libraries: xercesImpl.jar, xalan.jar
which come toghether with JWSDP and should be used with saaj_impl.jar (have renamed packages, so you have to download the JWSDP package from SUN, and take the libs from jaxp/lib/endorsed dir.

Other solution is to used Axis.jar library for processing SOAP message. In this case you should comment the line  System.setProperty("javax.xml.soap.MessageFactory","com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl");
and use the defalut MessageFactoryImpl from Axis.

R.K
0
 
maskedavengerAuthor Commented:
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now