You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by di...@apache.org on 2004/03/25 21:32:05 UTC

cvs commit: ws-axis/java/src/org/apache/axis/attachments AttachmentsImpl.java

dims        2004/03/25 12:32:05

  Modified:    java/src/org/apache/axis/attachments AttachmentsImpl.java
  Log:
  Fix for AXIS-1246 - AttachmentsImpl.getAttachmentCount() may report 0 attachments for message that has >0 attachments
  from Tom Nelson
  
  Revision  Changes    Path
  1.45      +6 -1      ws-axis/java/src/org/apache/axis/attachments/AttachmentsImpl.java
  
  Index: AttachmentsImpl.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/attachments/AttachmentsImpl.java,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- AttachmentsImpl.java	25 Feb 2004 14:02:30 -0000	1.44
  +++ AttachmentsImpl.java	25 Mar 2004 20:32:05 -0000	1.45
  @@ -514,8 +514,13 @@
           try {
               mergeinAttachments();
   
  +            // force a serialization of the message so that
  +            // any attachments will be added
  +            soapPart.getAsString();
  +            
               return orderedAttachments.size();
           } catch (AxisFault e) {
  +            log.warn(Messages.getMessage("exception00"),e);
           }
   
           return 0;
  @@ -548,7 +553,7 @@
               orderedAttachments.clear();
               stackDataHandler.clear();
           } catch (AxisFault af){
  -            log.warn(Messages.getMessage("exception00"));
  +            log.warn(Messages.getMessage("exception00"),af);
           }
       }