dims 2002/06/23 13:20:19 Modified: java/src/org/apache/axis Message.java java/src/org/apache/axis/attachments Attachments.java AttachmentsImpl.java Log: More work on SAAJ compliance. Revision Changes Path 1.72 +18 -8 xml-axis/java/src/org/apache/axis/Message.java Index: Message.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/Message.java,v retrieving revision 1.71 retrieving revision 1.72 diff -u -r1.71 -r1.72 --- Message.java 22 Jun 2002 19:09:25 -0000 1.71 +++ Message.java 23 Jun 2002 20:20:19 -0000 1.72 @@ -480,8 +480,7 @@ * <CODE>MimeHeader</CODE> objects */ public MimeHeaders getMimeHeaders() { - //TODO: Flesh it out. - return null; + return headers; } /** @@ -491,7 +490,7 @@ * <P>This method does not touch the SOAP part.</P> */ public void removeAllAttachments(){ - //TODO: Flesh it out. + mAttachments.removeAllAttachments(); } /** @@ -512,7 +511,11 @@ * message */ public Iterator getAttachments(){ - //TODO: Flesh it out. + try { + return mAttachments.getAttachments().iterator(); + } catch (AxisFault af){ + log.error(JavaUtils.getMessage("exception00"), af); + } return null; } @@ -528,8 +531,7 @@ * that matches one of the given headers */ public Iterator getAttachments(MimeHeaders headers){ - //TODO: Flesh it out. - return null; + return mAttachments.getAttachments(headers); } /** @@ -543,7 +545,11 @@ * @throws java.lang.IllegalArgumentException */ public void addAttachmentPart(AttachmentPart attachmentpart){ - //TODO: Flesh it out. + try { + mAttachments.addAttachmentPart((org.apache.axis.Part)attachmentpart); + } catch (AxisFault af){ + log.error(JavaUtils.getMessage("exception00"), af); + } } /** @@ -557,7 +563,11 @@ * object */ public AttachmentPart createAttachmentPart() { - //TODO: Flesh it out. + try { + return (AttachmentPart) mAttachments.createAttachmentPart(); + } catch (AxisFault af){ + log.error(JavaUtils.getMessage("exception00"), af); + } return null; } } 1.7 +28 -1 xml-axis/java/src/org/apache/axis/attachments/Attachments.java Index: Attachments.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/attachments/Attachments.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- Attachments.java 27 Feb 2002 13:06:11 -0000 1.6 +++ Attachments.java 23 Jun 2002 20:20:19 -0000 1.7 @@ -89,6 +89,14 @@ public Part removeAttachmentPart(String reference) throws org.apache.axis.AxisFault; /** + * Removes all <CODE>AttachmentPart</CODE> objects that have + * been added to this <CODE>SOAPMessage</CODE> object. + * + * <P>This method does not touch the SOAP part.</P> + */ + public void removeAllAttachments(); + + /** * This method should look at a refernce and determine if it is a CID: or url * to look for attachment. * @param The reference in the xml that referers to an attachment. @@ -102,13 +110,32 @@ * @return A collection of attachments. */ public java.util.Collection getAttachments() throws org.apache.axis.AxisFault; - + + /** + * Retrieves all the <CODE>AttachmentPart</CODE> objects + * that have header entries that match the specified headers. + * Note that a returned attachment could have headers in + * addition to those specified. + * @param headers a <CODE>MimeHeaders</CODE> + * object containing the MIME headers for which to + * search + * @return an iterator over all attachments that have a header + * that matches one of the given headers + */ + public java.util.Iterator getAttachments(javax.xml.soap.MimeHeaders headers); + /** * Create a new attachment Part in this Message. * Will actually, and always, return an AttachmentPart. * @param The part that is referenced */ public Part createAttachmentPart(Object part) throws org.apache.axis.AxisFault; + + /** + * Create a new attachment Part in this Message. + * Will actually, and always, return an AttachmentPart. + */ + public Part createAttachmentPart() throws org.apache.axis.AxisFault; /** * Will the attachments of this message to that of the colleciton. 1.15 +34 -0 xml-axis/java/src/org/apache/axis/attachments/AttachmentsImpl.java Index: AttachmentsImpl.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/attachments/AttachmentsImpl.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- AttachmentsImpl.java 29 May 2002 13:05:54 -0000 1.14 +++ AttachmentsImpl.java 23 Jun 2002 20:20:19 -0000 1.15 @@ -362,4 +362,38 @@ } + /** + * Removes all <CODE>AttachmentPart</CODE> objects that have + * been added to this <CODE>SOAPMessage</CODE> object. + * + * <P>This method does not touch the SOAP part.</P> + */ + public void removeAllAttachments() { + //TODO: Flesh it out. + } + + /** + * Retrieves all the <CODE>AttachmentPart</CODE> objects + * that have header entries that match the specified headers. + * Note that a returned attachment could have headers in + * addition to those specified. + * @param headers a <CODE>MimeHeaders</CODE> + * object containing the MIME headers for which to + * search + * @return an iterator over all attachments that have a header + * that matches one of the given headers + */ + public java.util.Iterator getAttachments(javax.xml.soap.MimeHeaders headers) { + //TODO: Flesh it out. + return null; + } + + /** + * Create a new attachment Part in this Message. + * Will actually, and always, return an AttachmentPart. + */ + public Part createAttachmentPart() throws org.apache.axis.AxisFault { + //TODO: Flesh it out. + return null; + } }