com.sun.xml.ws.api.WSBinding.getBindingId()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(8.2k)|赞(0)|评价(0)|浏览(124)

本文整理了Java中com.sun.xml.ws.api.WSBinding.getBindingId()方法的一些代码示例,展示了WSBinding.getBindingId()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WSBinding.getBindingId()方法的具体详情如下:
包路径:com.sun.xml.ws.api.WSBinding
类名称:WSBinding
方法名:getBindingId

WSBinding.getBindingId介绍

[英]Gets the binding ID, which uniquely identifies the binding.

The relevant specs define the binding IDs and what they mean. The ID is used in many places to identify the kind of binding (such as SOAP1.1, SOAP1.2, REST, ...)
[中]获取唯一标识绑定的绑定ID。
相关规范定义了绑定ID及其含义。ID在许多地方用于标识绑定的类型(例如SOAP1.1、SOAP1.2、REST等)

代码示例

代码示例来源:origin: org.seedstack.addons.ws/web-services-core

/**
 * Return the endpoint definitions corresponding to the list of supplied supported bindings.
 *
 * @param supportedBindings the supported bindings to filter the list of endpoint definitions.
 * @return the map of names to endpoint definitions.
 */
public Map<String, EndpointDefinition> getEndpointDefinitions(List<String> supportedBindings) {
  Map<String, EndpointDefinition> wsEndpoints = new HashMap<>();
  for (Map.Entry<String, EndpointDefinition> endpointDefinitionEntry : this.endpointDefinitions.entrySet()) {
    if (supportedBindings.contains(endpointDefinitionEntry.getValue().getBinding().getBindingId().toString())) {
      wsEndpoints.put(endpointDefinitionEntry.getKey(), endpointDefinitionEntry.getValue());
    }
  }
  return wsEndpoints;
}

代码示例来源:origin: com.sun.xml.ws/jaxws-rt

static boolean isXMLHttp(@NotNull WSBinding binding) {
  return binding.getBindingId().equals(BindingID.XML_HTTP);
}

代码示例来源:origin: javaee/metro-jax-ws

static boolean isXMLHttp(@NotNull WSBinding binding) {
  return binding.getBindingId().equals(BindingID.XML_HTTP);
}

代码示例来源:origin: com.sun.xml.ws/rt

static boolean isXMLHttp(@NotNull WSBinding binding) {
  return binding.getBindingId().equals(BindingID.XML_HTTP);
}

代码示例来源:origin: javaee/metro-jax-ws

public Codec getCodec() {
  if (codec != null) {
    return codec;
  }
  if (endpoint != null) {
    codec = endpoint.createCodec();
  }
  WSBinding wsb = getBinding();
  if (wsb != null) {
    codec = wsb.getBindingId().createEncoder(wsb);
  }        
  return codec;
}

代码示例来源:origin: com.sun.xml.ws/jaxws-rt

public Codec getCodec() {
  if (codec != null) {
    return codec;
  }
  if (endpoint != null) {
    codec = endpoint.createCodec();
  }
  WSBinding wsb = getBinding();
  if (wsb != null) {
    codec = wsb.getBindingId().createEncoder(wsb);
  }        
  return codec;
}

代码示例来源:origin: com.sun.xml.ws/rt

public Codec getCodec() {
  if (codec != null) {
    return codec;
  }
  if (endpoint != null) {
    codec = endpoint.createCodec();
  }
  WSBinding wsb = getBinding();
  if (wsb != null) {
    codec = wsb.getBindingId().createEncoder(wsb);
  }        
  return codec;
}

代码示例来源:origin: javaee/metro-jax-ws

@ManagedAttribute
@Description("Binding Identifier")
public @NotNull BindingID bindingID() {
  return endpoint.getBinding().getBindingId();
}

代码示例来源:origin: com.sun.xml.ws/jaxws-rt

@ManagedAttribute
@Description("Binding Identifier")
public @NotNull BindingID bindingID() {
  return endpoint.getBinding().getBindingId();
}

代码示例来源:origin: com.sun.xml.ws/rt

@ManagedAttribute
@Description("Binding Identifier")
public @NotNull BindingID bindingID() {
  return endpoint.getBinding().getBindingId();
}

代码示例来源:origin: javaee/metro-jax-ws

/**
 * Generates the Service section of the WSDL
 */
protected void generateService() {
  QName portQName = model.getPortName();
  QName serviceQName = model.getServiceQName();
  Service service = serviceDefinitions.service().name(serviceQName.getLocalPart());
  extension.addServiceExtension(service);
  Port port = service.port().name(portQName.getLocalPart());
  port.binding(model.getBoundPortTypeName());
  extension.addPortExtension(port);
  if (model.getJavaMethods().isEmpty())
    return;
  if (this.binding.getBindingId().getSOAPVersion() == SOAPVersion.SOAP_12) {
    com.sun.xml.ws.wsdl.writer.document.soap12.SOAPAddress address = port._element(com.sun.xml.ws.wsdl.writer.document.soap12.SOAPAddress.class);
    address.location(endpointAddress);
  } else {
    SOAPAddress address = port._element(SOAPAddress.class);
    address.location(endpointAddress);
  }
}

代码示例来源:origin: com.sun.xml.ws/jaxws-rt

/**
 * Generates the Service section of the WSDL
 */
protected void generateService() {
  QName portQName = model.getPortName();
  QName serviceQName = model.getServiceQName();
  Service service = serviceDefinitions.service().name(serviceQName.getLocalPart());
  extension.addServiceExtension(service);
  Port port = service.port().name(portQName.getLocalPart());
  port.binding(model.getBoundPortTypeName());
  extension.addPortExtension(port);
  if (model.getJavaMethods().isEmpty())
    return;
  if (this.binding.getBindingId().getSOAPVersion() == SOAPVersion.SOAP_12) {
    com.sun.xml.ws.wsdl.writer.document.soap12.SOAPAddress address = port._element(com.sun.xml.ws.wsdl.writer.document.soap12.SOAPAddress.class);
    address.location(endpointAddress);
  } else {
    SOAPAddress address = port._element(SOAPAddress.class);
    address.location(endpointAddress);
  }
}

代码示例来源:origin: com.sun.xml.ws/rt

/**
 * Generates the Service section of the WSDL
 */
protected void generateService() {
  QName portQName = model.getPortName();
  QName serviceQName = model.getServiceQName();
  Service service = serviceDefinitions.service().name(serviceQName.getLocalPart());
  extension.addServiceExtension(service);
  Port port = service.port().name(portQName.getLocalPart());
  port.binding(model.getBoundPortTypeName());
  extension.addPortExtension(port);
  if (model.getJavaMethods().isEmpty())
    return;
  if (this.binding.getBindingId().getSOAPVersion() == SOAPVersion.SOAP_12) {
    com.sun.xml.ws.wsdl.writer.document.soap12.SOAPAddress address = port._element(com.sun.xml.ws.wsdl.writer.document.soap12.SOAPAddress.class);
    address.location(endpointAddress);
  } else {
    SOAPAddress address = port._element(SOAPAddress.class);
    address.location(endpointAddress);
  }
}

代码示例来源:origin: com.sun.xml.ws/jaxws-rt

if (soapVersion == SOAPVersion.SOAP_12) {
    com.sun.xml.ws.wsdl.writer.document.soap12.SOAPBinding soapBinding = newBinding.soap12Binding();
    soapBinding.transport(this.binding.getBindingId().getTransport());
    if (sBinding.getStyle().equals(Style.DOCUMENT))
      soapBinding.style(DOCUMENT);
  } else {
    com.sun.xml.ws.wsdl.writer.document.soap.SOAPBinding soapBinding = newBinding.soapBinding();
    soapBinding.transport(this.binding.getBindingId().getTransport());
    if (sBinding.getStyle().equals(Style.DOCUMENT))
      soapBinding.style(DOCUMENT);
if (this.binding.getBindingId().getSOAPVersion() == SOAPVersion.SOAP_12)
  generateSOAP12BindingOperation(method, newBinding);
else

代码示例来源:origin: com.sun.xml.ws/rt

if (soapVersion == SOAPVersion.SOAP_12) {
    com.sun.xml.ws.wsdl.writer.document.soap12.SOAPBinding soapBinding = newBinding.soap12Binding();
    soapBinding.transport(this.binding.getBindingId().getTransport());
    if (sBinding.getStyle().equals(Style.DOCUMENT))
      soapBinding.style(DOCUMENT);
  } else {
    com.sun.xml.ws.wsdl.writer.document.soap.SOAPBinding soapBinding = newBinding.soapBinding();
    soapBinding.transport(this.binding.getBindingId().getTransport());
    if (sBinding.getStyle().equals(Style.DOCUMENT))
      soapBinding.style(DOCUMENT);
if (this.binding.getBindingId().getSOAPVersion() == SOAPVersion.SOAP_12)
  generateSOAP12BindingOperation(method, newBinding);
else

代码示例来源:origin: javaee/metro-jax-ws

if (soapVersion == SOAPVersion.SOAP_12) {
    com.sun.xml.ws.wsdl.writer.document.soap12.SOAPBinding soapBinding = newBinding.soap12Binding();
    soapBinding.transport(this.binding.getBindingId().getTransport());
    if (sBinding.getStyle().equals(Style.DOCUMENT))
      soapBinding.style(DOCUMENT);
  } else {
    com.sun.xml.ws.wsdl.writer.document.soap.SOAPBinding soapBinding = newBinding.soapBinding();
    soapBinding.transport(this.binding.getBindingId().getTransport());
    if (sBinding.getStyle().equals(Style.DOCUMENT))
      soapBinding.style(DOCUMENT);
if (this.binding.getBindingId().getSOAPVersion() == SOAPVersion.SOAP_12)
  generateSOAP12BindingOperation(method, newBinding);
else

代码示例来源:origin: com.sun.xml.ws/rt

BindingID bindingId = binding.getBindingId();
if (!bindingId.canGenerateWSDL()) {
  throw new ServerRtException("can.not.generate.wsdl", bindingId);

代码示例来源:origin: com.sun.xml.ws/jaxws-rt

BindingID bindingId = binding.getBindingId();
if (!bindingId.canGenerateWSDL()) {
  throw new ServerRtException("can.not.generate.wsdl", bindingId);

代码示例来源:origin: javaee/metro-jax-ws

BindingID bindingId = binding.getBindingId();
if (!bindingId.canGenerateWSDL()) {
  throw new ServerRtException("can.not.generate.wsdl", bindingId);

代码示例来源:origin: javaee/metro-jax-ws

if (metadataReader == null) metadataReader = new ReflectAnnotationReader();
if (wsBinding != null) {
  this.bindingId = wsBinding.getBindingId();
  if (config.getFeatures() != null) wsBinding.getFeatures().mergeFeatures(config.getFeatures(), false);
  if (binding != null) wsBinding.getFeatures().mergeFeatures(binding.getFeatures(), false);

相关文章