ret = importedDef.getBinding(name);
protected EprMetaData getObjectReferenceBinding(Definition wsdlDef, QName bindingName) { EprMetaData info = new EprMetaData(); Binding wsdlBinding = wsdlDef.getBinding(bindingName); // If the binding name does not have a namespace associated with it, then we'll need to // get the list of all bindings and compare their local parts against our name. if (wsdlBinding == null && bindingName.getNamespaceURI().isEmpty() && !bindingName.getLocalPart().isEmpty()) { Collection<Binding> bindingsCollection = CastUtils.cast(wsdlDef.getBindings().values()); for (Binding b : bindingsCollection) { if (b.getQName().getLocalPart().equals(bindingName.getLocalPart())) { wsdlBinding = b; break; } } } if (wsdlBinding != null) { info.setBinding(wsdlBinding); info.setCandidateWsdlDef(wsdlDef); } return info; }
public Binding getBinding(QName qName) { return _def.getBinding(qName); }
public Binding getBinding(QName name) { if (isDebugEnabled) { log.debug(myClassName + ".getBinding(" + name + ")"); } if (wsdlDefinition != null) { return wsdlDefinition.getBinding(name); } return null; }
public Binding getBinding(QName name) { if (isDebugEnabled) { log.debug(myClassName + ".getBinding(" + name + ")"); } if (wsdlDefinition != null) { return wsdlDefinition.getBinding(name); } return null; }
public Binding getBinding(QName name) { if (isDebugEnabled) { log.debug(myClassName + ".getBinding(" + name + ")"); } if (wsdlDefinition != null) { return wsdlDefinition.getBinding(name); } return null; }
public Binding getBinding(QName name) { if (isDebugEnabled) { log.debug(myClassName + ".getBinding(" + name + ")"); } if (wsdlDefinition != null) { return wsdlDefinition.getBinding(name); } return null; }
Binding binding = def.getBinding(bindingStr);
/** * Return the definition element that contains the binding element. * @param binding a Binding object. * @return the definition element that contains the binding element. */ public Definition getDefinition(Binding binding) { Definition definition = null; for (int i = 0; i < definitions.length && definition == null; i++) { if (definitions[i].getBinding(binding.getQName()) != null) definition = definitions[i]; } return definition; }
/** * Return the definition element that contains the binding element. * @param binding a Binding object. * @return the definition element that contains the binding element. */ public Definition getDefinition(Binding binding) { Definition definition = null; for (int i = 0; i < definitions.length && definition == null; i++) { if (definitions[i].getBinding(binding.getQName()) != null) definition = definitions[i]; } return definition; }
binding = def.getBinding(bindingName);
public Binding getBinding(QName name) { if (isDebugEnabled) { log.debug(myClassName + ".getBinding(" + name + ")"); } getWrappedDefinitionForUse(); Binding results = null; if (wsdlDefinition != null) { results = wsdlDefinition.getBinding(name); } doneUsingWrappedDefinition(); return results; }
public Binding getBinding(QName name) { if (isDebugEnabled) { log.debug(myClassName + ".getBinding(" + name + ")"); } getWrappedDefinitionForUse(); Binding results = null; if (wsdlDefinition != null) { results = wsdlDefinition.getBinding(name); } doneUsingWrappedDefinition(); return results; }
private boolean isComponetAvailable(Definition definition, QName qname, int componentType){ boolean isAvailable = false; switch (componentType){ case COMPONENT_BINDING : { isAvailable = (definition.getBinding(qname) != null) && (definition.getBinding(qname).getPortType() != null); break; } case COMPONENT_PORT_TYPE : { isAvailable = (definition.getPortType(qname) != null); break; } case COMPONENT_MESSAGE : { isAvailable = (definition.getMessage(qname) != null); break; } } return isAvailable; }
private boolean isComponetAvailable(Definition definition, QName qname, int componentType){ boolean isAvailable = false; switch (componentType){ case COMPONENT_BINDING : { isAvailable = (definition.getBinding(qname) != null) && (definition.getBinding(qname).getPortType() != null); break; } case COMPONENT_PORT_TYPE : { isAvailable = (definition.getPortType(qname) != null); break; } case COMPONENT_MESSAGE : { isAvailable = (definition.getMessage(qname) != null); break; } } return isAvailable; }
WSDLFactory factory = WSDLFactory.newInstance(); WSDLReader reader = factory.newWSDLReader(); Definition definition = reader.readWSDL("http://www.w3schools.com/webservices/tempconvert.asmx?wsdl"); Binding binding = definition.getBinding(new QName("http://tempuri.org/", "TempConvertSoap")); BindingOperation operation = binding.getBindingOperation("CelsiusToFahrenheit", null, null); List extensions = operation.getExtensibilityElements(); if (extensions != null) { for (int i = 0; i < extensions.size(); i++) { ExtensibilityElement extElement = (ExtensibilityElement) extensions.get(i); // .... if (extElement instanceof SOAPOperation) { SOAPOperation soapOp = (SOAPOperation) extElement; System.out.println(soapOp.getSoapActionURI()); } // .... } }
protected void configureBinding(Definition definition, Binding binding, PortType portType) throws WSDLException { if ( wsBindingName != null ) { QName name = new QName(definition.getTargetNamespace(), wsBindingName + getSOAPVersionString() + BINDING_SUFFIX); if ( definition.getBinding(name) == null ) { binding.setQName(name); return; } } QName portTypeName = portType.getQName(); if (portTypeName != null) { // Choose <porttype>Binding if available. If this name is in use, insert // separating underscores until there is no clash. for (String suffix = BINDING_SUFFIX; ; suffix = "_" + suffix) { QName name = new QName(definition.getTargetNamespace(), portTypeName.getLocalPart() + suffix); if (definition.getBinding(name) == null) { binding.setQName(name); break; } } } }
protected void configureBinding(Definition definition, Binding binding, PortType portType) throws WSDLException { if ( wsBindingName != null ) { QName name = new QName(definition.getTargetNamespace(), wsBindingName + getSOAPVersionString() + BINDING_SUFFIX); if ( definition.getBinding(name) == null ) { binding.setQName(name); return; } } QName portTypeName = portType.getQName(); if (portTypeName != null) { // Choose <porttype>Binding if available. If this name is in use, insert // separating underscores until there is no clash. for (String suffix = BINDING_SUFFIX; ; suffix = "_" + suffix) { QName name = new QName(definition.getTargetNamespace(), portTypeName.getLocalPart() + suffix); if (definition.getBinding(name) == null) { binding.setQName(name); break; } } } }
private static Binding extractBindingInformation(final AxisService service, final Definition wsdlOfService, final MessageContext inMessageContext) { AxisEndpoint currentEndpoint = (AxisEndpoint) inMessageContext .getProperty(WSDL2Constants.ENDPOINT_LOCAL_NAME); if (currentEndpoint == null) { String defaultEndpointName = service.getEndpointName(); currentEndpoint = service.getEndpoints().get(defaultEndpointName); if (currentEndpoint == null) { throw new NullPointerException("AxisEndpoint cannot be null."); } } AxisBinding currentAxisBinding = currentEndpoint.getBinding(); QName bindingQName = currentAxisBinding.getName(); return wsdlOfService.getBinding(bindingQName); }
public void reconcileReferences(boolean deep) { if (element != null) { Definition definition = getEnclosingDefinition(); QName bindingQName = createQName(definition, element.getAttribute(WSDLConstants.BINDING_ATTRIBUTE), element); Binding newBinding = (bindingQName != null) ? (Binding)definition.getBinding(bindingQName) : null; if (newBinding != getEBinding()) { setEBinding(newBinding); } } super.reconcileReferences(deep); }