axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 15139] New: - After calling addAttachmentPart on a Message the writeTo method of Message returns null.
Date Fri, 06 Dec 2002 15:08:41 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15139>.
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);

Mime
View raw message