binding.setQName(bindingStr); def.addBinding(binding);
binding.setQName(bindingName);
/** * Called after the {@link Binding} has been created, but before any sub-elements are added. Subclasses can override * this method to define the binding name, or add extensions to it. * * <p>Default implementation sets the binding name to the port type name with the {@link #getBindingSuffix() suffix} * appended to it. * * @param definition the WSDL4J {@code Definition} * @param binding the WSDL4J {@code Binding} */ protected void populateBinding(Definition definition, Binding binding) throws WSDLException { QName portTypeName = binding.getPortType().getQName(); if (portTypeName != null) { QName bindingName = new QName(portTypeName.getNamespaceURI(), portTypeName.getLocalPart() + getBindingSuffix()); if (logger.isDebugEnabled()) { logger.debug("Creating binding [" + bindingName + "]"); } binding.setQName(bindingName); } }
/** * Called after the {@link Binding} has been created, but before any sub-elements are added. Subclasses can override * this method to define the binding name, or add extensions to it. * * <p>Default implementation sets the binding name to the port type name with the {@link #getBindingSuffix() suffix} * appended to it. * * @param definition the WSDL4J {@code Definition} * @param binding the WSDL4J {@code Binding} */ protected void populateBinding(Definition definition, Binding binding) throws WSDLException { QName portTypeName = binding.getPortType().getQName(); if (portTypeName != null) { QName bindingName = new QName(portTypeName.getNamespaceURI(), portTypeName.getLocalPart() + getBindingSuffix()); if (logger.isDebugEnabled()) { logger.debug("Creating binding [" + bindingName + "]"); } binding.setQName(bindingName); } }
/** * Called after the {@link Binding} has been created, but before any sub-elements are added. Subclasses can override * this method to define the binding name, or add extensions to it. * <p/> * Default implementation sets the binding name to the port type name with the {@link #getBindingSuffix() suffix} * appended to it. * * @param definition the WSDL4J <code>Definition</code> * @param binding the WSDL4J <code>Binding</code> */ protected void populateBinding(Definition definition, Binding binding) throws WSDLException { QName portTypeName = binding.getPortType().getQName(); if (portTypeName != null) { QName bindingName = new QName(portTypeName.getNamespaceURI(), portTypeName.getLocalPart() + getBindingSuffix()); if (logger.isDebugEnabled()) { logger.debug("Creating binding [" + bindingName + "]"); } binding.setQName(bindingName); } }
/** * Called after the {@link Binding} has been created, but before any sub-elements are added. Subclasses can override * this method to define the binding name, or add extensions to it. * * <p>Default implementation sets the binding name to the port type name with the {@link #getBindingSuffix() suffix} * appended to it. * * @param definition the WSDL4J {@code Definition} * @param binding the WSDL4J {@code Binding} */ protected void populateBinding(Definition definition, Binding binding) throws WSDLException { QName portTypeName = binding.getPortType().getQName(); if (portTypeName != null) { QName bindingName = new QName(portTypeName.getNamespaceURI(), portTypeName.getLocalPart() + getBindingSuffix()); if (logger.isDebugEnabled()) { logger.debug("Creating binding [" + bindingName + "]"); } binding.setQName(bindingName); } }
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; } } } }
public static Binding doAppendBinding(Definition wsdlDefinition, String name, PortType portType, ExtensionRegistry extReg) throws Exception { Binding binding = wsdlDefinition.createBinding(); binding.setQName(new QName(wsdlDefinition.getTargetNamespace(), name + bindingName)); binding.setUndefined(false); binding.setPortType(portType); setSoapBindingExtElement(wsdlDefinition, binding, extReg); addBindingOperation(wsdlDefinition, portType, binding, extReg); return binding; }
public static Binding doAppendBinding(Definition wsdlDefinition, String name, PortType portType, ExtensionRegistry extReg) throws Exception { Binding binding = wsdlDefinition.createBinding(); binding.setQName(new QName(wsdlDefinition.getTargetNamespace(), name + bindingName)); binding.setUndefined(false); binding.setPortType(portType); setSoapBindingExtElement(wsdlDefinition, binding, extReg); addBindingOperation(wsdlDefinition, portType, binding, extReg); return binding; }
public static Binding doAppendBinding(Definition wsdlDefinition, String name, PortType portType, ExtensionRegistry extReg) throws Exception { Binding binding = wsdlDefinition.createBinding(); binding.setQName(new QName(wsdlDefinition.getTargetNamespace(), name + bindingName)); binding.setUndefined(false); binding.setPortType(portType); setSoapBindingExtElement(wsdlDefinition, binding, extReg); addBindingOperation(wsdlDefinition, portType, binding, extReg); return binding; }
private Binding addBinding(Definition def, String nameSpaceURI, PortTypeImpl portType, UnknownExtensibilityElement wsPolicyRef, DOMImplementation dImpl) { String portName = portType.getQName().getLocalPart(); Binding binding = def.createBinding(); binding.setQName(new QName(nameSpaceURI, portName + WSDL_SOAP_BINDING_SUFFIX)); binding.setUndefined(false); binding.setPortType(portType); SOAPBindingImpl soapBindingImpl = new SOAPBindingImpl(); soapBindingImpl.setStyle(DOCUMENT); soapBindingImpl.setTransportURI(SOAP_HTTP_NAMESPACE); binding.addExtensibilityElement(soapBindingImpl); if (wsPolicyRef != null) { log.info("policy info is not null"); binding.addExtensibilityElement(wsPolicyRef); } Document doc = dImpl.createDocument(WSP_NAMESPACE, "Misc", null); UnknownExtensibilityElement exEle = new UnknownExtensibilityElement(); exEle.setElement(doc.createElementNS("http://www.w3.org/2006/05/addressing/wsdl", "wsaw:UsingAddressing")); exEle.setElementType(new QName("http://www.w3.org/2006/05/addressing/wsdl", "wsaw:UsingAddressing")); binding.addExtensibilityElement(exEle); return binding; }
private Binding addBinding(Definition def, String nameSpaceURI, PortTypeImpl portType, UnknownExtensibilityElement wsPolicyRef, DOMImplementation dImpl) { String portName = portType.getQName().getLocalPart(); Binding binding = def.createBinding(); binding.setQName(new QName(nameSpaceURI, portName + WSDL_SOAP_BINDING_SUFFIX)); binding.setUndefined(false); binding.setPortType(portType); SOAPBindingImpl soapBindingImpl = new SOAPBindingImpl(); soapBindingImpl.setStyle(DOCUMENT); soapBindingImpl.setTransportURI(SOAP_HTTP_NAMESPACE); binding.addExtensibilityElement(soapBindingImpl); if (wsPolicyRef != null) { log.debug("policy info is not null"); binding.addExtensibilityElement(wsPolicyRef); } Document doc = dImpl.createDocument(WSP_NAMESPACE, "Misc", null); UnknownExtensibilityElement exEle = new UnknownExtensibilityElement(); exEle.setElement(doc.createElementNS("http://www.w3.org/2006/05/addressing/wsdl", "wsaw:UsingAddressing")); exEle.setElementType(new QName("http://www.w3.org/2006/05/addressing/wsdl", "wsaw:UsingAddressing")); binding.addExtensibilityElement(exEle); return binding; }
private void doAppendBinding() throws ToolException { if (binding == null) { binding = wsdlDefinition.createBinding(); binding.setQName(new QName(wsdlDefinition.getTargetNamespace(), (String)env .get(ToolConstants.CFG_BINDING))); binding.setUndefined(false); binding.setPortType(portType); } setXMLBindingExtElement(); addBindingOperation(); wsdlDefinition.addBinding(binding); }
private void doAppendBinding() throws ToolException { if (binding == null) { binding = wsdlDefinition.createBinding(); binding.setQName(new QName(wsdlDefinition.getTargetNamespace(), (String)env .get(ToolConstants.CFG_BINDING))); binding.setUndefined(false); binding.setPortType(portType); } setXMLBindingExtElement(); addBindingOperation(); wsdlDefinition.addBinding(binding); }
private void doAppendBinding() throws ToolException { if (binding == null) { binding = wsdlDefinition.createBinding(); binding.setQName(new QName(wsdlDefinition.getTargetNamespace(), (String)env .get(ToolConstants.CFG_BINDING))); binding.setUndefined(false); binding.setPortType(portType); } setXMLBindingExtElement(); addBindingOperation(); wsdlDefinition.addBinding(binding); }
protected void buildBinding(Definition definition, Collection<BindingInfo> bindingInfos, Collection<PortType> portTypes) { Binding binding = null; for (BindingInfo bindingInfo : bindingInfos) { binding = definition.createBinding(); addDocumentation(binding, bindingInfo.getDocumentation()); binding.setUndefined(false); for (PortType portType : portTypes) { if (portType.getQName().equals(bindingInfo.getInterface().getName())) { binding.setPortType(portType); break; } } binding.setQName(bindingInfo.getName()); if (!bindingInfo.getName().getNamespaceURI().equals(definition.getTargetNamespace())) { addNamespace(bindingInfo.getName().getNamespaceURI(), definition); } buildBindingOperation(definition, binding, bindingInfo.getOperations()); addExtensibilityElements(definition, binding, getWSDL11Extensors(bindingInfo)); definition.addBinding(binding); } }
protected void buildBinding(Definition definition, Collection<BindingInfo> bindingInfos, Collection<PortType> portTypes) { Binding binding = null; for (BindingInfo bindingInfo : bindingInfos) { binding = definition.createBinding(); addDocumentation(binding, bindingInfo.getDocumentation()); binding.setUndefined(false); for (PortType portType : portTypes) { if (portType.getQName().equals(bindingInfo.getInterface().getName())) { binding.setPortType(portType); break; } } binding.setQName(bindingInfo.getName()); if (!bindingInfo.getName().getNamespaceURI().equals(definition.getTargetNamespace())) { addNamespace(bindingInfo.getName().getNamespaceURI(), definition); } buildBindingOperation(definition, binding, bindingInfo.getOperations()); addExtensibilityElements(definition, binding, getWSDL11Extensors(bindingInfo)); definition.addBinding(binding); } }
protected void buildBinding(Definition definition, Collection<BindingInfo> bindingInfos, Collection<PortType> portTypes) { Binding binding = null; for (BindingInfo bindingInfo : bindingInfos) { binding = definition.createBinding(); addDocumentation(binding, bindingInfo.getDocumentation()); binding.setUndefined(false); for (PortType portType : portTypes) { if (portType.getQName().equals(bindingInfo.getInterface().getName())) { binding.setPortType(portType); break; } } binding.setQName(bindingInfo.getName()); if (!bindingInfo.getName().getNamespaceURI().equals(definition.getTargetNamespace())) { addNamespace(bindingInfo.getName().getNamespaceURI(), definition); } buildBindingOperation(definition, binding, bindingInfo.getOperations()); addExtensibilityElements(definition, binding, getWSDL11Extensors(bindingInfo)); definition.addBinding(binding); } }
public javax.wsdl.Binding createBinding(WSDLBuilder builder, PortType portType) { Transport t = builder.getTransportManager().getTransport(getBindingId()); if (!(t instanceof WSDL11Transport)) return null; Definition def = builder.getDefinition(); javax.wsdl.Binding wbinding = def.createBinding(); wbinding.setQName( getName() ); wbinding.setPortType( portType ); wbinding.setUndefined(false); // add in soap:Body, et al wbinding.addExtensibilityElement(createSoapBinding()); for (Iterator oitr = getService().getServiceInfo().getOperations().iterator(); oitr.hasNext();) { OperationInfo op = (OperationInfo) oitr.next(); javax.wsdl.Operation wsdlOp = (javax.wsdl.Operation) portType.getOperation(op.getName(), null, null); javax.wsdl.BindingOperation bop = createBindingOperation(builder, wsdlOp, op); createHeaders(builder, op, bop); wbinding.addBindingOperation(bop); } def.addBinding(wbinding); return wbinding; }