com.sun.tools.internal.ws.wsdl.document.mime.MIMEContent Java Examples
The following examples show how to use
com.sun.tools.internal.ws.wsdl.document.mime.MIMEContent.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: WSDLModelerBase.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
protected TWSDLExtension getAnyExtensionOfType( TWSDLExtensible extensible, Class type) { if (extensible == null) { return null; } for (TWSDLExtension extension:extensible.extensions()) { if(extension.getClass().equals(type)) { return extension; }else if (extension.getClass().equals(MIMEMultipartRelated.class) && (type.equals(SOAPBody.class) || type.equals(MIMEContent.class) || type.equals(MIMEPart.class))) { for (MIMEPart part : ((MIMEMultipartRelated)extension).getParts()) { //bug fix: 5024001 TWSDLExtension extn = getExtensionOfType(part, type); if (extn != null) { return extn; } } } } return null; }
Example #2
Source File: WSDLModelerBase.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
protected TWSDLExtension getAnyExtensionOfType( TWSDLExtensible extensible, Class type) { if (extensible == null) { return null; } for (TWSDLExtension extension:extensible.extensions()) { if(extension.getClass().equals(type)) { return extension; }else if (extension.getClass().equals(MIMEMultipartRelated.class) && (type.equals(SOAPBody.class) || type.equals(MIMEContent.class) || type.equals(MIMEPart.class))) { for (MIMEPart part : ((MIMEMultipartRelated)extension).getParts()) { //bug fix: 5024001 TWSDLExtension extn = getExtensionOfType(part, type); if (extn != null) { return extn; } } } } return null; }
Example #3
Source File: WSDLModelerBase.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * @param mimeParts */ protected boolean validateMimeParts(Iterable<MIMEPart> mimeParts) { boolean gotRootPart = false; List<MIMEContent> mimeContents = new ArrayList<MIMEContent>(); 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; }
Example #4
Source File: WSDLModelerBase.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
/** * @param mimeParts */ protected boolean validateMimeParts(Iterable<MIMEPart> mimeParts) { boolean gotRootPart = false; List<MIMEContent> mimeContents = new ArrayList<MIMEContent>(); 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; }
Example #5
Source File: WSDLModelerBase.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
protected TWSDLExtension getAnyExtensionOfType( TWSDLExtensible extensible, Class type) { if (extensible == null) { return null; } for (TWSDLExtension extension:extensible.extensions()) { if(extension.getClass().equals(type)) { return extension; }else if (extension.getClass().equals(MIMEMultipartRelated.class) && (type.equals(SOAPBody.class) || type.equals(MIMEContent.class) || type.equals(MIMEPart.class))) { for (MIMEPart part : ((MIMEMultipartRelated)extension).getParts()) { //bug fix: 5024001 TWSDLExtension extn = getExtensionOfType(part, type); if (extn != null) { return extn; } } } } return null; }
Example #6
Source File: WSDLModelerBase.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * @param mimeParts */ protected boolean validateMimeParts(Iterable<MIMEPart> mimeParts) { boolean gotRootPart = false; List<MIMEContent> mimeContents = new ArrayList<MIMEContent>(); 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; }
Example #7
Source File: WSDLModelerBase.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** * @param mimeParts */ protected boolean validateMimeParts(Iterable<MIMEPart> mimeParts) { boolean gotRootPart = false; List<MIMEContent> mimeContents = new ArrayList<MIMEContent>(); 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; }
Example #8
Source File: WSDLModelerBase.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
protected TWSDLExtension getAnyExtensionOfType( TWSDLExtensible extensible, Class type) { if (extensible == null) { return null; } for (TWSDLExtension extension:extensible.extensions()) { if(extension.getClass().equals(type)) { return extension; }else if (extension.getClass().equals(MIMEMultipartRelated.class) && (type.equals(SOAPBody.class) || type.equals(MIMEContent.class) || type.equals(MIMEPart.class))) { for (MIMEPart part : ((MIMEMultipartRelated)extension).getParts()) { //bug fix: 5024001 TWSDLExtension extn = getExtensionOfType(part, type); if (extn != null) { return extn; } } } } return null; }
Example #9
Source File: WSDLModelerBase.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
/** * @param mimeParts */ protected boolean validateMimeParts(Iterable<MIMEPart> mimeParts) { boolean gotRootPart = false; List<MIMEContent> mimeContents = new ArrayList<MIMEContent>(); 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; }
Example #10
Source File: WSDLModelerBase.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
protected TWSDLExtension getAnyExtensionOfType( TWSDLExtensible extensible, Class type) { if (extensible == null) { return null; } for (TWSDLExtension extension:extensible.extensions()) { if(extension.getClass().equals(type)) { return extension; }else if (extension.getClass().equals(MIMEMultipartRelated.class) && (type.equals(SOAPBody.class) || type.equals(MIMEContent.class) || type.equals(MIMEPart.class))) { for (MIMEPart part : ((MIMEMultipartRelated)extension).getParts()) { //bug fix: 5024001 TWSDLExtension extn = getExtensionOfType(part, type); if (extn != null) { return extn; } } } } return null; }
Example #11
Source File: WSDLModelerBase.java From hottub with GNU General Public License v2.0 | 6 votes |
/** * @param mimeParts */ protected boolean validateMimeParts(Iterable<MIMEPart> mimeParts) { boolean gotRootPart = false; List<MIMEContent> mimeContents = new ArrayList<MIMEContent>(); 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; }
Example #12
Source File: WSDLModelerBase.java From hottub with GNU General Public License v2.0 | 6 votes |
protected TWSDLExtension getAnyExtensionOfType( TWSDLExtensible extensible, Class type) { if (extensible == null) { return null; } for (TWSDLExtension extension:extensible.extensions()) { if(extension.getClass().equals(type)) { return extension; }else if (extension.getClass().equals(MIMEMultipartRelated.class) && (type.equals(SOAPBody.class) || type.equals(MIMEContent.class) || type.equals(MIMEPart.class))) { for (MIMEPart part : ((MIMEMultipartRelated)extension).getParts()) { //bug fix: 5024001 TWSDLExtension extn = getExtensionOfType(part, type); if (extn != null) { return extn; } } } } return null; }
Example #13
Source File: WSDLModelerBase.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
/** * @param mimeParts */ protected boolean validateMimeParts(Iterable<MIMEPart> mimeParts) { boolean gotRootPart = false; List<MIMEContent> mimeContents = new ArrayList<MIMEContent>(); 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; }
Example #14
Source File: WSDLModelerBase.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
protected TWSDLExtension getAnyExtensionOfType( TWSDLExtensible extensible, Class type) { if (extensible == null) { return null; } for (TWSDLExtension extension:extensible.extensions()) { if(extension.getClass().equals(type)) { return extension; }else if (extension.getClass().equals(MIMEMultipartRelated.class) && (type.equals(SOAPBody.class) || type.equals(MIMEContent.class) || type.equals(MIMEPart.class))) { for (MIMEPart part : ((MIMEMultipartRelated)extension).getParts()) { //bug fix: 5024001 TWSDLExtension extn = getExtensionOfType(part, type); if (extn != null) { return extn; } } } } return null; }
Example #15
Source File: WSDLModelerBase.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
/** * @param mimeParts */ protected boolean validateMimeParts(Iterable<MIMEPart> mimeParts) { boolean gotRootPart = false; List<MIMEContent> mimeContents = new ArrayList<MIMEContent>(); 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; }
Example #16
Source File: WSDLModelerBase.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
protected TWSDLExtension getAnyExtensionOfType( TWSDLExtensible extensible, Class type) { if (extensible == null) { return null; } for (TWSDLExtension extension:extensible.extensions()) { if(extension.getClass().equals(type)) { return extension; }else if (extension.getClass().equals(MIMEMultipartRelated.class) && (type.equals(SOAPBody.class) || type.equals(MIMEContent.class) || type.equals(MIMEPart.class))) { for (MIMEPart part : ((MIMEMultipartRelated)extension).getParts()) { //bug fix: 5024001 TWSDLExtension extn = getExtensionOfType(part, type); if (extn != null) { return extn; } } } } return null; }
Example #17
Source File: WSDLModelerBase.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
private boolean validateMimeContentPartNames(List<MIMEContent> mimeContents) { //validate mime:content(s) in the mime:part as per R2909 for (MIMEContent mimeContent : mimeContents) { String mimeContnetPart; mimeContnetPart = getMimeContentPartName(mimeContent); if(mimeContnetPart == null) { warning(mimeContent, ModelerMessages.MIMEMODELER_INVALID_MIME_CONTENT_MISSING_PART_ATTRIBUTE(info.operation.getName().getLocalPart())); return false; } } return true; }
Example #18
Source File: WSDLModelerBase.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
protected List<String> getAlternateMimeTypes(List<MIMEContent> mimeContents) { List<String> mimeTypes = new ArrayList<String>(); //validateMimeContentPartNames(mimeContents.iterator()); // String mimeType = null; for(MIMEContent mimeContent:mimeContents){ String mimeType = getMimeContentType(mimeContent); if (!mimeTypes.contains(mimeType)) { mimeTypes.add(mimeType); } } return mimeTypes; }
Example #19
Source File: WSDLModelerBase.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
private MessagePart getMimeContentPart(Message message, MIMEPart part) { for( MIMEContent mimeContent : getMimeContents(part) ) { String mimeContentPartName = mimeContent.getPart(); MessagePart mPart = message.getPart(mimeContentPartName); //RXXXX mime:content MUST have part attribute if(null == mPart) { error(mimeContent, ModelerMessages.WSDLMODELER_ERROR_PARTS_NOT_FOUND(mimeContentPartName, message.getName())); } mPart.setBindingExtensibilityElementKind(MessagePart.WSDL_MIME_BINDING); return mPart; } return null; }
Example #20
Source File: WSDLModelerBase.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
protected List<MIMEContent> getMimeContents(MIMEPart part) { List<MIMEContent> mimeContents = new ArrayList<MIMEContent>(); for (TWSDLExtension mimeContent : part.extensions()) { if (mimeContent instanceof MIMEContent) { mimeContents.add((MIMEContent) mimeContent); } } //validateMimeContentPartNames(mimeContents.iterator()); return mimeContents; }
Example #21
Source File: WSDLModelerBase.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
private String getMimeContentPartName(MIMEContent mimeContent){ /*String partName = mimeContent.getPart(); if(partName == null){ throw new ModelerException("mimemodeler.invalidMimeContent.missingPartAttribute", new Object[] {info.operation.getName().getLocalPart()}); } return partName;*/ return mimeContent.getPart(); }
Example #22
Source File: WSDLModelerBase.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * @param ext * @param message * @param name * @return List of MimeContents from ext */ protected List<MIMEContent> getMimeContents(TWSDLExtensible ext, Message message, String name) { for (MIMEPart mimePart : getMimeParts(ext)) { List<MIMEContent> mimeContents = getMimeContents(mimePart); for (MIMEContent mimeContent : mimeContents) { if (mimeContent.getPart().equals(name)) { return mimeContents; } } } return null; }
Example #23
Source File: WSDLModelerBase.java From hottub with GNU General Public License v2.0 | 5 votes |
private String getMimeContentType(MIMEContent mimeContent){ String mimeType = mimeContent.getType(); if(mimeType == null){ error(mimeContent, ModelerMessages.MIMEMODELER_INVALID_MIME_CONTENT_MISSING_TYPE_ATTRIBUTE(info.operation.getName().getLocalPart())); } return mimeType; }
Example #24
Source File: WSDLModelerBase.java From hottub with GNU General Public License v2.0 | 5 votes |
private String getMimeContentPartName(MIMEContent mimeContent){ /*String partName = mimeContent.getPart(); if(partName == null){ throw new ModelerException("mimemodeler.invalidMimeContent.missingPartAttribute", new Object[] {info.operation.getName().getLocalPart()}); } return partName;*/ return mimeContent.getPart(); }
Example #25
Source File: WSDLModelerBase.java From hottub with GNU General Public License v2.0 | 5 votes |
protected List<MIMEContent> getMimeContents(MIMEPart part) { List<MIMEContent> mimeContents = new ArrayList<MIMEContent>(); for (TWSDLExtension mimeContent : part.extensions()) { if (mimeContent instanceof MIMEContent) { mimeContents.add((MIMEContent) mimeContent); } } //validateMimeContentPartNames(mimeContents.iterator()); return mimeContents; }
Example #26
Source File: WSDLModelerBase.java From hottub with GNU General Public License v2.0 | 5 votes |
private boolean validateMimeContentPartNames(List<MIMEContent> mimeContents) { //validate mime:content(s) in the mime:part as per R2909 for (MIMEContent mimeContent : mimeContents) { String mimeContnetPart; mimeContnetPart = getMimeContentPartName(mimeContent); if(mimeContnetPart == null) { warning(mimeContent, ModelerMessages.MIMEMODELER_INVALID_MIME_CONTENT_MISSING_PART_ATTRIBUTE(info.operation.getName().getLocalPart())); return false; } } return true; }
Example #27
Source File: WSDLModelerBase.java From hottub with GNU General Public License v2.0 | 5 votes |
protected List<String> getAlternateMimeTypes(List<MIMEContent> mimeContents) { List<String> mimeTypes = new ArrayList<String>(); //validateMimeContentPartNames(mimeContents.iterator()); // String mimeType = null; for(MIMEContent mimeContent:mimeContents){ String mimeType = getMimeContentType(mimeContent); if (!mimeTypes.contains(mimeType)) { mimeTypes.add(mimeType); } } return mimeTypes; }
Example #28
Source File: WSDLModelerBase.java From hottub with GNU General Public License v2.0 | 5 votes |
private MessagePart getMimeContentPart(Message message, MIMEPart part) { for( MIMEContent mimeContent : getMimeContents(part) ) { String mimeContentPartName = mimeContent.getPart(); MessagePart mPart = message.getPart(mimeContentPartName); //RXXXX mime:content MUST have part attribute if(null == mPart) { error(mimeContent, ModelerMessages.WSDLMODELER_ERROR_PARTS_NOT_FOUND(mimeContentPartName, message.getName())); } mPart.setBindingExtensibilityElementKind(MessagePart.WSDL_MIME_BINDING); return mPart; } return null; }
Example #29
Source File: WSDLModelerBase.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
private String getMimeContentType(MIMEContent mimeContent){ String mimeType = mimeContent.getType(); if(mimeType == null){ error(mimeContent, ModelerMessages.MIMEMODELER_INVALID_MIME_CONTENT_MISSING_TYPE_ATTRIBUTE(info.operation.getName().getLocalPart())); } return mimeType; }
Example #30
Source File: WSDLModelerBase.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
private boolean validateMimeContentPartNames(List<MIMEContent> mimeContents) { //validate mime:content(s) in the mime:part as per R2909 for (MIMEContent mimeContent : mimeContents) { String mimeContnetPart; mimeContnetPart = getMimeContentPartName(mimeContent); if(mimeContnetPart == null) { warning(mimeContent, ModelerMessages.MIMEMODELER_INVALID_MIME_CONTENT_MISSING_PART_ATTRIBUTE(info.operation.getName().getLocalPart())); return false; } } return true; }