本文整理了Java中javax.wsdl.Binding.addExtensibilityElement()
方法的一些代码示例,展示了Binding.addExtensibilityElement()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Binding.addExtensibilityElement()
方法的具体详情如下:
包路径:javax.wsdl.Binding
类名称:Binding
方法名:addExtensibilityElement
暂无
代码示例来源:origin: wsdl4j/wsdl4j
binding.addExtensibilityElement(parseExtensibilityElement(
Binding.class, tempEl, def));
代码示例来源:origin: apache/cxf
private static void setSoapBindingExtElement(Definition wsdlDefinition, Binding binding,
ExtensionRegistry extReg) throws Exception {
SOAPBindingUtil.addSOAPNamespace(wsdlDefinition, false);
SOAPBinding
soapBinding = SOAPBindingUtil.createSoapBinding(extReg, false);
soapBinding.setStyle(style);
binding.addExtensibilityElement(soapBinding);
}
代码示例来源:origin: org.apache.cxf/cxf-rt-core
private static void setSoapBindingExtElement(Definition wsdlDefinition, Binding binding,
ExtensionRegistry extReg) throws Exception {
SOAPBindingUtil.addSOAPNamespace(wsdlDefinition, false);
SOAPBinding
soapBinding = SOAPBindingUtil.createSoapBinding(extReg, false);
soapBinding.setStyle(style);
binding.addExtensibilityElement(soapBinding);
}
代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs
private static void setSoapBindingExtElement(Definition wsdlDefinition, Binding binding,
ExtensionRegistry extReg) throws Exception {
SOAPBindingUtil.addSOAPNamespace(wsdlDefinition, false);
SOAPBinding
soapBinding = SOAPBindingUtil.createSoapBinding(extReg, false);
soapBinding.setStyle(style);
binding.addExtensibilityElement(soapBinding);
}
代码示例来源:origin: org.apache.airavata/gfac-schema-utils
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;
}
代码示例来源:origin: org.objectweb.celtix/celtix-tools
private void setXMLBindingExtElement() throws ToolException {
if (extReg == null) {
extReg = wsdlFactory.newPopulatedExtensionRegistry();
}
XMLFormatBinding xmlBinding = null;
try {
xmlBinding = (XMLFormatBinding)extReg.createExtension(Binding.class,
ToolConstants.XML_BINDING_FORMAT);
} catch (WSDLException wse) {
Message msg = new Message("FAIL_TO_CREATE_XMLBINDING", LOG);
throw new ToolException(msg);
}
binding.addExtensibilityElement(xmlBinding);
}
代码示例来源:origin: apache/cxf
private void setXMLBindingExtElement() throws ToolException {
if (extReg == null) {
extReg = wsdlFactory.newPopulatedExtensionRegistry();
}
try {
binding.addExtensibilityElement(getWSDLPlugin("xml", Binding.class).createExtension(null));
} catch (WSDLException wse) {
Message msg = new Message("FAIL_TO_CREATE_XMLBINDING", LOG);
throw new ToolException(msg, wse);
}
}
代码示例来源:origin: org.apache.cxf/cxf-tools-misctools
private void setXMLBindingExtElement() throws ToolException {
if (extReg == null) {
extReg = wsdlFactory.newPopulatedExtensionRegistry();
}
try {
binding.addExtensibilityElement(getWSDLPlugin("xml", Binding.class).createExtension(null));
} catch (WSDLException wse) {
Message msg = new Message("FAIL_TO_CREATE_XMLBINDING", LOG);
throw new ToolException(msg, wse);
}
}
代码示例来源:origin: apache/servicemix-bundles
/**
* 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 calls {@link DefaultConcretePartProvider#populateBinding(Definition, Binding)}, adds the
* SOAP 1.1 namespace, creates a {@link SOAPBinding}, and calls {@link #populateSoapBinding(SOAPBinding, Binding)}
* 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}
*/
@Override
protected void populateBinding(Definition definition, Binding binding) throws WSDLException {
definition.addNamespace(SOAP_11_NAMESPACE_PREFIX, SOAP_11_NAMESPACE_URI);
super.populateBinding(definition, binding);
SOAPBinding soapBinding = (SOAPBinding) createSoapExtension(definition, Binding.class, "binding");
populateSoapBinding(soapBinding, binding);
binding.addExtensibilityElement(soapBinding);
}
代码示例来源:origin: org.springframework.ws/spring-ws-core
/**
* 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 calls {@link DefaultConcretePartProvider#populateBinding(Definition, Binding)}, adds the
* SOAP 1.1 namespace, creates a {@link SOAPBinding}, and calls {@link #populateSoapBinding(SOAPBinding, Binding)}
* 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}
*/
@Override
protected void populateBinding(Definition definition, Binding binding) throws WSDLException {
definition.addNamespace(SOAP_11_NAMESPACE_PREFIX, SOAP_11_NAMESPACE_URI);
super.populateBinding(definition, binding);
SOAPBinding soapBinding = (SOAPBinding) createSoapExtension(definition, Binding.class, "binding");
populateSoapBinding(soapBinding, binding);
binding.addExtensibilityElement(soapBinding);
}
代码示例来源:origin: org.springframework.ws/org.springframework.ws
/**
* Called after the {@link javax.wsdl.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 calls {@link DefaultConcretePartProvider#populateBinding(javax.wsdl.Definition,
* javax.wsdl.Binding)}, adds the SOAP 1.1 namespace, creates a {@link javax.wsdl.extensions.soap.SOAPBinding}, and
* calls {@link #populateSoapBinding(javax.wsdl.extensions.soap12.SOAP12Binding, javax.wsdl.Binding)} 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>
*/
@Override
protected void populateBinding(Definition definition, Binding binding) throws WSDLException {
definition.addNamespace(SOAP_12_NAMESPACE_PREFIX, SOAP_12_NAMESPACE_URI);
super.populateBinding(definition, binding);
SOAP12Binding soapBinding = (SOAP12Binding) createSoapExtension(definition, Binding.class, "binding");
populateSoapBinding(soapBinding, binding);
binding.addExtensibilityElement(soapBinding);
}
代码示例来源:origin: spring-projects/spring-ws
/**
* 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 calls {@link DefaultConcretePartProvider#populateBinding(Definition, Binding)}, adds the
* SOAP 1.1 namespace, creates a {@link SOAPBinding}, and calls {@link #populateSoapBinding(SOAPBinding, Binding)}
* 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}
*/
@Override
protected void populateBinding(Definition definition, Binding binding) throws WSDLException {
definition.addNamespace(SOAP_11_NAMESPACE_PREFIX, SOAP_11_NAMESPACE_URI);
super.populateBinding(definition, binding);
SOAPBinding soapBinding = (SOAPBinding) createSoapExtension(definition, Binding.class, "binding");
populateSoapBinding(soapBinding, binding);
binding.addExtensibilityElement(soapBinding);
}
代码示例来源:origin: apache/servicemix-bundles
/**
* Called after the {@link javax.wsdl.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 calls {@link DefaultConcretePartProvider#populateBinding(javax.wsdl.Definition,
* javax.wsdl.Binding)}, adds the SOAP 1.1 namespace, creates a {@link javax.wsdl.extensions.soap.SOAPBinding}, and
* calls {@link #populateSoapBinding(javax.wsdl.extensions.soap12.SOAP12Binding, javax.wsdl.Binding)} 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}
*/
@Override
protected void populateBinding(Definition definition, Binding binding) throws WSDLException {
definition.addNamespace(SOAP_12_NAMESPACE_PREFIX, SOAP_12_NAMESPACE_URI);
super.populateBinding(definition, binding);
SOAP12Binding soapBinding = (SOAP12Binding) createSoapExtension(definition, Binding.class, "binding");
populateSoapBinding(soapBinding, binding);
binding.addExtensibilityElement(soapBinding);
}
代码示例来源:origin: org.springframework.ws/spring-ws-core
/**
* Called after the {@link javax.wsdl.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 calls {@link DefaultConcretePartProvider#populateBinding(javax.wsdl.Definition,
* javax.wsdl.Binding)}, adds the SOAP 1.1 namespace, creates a {@link javax.wsdl.extensions.soap.SOAPBinding}, and
* calls {@link #populateSoapBinding(javax.wsdl.extensions.soap12.SOAP12Binding, javax.wsdl.Binding)} 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}
*/
@Override
protected void populateBinding(Definition definition, Binding binding) throws WSDLException {
definition.addNamespace(SOAP_12_NAMESPACE_PREFIX, SOAP_12_NAMESPACE_URI);
super.populateBinding(definition, binding);
SOAP12Binding soapBinding = (SOAP12Binding) createSoapExtension(definition, Binding.class, "binding");
populateSoapBinding(soapBinding, binding);
binding.addExtensibilityElement(soapBinding);
}
代码示例来源:origin: org.springframework.ws/org.springframework.ws
/**
* 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 calls {@link DefaultConcretePartProvider#populateBinding(Definition, Binding)}, adds the
* SOAP 1.1 namespace, creates a {@link SOAPBinding}, and calls {@link #populateSoapBinding(SOAPBinding, Binding)}
* 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>
*/
@Override
protected void populateBinding(Definition definition, Binding binding) throws WSDLException {
definition.addNamespace(SOAP_11_NAMESPACE_PREFIX, SOAP_11_NAMESPACE_URI);
super.populateBinding(definition, binding);
SOAPBinding soapBinding = (SOAPBinding) createSoapExtension(definition, Binding.class, "binding");
populateSoapBinding(soapBinding, binding);
binding.addExtensibilityElement(soapBinding);
}
代码示例来源:origin: org.objectweb.celtix/celtix-tools
private void setSoapBindingExtElement() throws ToolException {
if (extReg == null) {
extReg = wsdlFactory.newPopulatedExtensionRegistry();
}
SOAPBinding soapBinding = null;
try {
soapBinding = (SOAPBinding)extReg.createExtension(Binding.class, WSDLConstants.NS_SOAP_BINDING);
} catch (WSDLException wse) {
Message msg = new Message("FAIL_TO_CREATE_SOAPBINDING", LOG);
throw new ToolException(msg, wse);
}
soapBinding.setStyle((String)env.get(ToolConstants.CFG_STYLE));
soapBinding.setTransportURI(WSDLConstants.NS_SOAP11_HTTP_BINDING);
binding.addExtensibilityElement(soapBinding);
}
代码示例来源:origin: apache/cxf
private void setSoapBindingExtElement() throws ToolException {
if (extReg == null) {
extReg = wsdlFactory.newPopulatedExtensionRegistry();
}
SOAPBindingUtil.addSOAPNamespace(wsdlDefinition, isSOAP12());
SoapBinding soapBinding = null;
try {
soapBinding = SOAPBindingUtil.createSoapBinding(extReg, isSOAP12());
} catch (WSDLException wse) {
Message msg = new Message("FAIL_TO_CREATE_SOAPBINDING", LOG);
throw new ToolException(msg, wse);
}
soapBinding.setStyle((String)env.get(ToolConstants.CFG_STYLE));
binding.addExtensibilityElement(soapBinding);
}
代码示例来源:origin: org.apache.cxf/cxf-tools-misctools
private void setSoapBindingExtElement() throws ToolException {
if (extReg == null) {
extReg = wsdlFactory.newPopulatedExtensionRegistry();
}
SOAPBindingUtil.addSOAPNamespace(wsdlDefinition, isSOAP12());
SoapBinding soapBinding = null;
try {
soapBinding = SOAPBindingUtil.createSoapBinding(extReg, isSOAP12());
} catch (WSDLException wse) {
Message msg = new Message("FAIL_TO_CREATE_SOAPBINDING", LOG);
throw new ToolException(msg, wse);
}
soapBinding.setStyle((String)env.get(ToolConstants.CFG_STYLE));
binding.addExtensibilityElement(soapBinding);
}
代码示例来源:origin: org.apache.tuscany.sca/tuscany-binding-ws-wsdlgen
public Binding createBinding(Definition definition, PortType portType) {
try {
Binding binding = definition.createBinding();
binding.setPortType(portType);
configureBinding(definition, binding, portType);
ExtensibilityElement bindingExtension =
definition.getExtensionRegistry().createExtension(Binding.class, soapBinding);
if (requiresSOAP12) {
((SOAP12Binding)bindingExtension).setStyle("document");
((SOAP12Binding)bindingExtension).setTransportURI("http://schemas.xmlsoap.org/soap/http");
} else {
((SOAPBinding)bindingExtension).setStyle("document");
((SOAPBinding)bindingExtension).setTransportURI("http://schemas.xmlsoap.org/soap/http");
}
binding.addExtensibilityElement(bindingExtension);
return binding;
} catch (WSDLException e) {
throw new WSDLGenerationException(e);
}
}
代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime
public Binding createBinding(Definition definition, PortType portType) {
try {
Binding binding = definition.createBinding();
binding.setPortType(portType);
configureBinding(definition, binding, portType);
ExtensibilityElement bindingExtension =
definition.getExtensionRegistry().createExtension(Binding.class, soapBinding);
if (requiresSOAP12) {
((SOAP12Binding)bindingExtension).setStyle("document");
((SOAP12Binding)bindingExtension).setTransportURI("http://schemas.xmlsoap.org/soap/http");
} else {
((SOAPBinding)bindingExtension).setStyle("document");
((SOAPBinding)bindingExtension).setTransportURI("http://schemas.xmlsoap.org/soap/http");
}
binding.addExtensibilityElement(bindingExtension);
return binding;
} catch (WSDLException e) {
throw new WSDLGenerationException(e);
}
}
内容来源于网络,如有侵权,请联系作者删除!