use of com.sun.tools.ws.wsdl.document.mime.MIMEPart in project metro-jax-ws by eclipse-ee4j.
the class WSDLModelerBase method validateMimeParts.
/**
*/
protected boolean validateMimeParts(Iterable<MIMEPart> mimeParts) {
boolean gotRootPart = false;
List<MIMEContent> mimeContents = new ArrayList<>();
for (MIMEPart mPart : mimeParts) {
for (TWSDLExtension obj : mPart.extensions()) {
if (obj instanceof SOAPBody) {
if (gotRootPart) {
warning(mPart, ModelerMessages.MIMEMODELER_INVALID_MIME_PART_MORE_THAN_ONE_SOAP_BODY(info.operation.getName().getLocalPart()));
return false;
}
gotRootPart = true;
} else if (obj instanceof MIMEContent) {
mimeContents.add((MIMEContent) obj);
}
}
if (!validateMimeContentPartNames(mimeContents)) {
return false;
}
if (mPart.getName() != null) {
warning(mPart, ModelerMessages.MIMEMODELER_INVALID_MIME_PART_NAME_NOT_ALLOWED(info.portTypeOperation.getName()));
}
}
return true;
}
Aggregations