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

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

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

WSBinding.getSOAPVersion介绍

[英]Gets the SOAP version of this binding. TODO: clarify what to do with XML/HTTP binding

This is just a short-cut for getBindingID().getSOAPVersion()
[中]获取此绑定的SOAP版本。TODO:阐明如何处理XML/HTTP绑定
这只是getBindingID()的捷径。getSOAPVersion()

代码示例

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

private SOAPVersion getEffectiveSOAPVersion(WSBinding binding) {
  SOAPVersion mySOAPVersion = (soapVersion != null) ? soapVersion : binding.getSOAPVersion();
  if (mySOAPVersion == null) {
    mySOAPVersion = SOAPVersion.SOAP_11;
  }
  return mySOAPVersion;
}

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

/**
 * Creates a new instance of SOAPHandlerTube
 */
public ClientSOAPHandlerTube(WSBinding binding, WSDLPort port, Tube next) {
  super(next, port, binding);
  if (binding.getSOAPVersion() != null) {
    // SOAPHandlerTube should n't be used for bindings other than SOAP.
    // TODO: throw Exception
  }
}

代码示例来源:origin: com.hynnet/xws-security

/** Creates a new instance of XWSSClientPipe */
public XWSSClientPipe(WSDLPort prt, WSService svc, WSBinding bnd, Pipe nextP) {
    nextPipe = nextP;
  port = prt;
  service = svc;
  binding = bnd;
  
  soapVersion = bnd.getSOAPVersion();
  isSOAP12 = (soapVersion == SOAPVersion.SOAP_12) ? true : false;
  soapFactory = soapVersion.saajSoapFactory;
  messageFactory = soapVersion.saajMessageFactory;
  
}

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

protected MUTube(WSBinding binding, Tube next) {
  super(next);
  // MUPipe should n't be used for bindings other than SOAP.
  if (!(binding instanceof SOAPBinding)) {
    throw new WebServiceException(
        "MUPipe should n't be used for bindings other than SOAP.");
  }
  this.binding = (SOAPBindingImpl) binding;
  this.soapVersion = binding.getSOAPVersion();
}

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

public Message getMessage(MessageHeaders headers, AttachmentSet attachments, WSBinding binding) {
    Node n = dom.getNode();
    if(n.getNodeType()== Node.DOCUMENT_NODE) {
      n = ((Document)n).getDocumentElement();
    }
    return new DOMMessage(binding.getSOAPVersion(), headers, (Element)n, attachments);
  }
}

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

public WsaTubeHelper(WSBinding binding, SEIModel seiModel, WSDLPort wsdlPort) {
  this.binding = binding;
  this.wsdlPort = wsdlPort;
  this.seiModel = seiModel;
  this.soapVer = binding.getSOAPVersion();
  this.addVer = binding.getAddressingVersion();
}

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

/**
 * Creates a new instance of SOAPHandlerTube
 */
public ServerSOAPHandlerTube(WSBinding binding, WSDLPort port, Tube next) {
  super(next, port, binding);
  if (binding.getSOAPVersion() != null) {
    // SOAPHandlerTube should n't be used for bindings other than SOAP.
    // TODO: throw Exception
  }
  setUpHandlersOnce();
}

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

public Message getMessage(MessageHeaders headers, AttachmentSet attachments, WSBinding binding) {
    assert (payloadSrc!=null);
    return new PayloadSourceMessage(headers, payloadSrc, attachments,binding.getSOAPVersion());
  }
}

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

/**
 * Creates a new instance of SOAPHandlerTube
 */
public ServerSOAPHandlerTube(WSBinding binding, WSDLPort port, Tube next) {
  super(next, port, binding);
  if (binding.getSOAPVersion() != null) {
    // SOAPHandlerTube should n't be used for bindings other than SOAP.
    // TODO: throw Exception
  }
  setUpHandlersOnce();
}

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

private void writeSOAPAction(Map<String, List<String>> reqHeaders, String soapAction) {
  //dont write SOAPAction HTTP header for SOAP 1.2 messages.
  if(SOAPVersion.SOAP_12.equals(binding.getSOAPVersion())) {
    return;
  }
  if (soapAction != null) {
    reqHeaders.put("SOAPAction", Collections.singletonList(soapAction));
  } else {
    reqHeaders.put("SOAPAction", Collections.singletonList("\"\""));
  }
}

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

public Message getMessage(MessageHeaders headers, AttachmentSet attachments, WSBinding binding) {
    Node n = dom.getNode();
    if(n.getNodeType()== Node.DOCUMENT_NODE) {
      n = ((Document)n).getDocumentElement();
    }
    return new DOMMessage(binding.getSOAPVersion(), headers, (Element)n, attachments);
  }
}

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

public static ProviderArgumentsBuilder<?> create(ProviderEndpointModel model, WSBinding binding) {
  if (model.datatype == Packet.class)
    return new PacketProviderArgumentsBuilder(binding.getSOAPVersion());
  return (binding instanceof SOAPBinding) ? SOAPProviderArgumentBuilder.create(model, binding.getSOAPVersion())
      : XMLProviderArgumentBuilder.createBuilder(model, binding);
}

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

public TieHandler(JavaMethodImpl method, WSBinding binding, MessageContextFactory mcf) {
  this.soapVersion = binding.getSOAPVersion();
  this.method = method.getMethod();
  this.javaMethodModel = method;
  argumentsBuilder = createArgumentsBuilder();
  List<MessageFiller> fillers = new ArrayList<MessageFiller>();
  bodyBuilder = createResponseMessageBuilder(fillers);
  this.outFillers = fillers.toArray(new MessageFiller[fillers.size()]);
  this.isOneWay = method.getMEP().isOneWay();
  this.noOfArgs = this.method.getParameterTypes().length;
  packetFactory = mcf;
}

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

public TieHandler(JavaMethodImpl method, WSBinding binding, MessageContextFactory mcf) {
  this.soapVersion = binding.getSOAPVersion();
  this.method = method.getMethod();
  this.javaMethodModel = method;
  argumentsBuilder = createArgumentsBuilder();
  List<MessageFiller> fillers = new ArrayList<MessageFiller>();
  bodyBuilder = createResponseMessageBuilder(fillers);
  this.outFillers = fillers.toArray(new MessageFiller[fillers.size()]);
  this.isOneWay = method.getMEP().isOneWay();
  this.noOfArgs = this.method.getParameterTypes().length;
  packetFactory = mcf;
}

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

@ManagedAttribute
@Description("Binding SOAP Version")
public String soapVersionHttpBindingId() {
  return endpoint.getBinding().getSOAPVersion().httpBindingId;
}

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

void setUpProcessor() {
  if (!handlers.isEmpty() && processor == null) {
    if (getBinding().getSOAPVersion() == null) {
      processor = new XMLHandlerProcessor(this, getBinding(),
          handlers);
    } else {
      processor = new SOAPHandlerProcessor(false, this, getBinding(), handlers);
    }
  }
}

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

public WsaTube(WSDLPort wsdlPort, WSBinding binding, Tube next) {
  super(next);
  this.wsdlPort = wsdlPort;
  this.binding = binding;
  addKnownHeadersToBinding(binding);
  addressingVersion = binding.getAddressingVersion();
  soapVersion = binding.getSOAPVersion();
  helper = getTubeHelper();
  addressingRequired = AddressingVersion.isRequired(binding);
}

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

final void insertFaultMessage(C context,
      ProtocolException exception) {
    if(exception instanceof HTTPException) {
      context.put(MessageContext.HTTP_RESPONSE_CODE,((HTTPException)exception).getStatusCode());
    }
    if (context != null) {
      // non-soap case
      context.setPacketMessage(Messages.createEmpty(binding.getSOAPVersion()));            
    }        
  }
}

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

final void insertFaultMessage(C context,
      ProtocolException exception) {
    if(exception instanceof HTTPException) {
      context.put(MessageContext.HTTP_RESPONSE_CODE,((HTTPException)exception).getStatusCode());
    }
    if (context != null) {
      // non-soap case
      context.setPacketMessage(Messages.createEmpty(binding.getSOAPVersion()));            
    }        
  }
}

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

static public WebServiceFeature[] toFeatureArray(WSBinding binding) {
    //TODO scchen convert BindingID  to WebServiceFeature[]
    if(!binding.isFeatureEnabled(EnvelopeStyleFeature.class)) {
      WebServiceFeature[] f = { binding.getSOAPVersion().toFeature() };
      binding.getFeatures().mergeFeatures(f, false);
    }
    return binding.getFeatures().toArray();
  }
}

相关文章