Return-Path: Delivered-To: apmail-xml-axis-dev-archive@xml.apache.org Received: (qmail 12876 invoked by uid 500); 6 Dec 2002 15:07:36 -0000 Mailing-List: contact axis-dev-help@xml.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@xml.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-dev@xml.apache.org Received: (qmail 12858 invoked from network); 6 Dec 2002 15:07:34 -0000 Date: 6 Dec 2002 15:08:41 -0000 Message-ID: <20021206150841.28626.qmail@nagoya.betaversion.org> From: bugzilla@apache.org To: axis-dev@xml.apache.org Cc: Subject: DO NOT REPLY [Bug 15139] New: - After calling addAttachmentPart on a Message the writeTo method of Message returns null. X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15139 After calling addAttachmentPart on a Message the writeTo method of Message returns null. Summary: After calling addAttachmentPart on a Message the writeTo method of Message returns null. Product: Axis Version: 1.0 Platform: PC OS/Version: Windows NT/2K Status: NEW Severity: Blocker Priority: Other Component: Basic Architecture AssignedTo: axis-dev@xml.apache.org ReportedBy: nolanpt@uk.ibm.com We have basically written our own RPCJavaProvider that is called by the AxisServlet whenever it invokes any service. We get passed the MsgContext object containing the Request. When we come to constructing the response we are having problem with losing attachments. We only see the problem once the addAttachmentPart method is called to add our DataHandler to the response message. I have tried creating the DataHandler in many ways to see if that is a factor. I have tried all the techniques used in the sample code. I do not get any errors and no approach has helped. If I call the writeTo method on Message to see what has happened then all is fine until the addAttachmentPart. Then you only get null after that. The actual message returned from the AxisServlet back to the calling client is blank except for a small amount of header info. Even the SOAP envelope is missing. The problem looks very similar to defect 9780 but that defect looks closed. So maybe it is different. Anyway I tried creating FileDataSource datahandlers and that also made no difference - still broke I hope I have just missed out a step in the process but need a pointer to what that may be. Here is one of my many failed attempts DataHandler dhSource = new DataHandler( new MemoryOnlyDataSource( ((WSGWAttachment)part).getAttachmentString(), "text/plain")); org.apache.axis.attachments.AttachmentPart ap= new org.apache.axis.attachments.AttachmentPart( dhSource); responseMsg.addAttachmentPart(ap); // SOAP envelope stuff responseBody.addParam(new RPCParam(name,dhSource)); responseEnv.addBodyElement(responseBody);