axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dittmann Werner <>
Subject Problems with attachments (SOAP with Attachments)
Date Wed, 22 Oct 2003 10:41:14 GMT

during some tests with SOAP with Attachments (SwA) using WSDL I
discovered some problems regarding attachment handling.

The attachment is a mutlipart/mixed that is part of the overall
multipart/related message (see attached example).

The service contains the method swaSend that gets a decoded
MimeMultipart from Axis. Because Axis creates temporary files during
attachment handling, I added some code to delete the temporary file
after processing of the attachment was done. However, the dispose()
method in AttachmentPart didn't delete the temporary attachment
file. The follwing bugs were found:

- the variable "attachmentFile" was not properly set when attachment
  parts are created with "ManagedMemoryDataSource" as the data source
  of DataHandler.

- After fixing this bug the f.delete() call in dispose() returned
  false, i.e. didn't delete the temporary attachment file. 

  I enhanced the dispose to call the ManagedMemoryDataSource specific
  delete function if the data source is of that type.

  BTW, some further tracking showed that the temporary file was not
  properly closed. In MimeMultipartDataHandlerDeserializer.startElement()
  the MimeMultipart parses the input. It seems that the parse does
  not close the inputstream (not an Axis problem).

The attachment contains the full SwA example and the patch to fix the
mentioned bugs (hope the patch is in the correct format because I 
don't have a real CVS environment).


Werner Dittmann
Siemens ICM N AS BD E
Tel:   +49(0)89 636 50265
Mobil: +49(0)172 85 85 245

View raw message