axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Prasad Chaudhari" <prasad.chaudh...@conject.com>
Subject Attachment retrieving in case axis2 based service and axis1based client.
Date Thu, 24 Aug 2006 10:41:52 GMT
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. But no luck.

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);

axis 1.1 server
MessageContext messageContext = MessageContext.getCurrentContext();
        Message message = messageContext.getRequestMessage();

How can I write the server code to fetch the attachment, without modifying
my client.

Mime
View raw message