473,785 Members | 2,847 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.activatio n.UnsupportedDa taTypeException : no object DCH for MIME
type image/gif at javax.activatio n.ObjectDataCon tentHandler.wri teTo(DataHandle r.java:851)
at javax.activatio n.DataHandler.w riteTo(DataHand ler.java:305)
at javax.mail.inte rnet.MimeBodyPa rt.writeTo(Mime BodyPart.java:1 089)
at javax.mail.inte rnet.MimeBodyPa rt.writeTo(Mime BodyPart.java:6 35)
at javax.mail.inte rnet.MimeMultip art.writeTo(Mim eMultipart.java :233)
at com.sun.xml.mes saging.saaj.soa p.MessageImpl.s aveChanges(Mess ageImpl.java:56 3)
at com.sun.xml.mes saging.saaj.cli ent.p2p.HttpSOA PConnection.pos t(HttpSOAPConne ction.java:223)
at com.sun.xml.mes saging.saaj.cli ent.p2p.HttpSOA PConnection$Pri viledgedPost.ru n(HttpSOAPConne ction.java:151)
at java.security.A ccessController .doPrivileged(N ative Method)
at com.sun.xml.mes saging.saaj.cli ent.p2p.HttpSOA PConnection.cal l(HttpSOAPConne ction.java:121)
at com.vod.mm7inbo und.GenericList enerThread.run( GenericListener Thread.java:221 )
at java.lang.Threa d.run(Thread.ja va:536)
Feb 20, 2004 12:43:54 PM com.sun.xml.mes saging.saaj.soa p.MessageImpl
saveChanges
SEVERE: SAAJ0540: Error during saving a multipart message
com.sun.xml.mes saging.saaj.SOA PExceptionImpl: 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.ava ilable();
byte[] imagen = new byte[numb];
for (int i= 0; i<numb;i++)
{
imagen[i]=(byte)miFicher oSt.read();
}
AttachmentPart ap = message.createA ttachmentPart() ;
//DataHandler pdfDH = new DataHandler(miF icheroSt ,"text/plain");
//ap.setDataHandl er(pdfDH);
ap.setContentTy pe("image/gif");
ap.setContent(n ew ByteArrayInputS tream(imagen) ,"image/gif");
message.addAtta chmentPart(ap); .

Thanks in advance.
Bye.
Jul 17 '05 #1
1 6715
Vamshi
1 New Member
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@gm ail.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
7053
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. Obviuosly, the file is fine on the server, so the attachment code I am using must be corrupting it, but I dont know what it is: // send email with attachment function emailAttachment($to, $subject, $message, $name, $email,
4
2457
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 do this.. It's all i've found in my searching. All my attachments are going to be ..gifs or .jpegs... Thanks in advance. below is the code: <?php
1
6525
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. before the latest MS security patch, the one that disabled adodb.stream object, this also worked nicely for upload-files (<input type=file>). I just read the file from the users harddisk using the adodb.stream activeXObject, read it into a an xml-node...
1
3382
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 always return "Missing Input". I have tried various "correlationType: endpoint, operation, namespace". When I eyeball the captured SOAP messages, they looks fine with correct namespace and valid operation name within the soap body of the...
1
2278
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 implemented in java ,client is dot.net,can i use dime to deal with soap attachment?Are there any restriction exists? Addittional resource will be more helpful!! thanks in advance!!
0
1695
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 and I want to decode this message to save this PDF file on my HD. I have found a PHP library "PEAR::Net_Dime", but i need some example to understand how it work. Can you help me please?
7
7647
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 can't seem to figure it out. Here is what I have so far. p = POP3("mail.server.com")
2
5158
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 make it 271 lines (13,112 KB), it causes the script to end with a soap fault. I've tried adding substance to the 270 lines to make the file bigger with out adding lines, but it didn't fail. I've installed everything on a second development box...
2
9524
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 Rule &apos;Invalid HTTP Message&apos; aborted processing. Invalid mime format System Name: ccgows012
0
9645
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10330
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10153
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8976
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6740
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4053
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3654
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2880
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.