You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Prasad Chaudhari <pr...@conject.com> on 2006/08/24 12:35:41 UTC

Attachment retrieving in case axis2 based service and axis1based client.

Hi All,

I have gone through internet and this forum to find out how to retrieve the
attachment, if they are attached using axis1.1.

Sample codes.

axis 1.1 client :-
        call.setProperty(Call.ATTACHMENT_ENCAPSULATION_FORMAT,
attachmentType);
        DataHandler dh = new DataHandler(new
FileDataSource("/tmp/file.doc"));
        AttachmentPart attachmentPart = new AttachmentPart(dh);
        attachmentPart.setContentId(zipFile.getName());
        call.addAttachmentPart(attachmentPart);
SOAPEnvelope returnedEnvelope = call.invoke(requestEnvelope);

RE: Attachment retrieving in case axis2 based service and axis1based client.

Posted by "Rathore, Amit Singh (STSD)" <ra...@hp.com>.
Hi Prasad,
I am not able to understand what you are trying to say with this code on
Web service with attachments. Can you give me more details about the
problem that you are facing and the reason to look at Web Service
attachmetns.
 
--
Amit Singh Rathore


________________________________

	From: prasadvchaudhari@googlemail.com
[mailto:prasadvchaudhari@googlemail.com] On Behalf Of Prasad Chaudhari
	Sent: Thursday, August 24, 2006 4:06 PM
	To: axis-user@ws.apache.org
	Subject: Attachment retrieving in case axis2 based service and
axis1based client.
	
	
	Hi All,
	
	I have gone through internet and this forum to find out how to
retrieve the attachment, if they are attached using axis1.1. 
	
	Sample codes. 
	
	axis 1.1 client :- 
	        call.setProperty(Call.ATTACHMENT_ENCAPSULATION_FORMAT,
attachmentType);
	        DataHandler dh = new DataHandler(new
FileDataSource("/tmp/file.doc"));
	        AttachmentPart attachmentPart = new AttachmentPart(dh);
	        attachmentPart.setContentId(zipFile.getName());
	        call.addAttachmentPart(attachmentPart);
	SOAPEnvelope returnedEnvelope = call.invoke(requestEnvelope);