contentType = SAAJUtil.normalizeContentType(tmpContentType);
}
}
if (HTTPConstants.MEDIA_TYPE_MULTIPART_RELATED.equals(contentType)) {
try {
Attachments attachments =
new Attachments(inputstream, tmpContentType, false, "", "");
// Axiom doesn't give us access to the MIME headers of the individual
// parts of the SOAP message package. We need to reconstruct them from
// the available information.
MimeHeaders soapPartHeaders = new MimeHeaders();
soapPartHeaders.addHeader(HTTPConstants.HEADER_CONTENT_TYPE,
attachments.getSOAPPartContentType());
String soapPartContentId = attachments.getSOAPPartContentID();
soapPartHeaders.addHeader("Content-ID", "<" + soapPartContentId + ">");
soapPart = new SOAPPartImpl(this, attachments.getSOAPPartInputStream(),
soapPartHeaders, processMTOM ? attachments : null);
for (String contentId : attachments.getAllContentIDs()) {
if (!contentId.equals(soapPartContentId)) {
AttachmentPart ap =
createAttachmentPart(attachments.getDataHandler(contentId));
ap.setContentId("<" + contentId + ">");
attachmentParts.add(ap);
}
}
} catch (OMException e) {