Hi Yogesh, Yes, got it working - Thanks for helping me out. I referred to the following link http://thilinag.blogspot.com/search/label/Axis2
Thanks, Asmita ________________________________ From: [email protected] [mailto:[email protected]] Sent: Tuesday, February 17, 2009 3:38 PM To: [email protected] Cc: [email protected] Subject: Re: MTOM file upload webservice I hope your issue is you don't have field for passing for attachementID/mime header .But in MTOM you dont need it.. Have you tried MTOM and SWA samples with Axis source? If you are using MTOM AttachmentType attachmentRequest = param0.getAttachmentRequest(); Base64Binary binaryData = attachmentRequest.getBinaryData(); DataHandler dataHandler = binaryData.getBase64Binary(); File file = new File( attachmentRequest.getFileName()); FileOutputStream fileOutputStream = new FileOutputStream(file); dataHandler.writeTo(fileOutputStream); if using SWA. ( you need attachment ID here..) MessageContext msgCtx = MessageContext.getCurrentMessageContext(); Attachments attachment = msgCtx.getAttachmentMap(); DataHandler dataHandler = attachment.getDataHandler(attchmentID); File file = new File( name); FileOutputStream fileOutputStream = new FileOutputStream(file); dataHandler.writeTo(fileOutputStream); Regards Yogesh Dhake "Attharkar, Asmita" <[email protected]> 02/12/2009 03:41 PM Please respond to [email protected] To "[email protected]" <[email protected]> cc Subject MTOM file upload webservice Hi, I am trying to write a web service which uploads a file so that it can be retrieved by the client. Most of the articles that I have read talks about file upload web service using SwA. My Web service is uploading the file with no issues and adding it to outMsgContext (like the eg shown for SwA) but I am having problem receiving it on the client side. My web service doesn’t contain any argument which stands for the attachment/data Handler). Any help is appreciated. Thanks, Asmita ________________________________ (Tel) 732-699-4657 | 4B566 | Telcordia Technologies | Piscataway NJ 08854 ________________________________ This transmittal and any attachments may contain confidential, privileged or sensitive information and is solely for the use of the intended recipient. If you are not the intended recipient, you are hereby notified that you have received this transmittal and any attachments in error and any review, dissemination, distribution or copying thereof is strictly prohibited. If you have received this transmittal and any attachments in error please notify the sender and immediately destroy the message and all its attachments. Any opinions herein expressed may be those of the author and not necessarily of Mizuho Corporate Bank, Ltd., Mizuho Corporate Bank (USA), Mizuho Securities USA Inc. or any other affiliates of Mizuho Financial Group ("Mizuho"). Mizuho accepts no responsibility for the accuracy or completeness of any information herein contained. E-Mail received by or sent from officer of Mizuho Securities USA Inc. (which is a registered U.S. broker-dealer and the entity through which Mizuho generally conducts its investment banking, capital markets, and securities business in the United States) is electronically archived and recorded and is subject to review and monitoring by and/or disclosure to persons other than the recipient, including (but not limited to) Mizuho Securities USA Inc. supervisory personnel. Such communications may be produced to regulatory authorities or others with legal rights to the information. If you have any questions, or if you no longer wish to receive e-mail in accordance with Japanese Act on Regulation of the Transmission of Specified Electronic Mail, please contact the sender of this e-mail. お問い合わせまたは特定電子メール法に 基づく送信停止のご要望等は、本電子メールの送信者にその旨ご連絡ください。
