You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Dean Hutchins <jd...@triad.rr.com> on 2003/09/18 23:09:51 UTC

Using Handler to Remove Attachment

Is there a way to remove an attachment from a Soap Message from within a request handler.  The Handler is called and the attachment doesn't appear to have been written to the defined axis attachment directory.  Code in Handler like:

public void invoke(MessageContext arg0) throws AxisFault {
      Message message = arg0.getCurrentMessage( );

      // Get and process attachment(s)...

      message.removeAllAttachments( ); 

}

The attachment is a large zipped file that I am attempting to unzip in the Handler and then remove from the message.  The objective was to eliminate the writing of the large file to the axis attachment directory only to have to read it in again to create a ZipInputStream object.   

Any suggestions or help would be appreciated.