// SOAP 1.1 body element found!
if (extElement instanceof SOAPBody) {
SOAPBody soapBody = (SOAPBody) extElement;
partsList = soapBody.getParts();
} else if (extElement instanceof SOAP12Body) {
SOAP12Body soapBody = (SOAP12Body) extElement;
partsList = soapBody.getParts();
} else if (extElement instanceof MIMEMultipartRelated) {
MIMEMultipartRelated minMimeMultipartRelated = (MIMEMultipartRelated) extElement;
List mimePartsList = minMimeMultipartRelated.getMIMEParts();
MIMEPart mimePart = null;
Object object;
List mimePartElements;
ExtensibilityElement mimePartExtensibilityElement;
for (Iterator mimePartsIter = mimePartsList.iterator(); mimePartsIter.hasNext();) {
object = mimePartsIter.next();
if (object instanceof MIMEPart) {
mimePart = (MIMEPart) object;
mimePartElements = mimePart.getExtensibilityElements();
for (Iterator mimePartElementsIter = mimePartElements.iterator(); mimePartElementsIter.hasNext();)
{
mimePartExtensibilityElement = (ExtensibilityElement) mimePartElementsIter.next();
if (mimePartExtensibilityElement instanceof SOAPBody) {
SOAPBody soapBody = (SOAPBody) mimePartExtensibilityElement;
partsList = soapBody.getParts();
} else if (mimePartExtensibilityElement instanceof SOAP12Body) {
SOAP12Body soapBody = (SOAP12Body) mimePartExtensibilityElement;
partsList = soapBody.getParts();
}
}
}
}
}