BindingOutput bindingOutput = operation.getBindingOutput();
BindingInput bindingInput = operation.getBindingInput();
if (bindingOutput != null) {
MIMEMultipartRelated multipartOutput = WsdlUtils.getExtensiblityElement(
bindingOutput.getExtensibilityElements(), MIMEMultipartRelated.class);
getConfig().setReceivesAttachments(multipartOutput != null);
if (multipartOutput != null) {
List<MIMEPart> parts = multipartOutput.getMIMEParts();
Map<String, Part> partMap = new HashMap<String, Part>();
for (int c = 0; c < parts.size(); c++) {
List<MIMEContent> contentParts = WsdlUtils.getExtensiblityElements(parts.get(c)
.getExtensibilityElements(), MIMEContent.class);
for (MIMEContent content : contentParts) {
Part part = partMap.get(content.getPart());
if (part != null) {
if (!part.getContentTypeList().contains(content.getType())) {
part.addContentType(content.getType());
}
} else {
if (!getConfig().isSetResponseParts()) {
getConfig().addNewResponseParts();
}
Part responsePart = getConfig().getResponseParts().addNewPart();
responsePart.addContentType(content.getType());
responsePart.setName(content.getPart());
partMap.put(responsePart.getName(), responsePart);
}
}
}
}
}
if (bindingInput != null) {
MIMEMultipartRelated multipartInput = WsdlUtils.getExtensiblityElement(
bindingInput.getExtensibilityElements(), MIMEMultipartRelated.class);
getConfig().setSendsAttachments(multipartInput != null);
if (multipartInput != null) {
List<MIMEPart> parts = multipartInput.getMIMEParts();
Map<String, Part> partMap = new HashMap<String, Part>();
for (int c = 0; c < parts.size(); c++) {
List<MIMEContent> contentParts = WsdlUtils.getExtensiblityElements(parts.get(c)
.getExtensibilityElements(), MIMEContent.class);