*
The moose likes Web Services and the fly likes Mail is not get send if i call web service, if i don't call web service mail is getting send Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Mail is not get send if i call web service, if i don Watch "Mail is not get send if i call web service, if i don New topic
Author

Mail is not get send if i call web service, if i don't call web service mail is getting send

Harsha Patil
Greenhorn

Joined: Jul 14, 2011
Posts: 4
I get following error,
Exception in thread "Thread-19" java.lang.ClassCastException: com.sun.xml.ws.encoding.StringDataContentHandler cannot be cast to javax.activation.DataContentHandler
at javax.activation.MailcapCommandMap.getDataContentHandler(MailcapCommandMap.java:581)
at javax.activation.MailcapCommandMap.createDataContentHandler(MailcapCommandMap.java:535)
at javax.activation.DataHandler.getDataContentHandler(DataHandler.java:597)
at javax.activation.DataHandler.writeTo(DataHandler.java:301)
at javax.mail.internet.MimeUtility.getEncoding(MimeUtility.java:264)
at javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1299)
at javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1008)
at javax.mail.internet.MimeMultipart.updateHeaders(MimeMultipart.java:414)
at javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1285)
at javax.mail.internet.MimeMessage.updateHeaders(MimeMessage.java:2071)
at javax.mail.internet.MimeMessage.saveChanges(MimeMessage.java:2039)
at javax.mail.internet.MimeMessage.writeTo(MimeMessage.java:1739)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:737)
at com.webaccess.cibilonline.util.SendMail.postMail(SendMail.java:127)
at com.webaccess.cibilonline.util.HTMLUtil$ThreadImpl.run(HTMLUtil.java:762)


the jars used are activation.jar and mail-1.4.2.jar
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12759
    
    5
Where does the web service come into the picture?

Is the web service call before the mail send attempt? If so, what is the result of the web service call?

You mention the library used for the mail call - but what is the toolkit you are using for the web service call?

Bill
Harsha Patil
Greenhorn

Joined: Jul 14, 2011
Posts: 4
Hi William ,

the web service is called before sending mail. could you please tell me that what do you want to know about toolkit? as the services are made in dot net framework and we are using client to call those services.Its works when we are not adding any services. so can you help us to resolve this issue asap. thanks in advance.
 
 
subject: Mail is not get send if i call web service, if i don't call web service mail is getting send
 
Similar Threads
NoClassDefFoundError JavaMail..........
Having Problem in sending mail
com.sun.mail... no classdef error when sending Mail
Javamail Exception (gnu.mail.handler.TextHtml)
Help Me : Error in sending mail from JSP