Hi all >From long time I am not able to access the attachment. could any one please help me regarding the following problem
I am using message-style service method (not RPC mode), now at client side I can attach any attachment (i.e. binary file or in my case xml file) and can send our the wire by using the HTTP protocol but now the server side I cant access the only attachment because there are only 4 methods (see axis user guide for reference) allowed in messaging-style service. which are 1>>public Element [] method(Element [] bodies); 2>>public SOAPBodyElement [] method (SOAPBodyElement [] bodies); 3>>public Document method(Document body); 4>>public void method(SOAPEnvelope req, SOAPEnvelope resp); now I am using the 4th one after trying the 3rd one, now I can get the soapEnvelope but not able to get the soapMessage actually which contain attachments and soapEnvelope etc. Now the each method doesn't allow to access the soapMessage object( kind of container for AttachementPart & SOAPPart), or there might be another way to access the SOAPmessage object because if I get the soapMessage object then I will use the following method and can retrieve any number of attachments. SOAPMessage.getAttachments(); Now do any one know how to access the attachment by using above 4 method signatures. here is my client application code where I am attaching the file SOAPConnectionFactory scf = SOAPConnectionFactory.newInstance(); SOAPConnection sc = scf.createConnection(); MessageFactory msgFactory = MessageFactory.newInstance(); SOAPMessage message = msgFactory.createMessage(new MimeHeaders(), new ByteArrayInputStream(getXMLMessage).getBytes())); SOAPPart soapPart = message.getSOAPPart(); AttachmentPart attpart = message.createAttachmentPart(); //there i am attaching the XML document attpart.setContent(getXMLAttachment(),"text/plain"); message.addAttachmentPart(attpart); URLEndpoint urlEndPoint = new URLEndpoint("http://localhost:9999/axis/services/claimmsgservice"); //System.out.println("before call service "+message.getAttachments()); SOAPMessage response = sc.call(message, urlEndPoint); but on server side I am not able to access the SOAPMessage object because of the limitation of 4 types of method I would really appreciate if some one could help me in this matter. Thanks & regards Naeem Malik Naeem Malik Technical Consultancy Team ___________________________ FINEOS Corporation Pembroke House 8 - 10 Lower Pembroke St Dublin 2 Email: [EMAIL PROTECTED] Ph: +353 1 6399797(Direct) Fax: +353 1 6399701 Why don't you visit our website at http://www.FINEOS.com ENTERPRISE SOLUTIONS FOR BANKING AND INSURANCE ********************************************************************** The information contained in this e-mail is confidential, may be privileged and is intended only for the user of the recipient named above. If you are not the intended recipient or a representative of the intended recipient, you have received this e-mail in error and must not copy, use or disclose the contents of this e-mail to anybody else. If you have received this e-mail in error, please notify the sender immediately by return e-mail and permanently delete the copy you received. This e-mail has been swept for computer viruses. However, you should carry out your own virus checks. Registered in Ireland, No. 205721. http://www.FINEOS.com **********************************************************************