private void build(Port port) { if (wsdlModeler.isProvider(port)) return; Binding binding = port.resolveBinding(wsdlDocument); SOAPBinding soapBinding = (SOAPBinding) getExtensionOfType(binding, SOAPBinding.class); // lets try and see if its SOAP 1.2. dont worry about extension flag, its // handled much earlier if (soapBinding == null) { soapBinding = (SOAPBinding) getExtensionOfType(binding, SOAP12Binding.class); } if (soapBinding == null) return; PortType portType = binding.resolvePortType(wsdlDocument); QName bindingName = WSDLModelerBase.getQNameOf(binding); // we dont want to process the port bound to the binding processed earlier if (bindingNameToPortMap.containsKey(bindingName)) return; bindingNameToPortMap.put(bindingName, port); for (Iterator itr = binding.operations(); itr.hasNext(); ) { BindingOperation bindingOperation = (BindingOperation) itr.next(); // get only the bounded operations Set boundedOps = portType.getOperationsNamed(bindingOperation.getName()); if (boundedOps.size() != 1) continue; Operation operation = (Operation) boundedOps.iterator().next(); // No pseudo schema required for doc/lit if (wsdlModeler.isAsync(portType, operation)) { buildAsync(portType, operation, bindingOperation); } } }
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; } // if(XmlUtil.matchesTagNS(e2, // JAXWSBindingsConstants.ENABLE_ADDITIONAL_SOAPHEADER_MAPPING)){ // parseAdditionalSOAPHeaderMapping(context, jaxwsBinding, e2); // }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(); // context.fireDoneParsingEntity( // JAXWSBindingsConstants.JAXWS_BINDINGS, // jaxwsBinding); return true; } else { Util.fail("parsing.invalidExtensionElement", e.getTagName(), e.getNamespaceURI()); return false; } }