stevel 2003/01/31 17:23:32
Modified: java/src/org/apache/axis/soap SOAPConnectionImpl.java
Log:
handle builds with no attachment support robustly, by not trying to iterate over any
attachments. bug ID 16649, reported by Gerhard Engelbrecht
Revision Changes Path
1.13 +6 -4 xml-axis/java/src/org/apache/axis/soap/SOAPConnectionImpl.java
Index: SOAPConnectionImpl.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/soap/SOAPConnectionImpl.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- SOAPConnectionImpl.java 11 Dec 2002 22:38:22 -0000 1.12
+++ SOAPConnectionImpl.java 1 Feb 2003 01:23:32 -0000 1.13
@@ -94,10 +94,12 @@
SOAPEnvelope env = ((org.apache.axis.Message)request).getSOAPEnvelope();
Attachments attachments = ((org.apache.axis.Message)
request).getAttachmentsImpl();
- Iterator iterator = attachments.getAttachments().iterator();
- while(iterator.hasNext()){
- Object attachment = iterator.next();
- call.addAttachmentPart(attachment);
+ if (attachments != null) {
+ Iterator iterator = attachments.getAttachments().iterator();
+ while (iterator.hasNext()) {
+ Object attachment = iterator.next();
+ call.addAttachmentPart(attachment);
+ }
}
call.setReturnClass(SOAPMessage.class);
call.invoke(env);