SMIL as SOAP Attachment using SAAJ

Posted on 2007-10-03
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?
Question by:maskedavenger
    LVL 23

    Accepted Solution


    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.


    Author Comment


    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
    JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
    The viewer will learn how to count occurrences of each item in an array.
    The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now