dims 2002/12/30 11:40:54
Modified: java/src/org/apache/axis/encoding/ser
JAFDataHandlerSerializer.java
Log:
Fix for Bug 15575 - cid: prefix on returned attachments confuses MS SOAP Toolkit 3.0
Revision Changes Path
1.24 +6 -2
xml-axis/java/src/org/apache/axis/encoding/ser/JAFDataHandlerSerializer.java
Index: JAFDataHandlerSerializer.java
===================================================================
RCS file:
/home/cvs/xml-axis/java/src/org/apache/axis/encoding/ser/JAFDataHandlerSerializer.java,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- JAFDataHandlerSerializer.java 20 Dec 2002 17:28:20 -0000 1.23
+++ JAFDataHandlerSerializer.java 30 Dec 2002 19:40:54 -0000 1.24
@@ -57,6 +57,7 @@
import org.apache.axis.Constants;
import org.apache.axis.Part;
+import org.apache.axis.client.Call;
import org.apache.axis.attachments.Attachments;
import org.apache.axis.components.logger.LogFactory;
import org.apache.axis.encoding.SerializationContext;
@@ -101,7 +102,6 @@
throw new IOException(Messages.getMessage("noAttachments"));
}
SOAPConstants soapConstants =
context.getMessageContext().getSOAPConstants();
-
Part attachmentPart= attachments.createAttachmentPart(dh);
AttributesImpl attrs = new AttributesImpl();
@@ -116,8 +116,12 @@
attrs.removeAttribute(typeIndex);
}
+ boolean doTheDIME = false;
+ if(attachments.getSendType() == Attachments.SEND_TYPE_DIME)
+ doTheDIME = true;
+
attrs.addAttribute("", soapConstants.getAttrHref(),
soapConstants.getAttrHref(),
- "CDATA", attachmentPart.getContentIdRef() );
+ "CDATA", doTheDIME ? attachmentPart.getContentId() :
attachmentPart.getContentIdRef() );
context.startElement(name, attrs);
context.endElement(); //There is no data to so end the element.