/** * Get all the bindings defined in this Definition and * those in any imported Definitions in the WSDL tree. */ public Map getAllBindings() { Map allBindings = new HashMap(getBindings()); Map importMap = getImports(); Iterator mapItr = importMap.values().iterator(); while(mapItr.hasNext()) { Vector importDefs = (Vector) mapItr.next(); Iterator vecItr = importDefs.iterator(); while(vecItr.hasNext()) { Import importDef = (Import) vecItr.next(); Definition importedDef = importDef.getDefinition(); //importedDef may be null (e.g. if the javax.wsdl.importDocuments feature is disabled). if(importedDef != null) { allBindings.putAll(importedDef.getAllBindings()); } } } return allBindings; }
public Map getAllBindings() { return _def.getAllBindings(); }
public Map getAllBindings() { if (isDebugEnabled) { log.debug(myClassName + ".getAllBindings()"); } if (wsdlDefinition != null) { return wsdlDefinition.getAllBindings(); } return null; }
public Map getAllBindings() { if (isDebugEnabled) { log.debug(myClassName + ".getAllBindings()"); } if (wsdlDefinition != null) { return wsdlDefinition.getAllBindings(); } return null; }
public Map getAllBindings() { if (isDebugEnabled) { log.debug(myClassName + ".getAllBindings()"); } if (wsdlDefinition != null) { return wsdlDefinition.getAllBindings(); } return null; }
public Map getAllBindings() { if (isDebugEnabled) { log.debug(myClassName + ".getAllBindings()"); } if (wsdlDefinition != null) { return wsdlDefinition.getAllBindings(); } return null; }
/** * Retrieves all the operations defined in the provided WSDL definition. * * @param definition WSDL Definition * @return a set of {@link WSDLOperation} defined in the provided WSDL definition */ private Set<WSDLOperation> getHttpBindingOperations(Definition definition) { Set<WSDLOperation> allOperations = new HashSet<>(); for (Object bindingObj : definition.getAllBindings().values()) { if (bindingObj instanceof Binding) { Binding binding = (Binding) bindingObj; Set<WSDLOperation> operations = getHttpBindingOperations(binding); allOperations.addAll(operations); } } return allOperations; }
/** * Retrieves all the operations defined in the provided WSDL definition. * * @param definition WSDL Definition * @return a set of {@link WSDLOperation} defined in the provided WSDL definition */ private Set<WSDLOperation> getHttpBindingOperations(Definition definition) { Set<WSDLOperation> allOperations = new HashSet<>(); for (Object bindingObj : definition.getAllBindings().values()) { if (bindingObj instanceof Binding) { Binding binding = (Binding) bindingObj; Set<WSDLOperation> operations = getHttpBindingOperations(binding); allOperations.addAll(operations); } } return allOperations; }
public static boolean isBindingExisted(Definition wsdlDefinition, QName name) { Map<QName, Binding> bindings = CastUtils.cast(wsdlDefinition.getAllBindings()); Binding binding = null; if (bindings == null || bindings.isEmpty()) { return false; } try { for (Entry<QName, Binding> entry : bindings.entrySet()) { if (entry.getKey().getLocalPart().contains(name.getLocalPart())) { binding = entry.getValue(); break; } } } catch (Exception e) { binding = null; } return binding != null; } public static boolean isServiceExisted(Definition wsdlDefinition, QName name) {
/** * Returns if the provided WSDL definition contains SOAP binding operations * * @param definition WSDL definition * @return whether the provided WSDL definition contains SOAP binding operations */ private boolean hasSoapBindingOperations(Definition definition) { for (Object bindingObj : definition.getAllBindings().values()) { if (bindingObj instanceof Binding) { Binding binding = (Binding) bindingObj; for (Object ex : binding.getExtensibilityElements()) { if (ex instanceof SOAPBinding || ex instanceof SOAP12Binding) { return true; } } } } return false; } }
public static boolean isBindingExisted(Definition wsdlDefinition, QName name) { Map<QName, Binding> bindings = CastUtils.cast(wsdlDefinition.getAllBindings()); Binding binding = null; if (bindings == null || bindings.isEmpty()) { return false; } try { for (QName existBindingQName : bindings.keySet()) { if (existBindingQName.getLocalPart().contains(name.getLocalPart())) { binding = bindings.get(existBindingQName); break; } } } catch (Exception e) { binding = null; } if (binding == null) { return false; } return true; } public static boolean isServiceExisted(Definition wsdlDefinition, QName name) {
/** * Returns if the provided WSDL definition contains SOAP binding operations * * @param definition WSDL definition * @return whether the provided WSDL definition contains SOAP binding operations */ private boolean hasSoapBindingOperations(Definition definition) { for (Object bindingObj : definition.getAllBindings().values()) { if (bindingObj instanceof Binding) { Binding binding = (Binding) bindingObj; for (Object ex : binding.getExtensibilityElements()) { if (ex instanceof SOAPBinding || ex instanceof SOAP12Binding) { return true; } } } } return false; } }
public static boolean isBindingExisted(Definition wsdlDefinition, QName name) { Map<QName, Binding> bindings = CastUtils.cast(wsdlDefinition.getAllBindings()); Binding binding = null; if (bindings == null || bindings.isEmpty()) { return false; } try { for (QName existBindingQName : bindings.keySet()) { if (existBindingQName.getLocalPart().contains(name.getLocalPart())) { binding = bindings.get(existBindingQName); break; } } } catch (Exception e) { binding = null; } if (binding == null) { return false; } return true; } public static boolean isServiceExisted(Definition wsdlDefinition, QName name) {
public Map getAllBindings() { if (isDebugEnabled) { log.debug(myClassName + ".getAllBindings()"); } getWrappedDefinitionForUse(); Map results = null; if (wsdlDefinition != null) { results = wsdlDefinition.getAllBindings(); } doneUsingWrappedDefinition(); return results; }
public Map getAllBindings() { if (isDebugEnabled) { log.debug(myClassName + ".getAllBindings()"); } getWrappedDefinitionForUse(); Map results = null; if (wsdlDefinition != null) { results = wsdlDefinition.getAllBindings(); } doneUsingWrappedDefinition(); return results; }
/** * Get all the bindings defined in this Definition and * those in any imported Definitions in the WSDL tree. */ public Map getAllBindings() { Map allBindings = new HashMap(getBindings()); Map importMap = getImports(); Iterator mapItr = importMap.values().iterator(); while(mapItr.hasNext()) { Vector importDefs = (Vector) mapItr.next(); Iterator vecItr = importDefs.iterator(); while(vecItr.hasNext()) { Import importDef = (Import) vecItr.next(); Definition importedDef = importDef.getDefinition(); //importedDef may be null (e.g. if the javax.wsdl.importDocuments feature is disabled). if(importedDef != null) { allBindings.putAll(importedDef.getAllBindings()); } } } return allBindings; }
private List<PortType> getPortTypeList() throws Exception { Map<QName, PortType> portTypes = CastUtils.cast(def.getAllPortTypes()); List<PortType> intfs = null; if (portTypes == null) { org.apache.cxf.common.i18n.Message msg = new org.apache.cxf.common.i18n.Message( "No PortTypes defined in wsdl", LOG); throw new Exception(msg.toString()); } PortType portType = null; intfs = new ArrayList<>(); if (portTypes.size() == 1) { portType = portTypes.values().iterator().next(); interfaceNames.add(portType.getQName().getLocalPart()); intfs.add(portType); } else if (portTypes.size() > 1) { if (def.getAllBindings().size() > 0) { throwMultipleMultipleTypeException(CastUtils.cast(def.getAllBindings().keySet(), QName.class)); } for (PortType port : portTypes.values()) { interfaceNames.add(port.getQName().getLocalPart()); intfs.add(port); } } return intfs; }
serviceList.add(serviceInfo); for (Iterator<?> it2 = d.getAllBindings().values().iterator(); it2.hasNext();) { Binding b = (Binding)it2.next(); if (b.getPortType() == portType) {
protected void compareBindings(Definition base, Definition changed, DefaultComparison comparison) { Map<QName, Binding> baseBinding = base.getAllBindings(); Map<QName, Binding> changedBinding = changed.getAllBindings(); DefaultComparison.DefaultSection section = null; MapDifference<QName, Binding> mapDiff = Maps.difference(baseBinding, changedBinding); //If both side imports are equal, return if (mapDiff.areEqual()) { return; } Map<QName, Binding> additions = mapDiff.entriesOnlyOnRight(); if (section == null && additions.size() > 0) { section = comparison.newSection(); } processAdditions(section, additions, changed); Map<QName, Binding> removals = mapDiff.entriesOnlyOnLeft(); if (section == null && removals.size() > 0) { section = comparison.newSection(); } processRemovals(section, removals, base); Map<QName, MapDifference.ValueDifference<Binding>> changes = mapDiff.entriesDiffering(); section = processChanges(section, comparison, changes, base, changed); if (section != null) { comparison.addSection(ComparatorConstants.WSDL_BINDINGS, section); } }
private Definition getPhysicalDefinition(Definition logicalDef, boolean schemaOnly) throws WSDLException, JAXBException { Definition def = null; if (schemaOnly) { def = logicalDef; } else { def = manager.createWSDLDefinition(targetNamespace); } Collection<String> namespaces = CastUtils.cast(definition.getNamespaces().values()); for (String namespace : namespaces) { String prefix = definition.getPrefix(namespace); def.addNamespace(prefix, namespace); } Collection<Binding> bindings = CastUtils.cast(definition.getAllBindings().values()); for (Binding binding : bindings) { def.addBinding(binding); } Collection<Service> services = CastUtils.cast(definition.getAllServices().values()); for (Service service : services) { def.addService(service); } Collection<ExtensibilityElement> extns = CastUtils.cast(definition.getExtensibilityElements()); for (ExtensibilityElement ext : extns) { def.addExtensibilityElement(ext); } def.setExtensionRegistry(definition.getExtensionRegistry()); return def; }