use of com.sun.tools.ws.api.wsdl.TWSDLExtension in project metro-jax-ws by eclipse-ee4j.
the class JwsImplGenerator method getBindingType.
private String getBindingType(QName bName) {
String value = null;
// process the bindings in definitions of model.entity
if (model.getEntity() instanceof Definitions) {
Definitions definitions = (Definitions) model.getEntity();
if (definitions != null) {
Iterator bindings = definitions.bindings();
if (bindings != null) {
while (bindings.hasNext()) {
Binding binding = (Binding) bindings.next();
if (bName.getLocalPart().equals(binding.getName()) && bName.getNamespaceURI().equals(binding.getNamespaceURI())) {
List<TWSDLExtension> bindextends = (List<TWSDLExtension>) binding.extensions();
for (TWSDLExtension wsdlext : bindextends) {
value = resolveBindingValue(wsdlext);
if (value != null)
break;
}
break;
}
}
}
}
}
// process the bindings in whole document
if (value == null) {
if (model.getEntity() instanceof Definitions) {
Definitions definitions = (Definitions) model.getEntity();
Binding b = (Binding) definitions.resolveBindings().get(bName);
if (b != null) {
List<TWSDLExtension> bindextends = (List<TWSDLExtension>) b.extensions();
for (TWSDLExtension wsdlext : bindextends) {
value = resolveBindingValue(wsdlext);
if (value != null)
break;
}
}
}
}
return value;
}
use of com.sun.tools.ws.api.wsdl.TWSDLExtension 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