I am working for making Attachment with SOAP (we are making a SOAP Messages with Attachment and then sent via socket It�s not any web service). It�s very simple application
The below jar files are in my class path saaj-ri.jar, saaj-api.jar, dom4j.jar,activation.jar,mail.jar,comman-logging.jar
java.lang.NoClassDefFoundError at com.sun.xml.messaging.saaj.soap.MessageImpl.createAttachmentPart(MessageImpl.java:305) at javax.xml.soap.SOAPMessage.createAttachmentPart(Unknown Source)
Peer Reynders
Bartender
Joined: Aug 19, 2005
Posts: 2906
posted
0
You may be experiencing a mailcap issue � though I can't be certain. When trying to find a DataContentHandler (DCH) JAF 1.0.2 checks for mailcap files in the following order
user.home/mailcap
java.home/lib/mailcap
META-INF/mailcap
META-INF/mailcap.default
Issues:
Some SAAJ implementations provide their own mailcap file. In that case it is necessary to make sure that the mail.jar (with its META-INF/mailcap file) occurs after the SAAJ implementation jar (which may have it's own META-INF/mailcap) in the class path. So move that mail.jar to the end of the classpath.
The user.home/mailcap or java.home/lib/mailcap may specify a DataContentHandler that is incompatible with the SAAJ-implementation and/or that is provided in a JAR not currently in your class path.
[ April 21, 2006: Message edited by: Peer Reynders ]