Title: Attachments using axis 1.4

Hi all,
I am trying to send attachments using WSIF or soapUI to axis.
The scenario is I have web service called testAttachment with single paramter.The WSDL defintion does not say anything
that this method requires attachments.I am currently using the code mentioned by steve loughran where in attachments can be extracted using message context .

 
        private AttachmentPart[] getMessageAttachments() throws AxisFault
         {
                final MessageContext msgContext = MessageContext.getCurrentContext();
                final Message reqMsg = msgContext.getRequestMessage();
                final Attachments messageAttachments = reqMsg.getAttachmentsImpl();
                if (null == messageAttachments) {
                System.out.println("no attachment support");
                return new AttachmentPart[0];
                }
                final int attachmentCount= messageAttachments.getAttachmentCount();
                final AttachmentPart attachments[] =
                new AttachmentPart[attachmentCount];
                Iterator it = messageAttachments.getAttachments().iterator();
                int count = 0;
                while (it.hasNext()) {
                final AttachmentPart part = (AttachmentPart) it.next();
                attachments[count++] = part;
                }
                return attachments;
        }

I have dropped additonal jars for attachment support and axis does indicate that attachment is supported.But i am unable to

recieve using message context.I am pretty sure i am missing some thing.Please provide any info or pointer how to solve this issue.

Thanks
Amey


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to