Hi All, Im invoking a axis2 service in REST style using HttpClient. and its working fine but when i send any attachment they are not available through message context. below are the code listings i used
Client side code: String urlString = "http://localhost:8080/app/services/Customservice/simpleServiceToPing"; HttpClient client = new HttpClient(); PostMethod filePost = new PostMethod(urlString); filePost.addParameter("booleanParam", "true"); FilePart filePart = new FilePart("simple.txt", new File("c:\\simple.txt")); Part[] parts = {filePart}; RequestEntity sds = new MultipartRequestEntity(parts, filePost.getParams()); filePost.setRequestEntity(sds); int statusCode = client.executeMethod(filePost); System.out.println("Status details "+statusCode); service side code: public Object simpleServiceToPing(String booleanParam){ MessageContext messageContext = MessageContext.getCurrentMessageContext(); Attachments attachment = messageContext.getAttachmentMap(); String[] contentIds = attachment.getAllContentIDs(); System.out.println(contentIds.toString()); return null; } i have been working on this quite a long. could somebody please help me on this... Thank you, bala. -- View this message in context: http://www.nabble.com/Axis-server-is-not-loading-incomming-attachments-tp19668747p19668747.html Sent from the Axis - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
