use of com.sun.tools.ws.wsdl.document.jaxws.JAXWSBinding in project metro-jax-ws by eclipse-ee4j.
the class PseudoSchemaBuilder method getCustomizedOperationName.
private String getCustomizedOperationName(Operation operation) {
JAXWSBinding jaxwsCustomization = (JAXWSBinding) WSDLModelerBase.getExtensionOfType(operation, JAXWSBinding.class);
String operationName = (jaxwsCustomization != null) ? ((jaxwsCustomization.getMethodName() != null) ? jaxwsCustomization.getMethodName().getName() : null) : null;
if (operationName != null) {
if (Names.isJavaReservedWord(operationName)) {
return null;
}
return operationName;
}
return operation.getName();
}
use of com.sun.tools.ws.wsdl.document.jaxws.JAXWSBinding in project metro-jax-ws by eclipse-ee4j.
the class WSDLModeler method applyOperationNameCustomization.
private boolean applyOperationNameCustomization() {
JAXWSBinding jaxwsCustomization = (JAXWSBinding) getExtensionOfType(info.portTypeOperation, JAXWSBinding.class);
String operationName = (jaxwsCustomization != null) ? ((jaxwsCustomization.getMethodName() != null) ? jaxwsCustomization.getMethodName().getName() : null) : null;
if (operationName != null) {
if (Names.isJavaReservedWord(operationName)) {
if (options.isExtensionMode()) {
warning(info.portTypeOperation, ModelerMessages.WSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOMIZED_OPERATION_NAME(info.operation.getName(), operationName));
} else {
error(info.portTypeOperation, ModelerMessages.WSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOMIZED_OPERATION_NAME(info.operation.getName(), operationName));
}
return false;
}
info.operation.setCustomizedName(operationName);
}
if (Names.isJavaReservedWord(info.operation.getJavaMethodName())) {
if (options.isExtensionMode()) {
warning(info.portTypeOperation, ModelerMessages.WSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_OPERATION_NAME(info.operation.getName()));
} else {
error(info.portTypeOperation, ModelerMessages.WSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_OPERATION_NAME(info.operation.getName()));
}
return false;
}
return true;
}
use of com.sun.tools.ws.wsdl.document.jaxws.JAXWSBinding in project metro-jax-ws by eclipse-ee4j.
the class JAXWSBindingExtensionHandler method handleFaultExtension.
/* (non-Javadoc)
* @see ExtensionHandlerBase#handleFaultExtension(TWSDLParserContextImpl, TWSDLExtensible, org.w3c.dom.Element)
*/
@Override
public boolean handleFaultExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) {
if (XmlUtil.matchesTagNS(e, JAXWSBindingsConstants.JAXWS_BINDINGS)) {
context.push();
context.registerNamespaces(e);
JAXWSBinding jaxwsBinding = new JAXWSBinding(context.getLocation(e));
for (Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext(); ) {
Element e2 = Util.nextElement(iter);
if (e2 == null) {
break;
}
if (XmlUtil.matchesTagNS(e2, JAXWSBindingsConstants.CLASS)) {
parseClass(context, jaxwsBinding, e2);
if ((jaxwsBinding.getClassName() != null) && (jaxwsBinding.getClassName().getJavaDoc() != null)) {
((Fault) parent).setDocumentation(new Documentation(jaxwsBinding.getClassName().getJavaDoc()));
}
} else {
Util.fail("parsing.invalidExtensionElement", e2.getTagName(), e2.getNamespaceURI());
return false;
}
}
parent.addExtension(jaxwsBinding);
context.pop();
// jaxwsBinding);
return true;
} else {
Util.fail("parsing.invalidExtensionElement", e.getTagName(), e.getNamespaceURI());
return false;
}
}
use of com.sun.tools.ws.wsdl.document.jaxws.JAXWSBinding in project metro-jax-ws by eclipse-ee4j.
the class JAXWSBindingExtensionHandler method parsePackage.
/**
*/
private void parsePackage(com.sun.tools.ws.api.wsdl.TWSDLParserContext context, JAXWSBinding parent, Element e) {
// System.out.println("In handlePackageExtension: " + e.getNodeName());
String packageName = XmlUtil.getAttributeOrNull(e, JAXWSBindingsConstants.NAME_ATTR);
JAXWSBinding binding = parent;
binding.setJaxwsPackage(new CustomName(packageName, getJavaDoc(e)));
}
use of com.sun.tools.ws.wsdl.document.jaxws.JAXWSBinding in project metro-jax-ws by eclipse-ee4j.
the class JAXWSBindingExtensionHandler method handleBindingOperation.
private boolean handleBindingOperation(TWSDLParserContext context, BindingOperation operation, Element e) {
if (XmlUtil.matchesTagNS(e, JAXWSBindingsConstants.JAXWS_BINDINGS)) {
context.push();
context.registerNamespaces(e);
JAXWSBinding jaxwsBinding = new JAXWSBinding(context.getLocation(e));
for (Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext(); ) {
Element e2 = Util.nextElement(iter);
if (e2 == null) {
break;
}
// }else
if (XmlUtil.matchesTagNS(e2, JAXWSBindingsConstants.ENABLE_MIME_CONTENT)) {
parseMimeContent(context, jaxwsBinding, e2);
} else if (XmlUtil.matchesTagNS(e2, JAXWSBindingsConstants.PARAMETER)) {
parseParameter(context, jaxwsBinding, e2);
} else {
Util.fail("parsing.invalidExtensionElement", e2.getTagName(), e2.getNamespaceURI());
return false;
}
}
operation.addExtension(jaxwsBinding);
context.pop();
// jaxwsBinding);
return true;
} else {
Util.fail("parsing.invalidExtensionElement", e.getTagName(), e.getNamespaceURI());
return false;
}
}
Aggregations