TWSDLParserContextImpl context,
Definitions definitions,
Element e) {
context.push();
context.registerNamespaces(e);
Binding binding = new Binding(definitions, forest.locatorTable.getStartLocation(e), errReceiver);
String name = Util.getRequiredAttribute(e, Constants.ATTR_NAME);
binding.setName(name);
String typeAttr = Util.getRequiredAttribute(e, Constants.ATTR_TYPE);
binding.setPortType(context.translateQualifiedName(context.getLocation(e), typeAttr));
boolean gotDocumentation = false;
for (Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext();) {
Element e2 = Util.nextElement(iter);
if (e2 == null)
break;
if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_DOCUMENTATION)) {
if (gotDocumentation) {
errReceiver.error(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_ONLY_ONE_DOCUMENTATION_ALLOWED(e.getLocalName()));
}
gotDocumentation = true;
binding.setDocumentation(getDocumentationFor(e2));
} else if (
XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_OPERATION)) {
BindingOperation op = parseBindingOperation(context, e2);
binding.add(op);
} else {
// possible extensibility element -- must live outside the WSDL namespace
checkNotWsdlElement(e2);
if (!handleExtension(context, binding, e2)) {
checkNotWsdlRequired(e2);