473,382 Members | 1,332 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Add a attachment with a jpeg file to a soap messages

Hi everybody!!
First of all, sorry about my english. I promise to improve it. I have
a big problem when I try to add an attachment which contains a image
in it. I have to solve it as soon as possible so i would really
appreciate any help.
The mistake thrown is the following:
javax.activation.UnsupportedDataTypeException: no object DCH for MIME
type image/gif at javax.activation.ObjectDataContentHandler.writeTo( DataHandler.java:851)
at javax.activation.DataHandler.writeTo(DataHandler.j ava:305)
at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyP art.java:1089)
at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyP art.java:635)
at javax.mail.internet.MimeMultipart.writeTo(MimeMult ipart.java:233)
at com.sun.xml.messaging.saaj.soap.MessageImpl.saveCh anges(MessageImpl.java:563)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConn ection.post(HttpSOAPConnection.java:223)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConn ection$PriviledgedPost.run(HttpSOAPConnection.java :151)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConn ection.call(HttpSOAPConnection.java:121)
at com.vod.mm7inbound.GenericListenerThread.run(Gener icListenerThread.java:221)
at java.lang.Thread.run(Thread.java:536)
Feb 20, 2004 12:43:54 PM com.sun.xml.messaging.saaj.soap.MessageImpl
saveChanges
SEVERE: SAAJ0540: Error during saving a multipart message
com.sun.xml.messaging.saaj.SOAPExceptionImpl: Error during saving a
multipart message
The code is this:
************************************************** *********************************************

File fd = new File("/home/tibco/products/adapters/development/esther/mm7inbound/scripts/1.gif");
FileInputStream miFicheroSt = new FileInputStream(fd);
int numb = miFicheroSt.available();
byte[] imagen = new byte[numb];
for (int i= 0; i<numb;i++)
{
imagen[i]=(byte)miFicheroSt.read();
}
AttachmentPart ap = message.createAttachmentPart();
//DataHandler pdfDH = new DataHandler(miFicheroSt ,"text/plain");
//ap.setDataHandler(pdfDH);
ap.setContentType("image/gif");
ap.setContent(new ByteArrayInputStream(imagen) ,"image/gif");
message.addAttachmentPart(ap);.

Thanks in advance.
Bye.
Jul 17 '05 #1
1 6688
Vamshi
1
Hi Antonio.

I too am having the same problem. Could you please let me know if you have any solution for the soap atachment.
please email me at vamshi.maram@gmail.com.

I really appreciate your help if you can send me the solution.


Thanks
Vamshi
Nov 8 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Paul Lamonby | last post by:
Hi, I am sending a file from the server as an email attachment. The file is being attached no problem and sending the email, but I get an error when I try to open it saying it is corrupt....
4
by: phatnugs420 | last post by:
Hi all, i've been struggling with creating a form that lets you add an attachment and the attachment is sent via email.. I was wondering if recieving attachments in an md5 form is the only way to...
1
by: SqlJunkies User | last post by:
Hi! is there any way to to upload a file as a soap-attachment??? I have written a jscript function that handles all form-data, packs it up into one xml-file and sends it off to the server....
1
by: Clara Yeung | last post by:
I have captured some SOAP messages (using org.wsi.test.monitor.Monitor of the WSI test tool). When I try to analyze the messages with WSI test tool analyzer, the "message" artifact of the report...
1
by: gladiator | last post by:
Hello: what is the difference between soap message's attachment and soap message's DimeAttachment,in dot net. If The web service is implemented in different language , for example. Web service is...
0
by: Khalid | last post by:
hi, i have a web services that return me a message soap with a file attachment encoded in DIME format and sent over SOAP. This file is a PDF. I want to consume this web service with a PHP client...
7
by: erikcw | last post by:
Hi all, I'm trying to extract zip file (containing an xml file) from an email so I can process it. But I'm running up against some brick walls. I've been googling and reading all afternoon, and...
2
by: pmlane2001 | last post by:
I have a PHP SOAP XML file size problem that I was wondering if anyone has seen before. I have an XML file that when I put it through my PHP script with 270 lines (13,082 KB) it works fine. If I...
2
by: talk2jyotish | last post by:
I have to send a zip file whose name is MeFAttachment.zip as an attachment in SOAP 1.1 packet. But I get an error while submitting. Here is the error description Server Error 415 IDP...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.