當前位置: 首頁>>代碼示例>>Java>>正文


Java BindingProvider.getBinding方法代碼示例

本文整理匯總了Java中javax.xml.ws.BindingProvider.getBinding方法的典型用法代碼示例。如果您正苦於以下問題:Java BindingProvider.getBinding方法的具體用法?Java BindingProvider.getBinding怎麽用?Java BindingProvider.getBinding使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在javax.xml.ws.BindingProvider的用法示例。


在下文中一共展示了BindingProvider.getBinding方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: setBinding

import javax.xml.ws.BindingProvider; //導入方法依賴的package包/類
private void setBinding(BindingProvider client, String userName, String password) {
    final Binding binding = client.getBinding();
    List<Handler> handlerList = binding.getHandlerChain();
    if (handlerList == null)
        handlerList = new ArrayList<>();
    handlerList.add(new SOAPSecurityHandler(userName, password));
    binding.setHandlerChain(handlerList);
}
 
開發者ID:servicecatalog,項目名稱:oscm-app,代碼行數:9,代碼來源:BesDAO.java

示例2: setupService

import javax.xml.ws.BindingProvider; //導入方法依賴的package包/類
private void setupService(BindingProvider bp, String serviceName,
    String url, Boolean enableMTOM, String proxyHost, int proxyPort,
    String proxyUser, String proxyPassword) {
bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
	url + "services/" + serviceName + WS_VERSION);
if (proxyHost != null) {
    if (proxyHost.startsWith(HTTP_PREFIX)) {
	bp.getRequestContext().put(HTTP_PROXY_HOST, proxyHost);
	bp.getRequestContext().put(HTTP_PROXY_PORT, proxyPort);
	if (proxyUser != null && proxyUser.trim().length() > 0) {
	    bp.getRequestContext().put(HTTP_PROXY_USER, proxyUser);
	    bp.getRequestContext().put(HTTP_PROXY_PASSWORD,
		    proxyPassword);
	}
    } else if (proxyHost.startsWith(HTTPS_PREFIX)) {
	bp.getRequestContext().put(HTTPS_PROXY_HOST, proxyHost);
	bp.getRequestContext().put(HTTPS_PROXY_PORT, proxyPort);
	if (proxyUser != null && proxyUser.trim().length() > 0) {
	    bp.getRequestContext().put(HTTPS_PROXY_USER, proxyUser);
	    bp.getRequestContext().put(HTTPS_PROXY_PASSWORD,
		    proxyPassword);
	}
    }
}
SOAPBinding binding = (SOAPBinding) bp.getBinding();
binding.setMTOMEnabled(enableMTOM);

   }
 
開發者ID:translations-com,項目名稱:globallink-connect-api-java,代碼行數:29,代碼來源:ServiceLocator.java

示例3: createPort

import javax.xml.ws.BindingProvider; //導入方法依賴的package包/類
private DocumentRepositoryPortTypeProxy createPort() {
	final DocumentRepositoryPortTypeProxy port = new DocumentRepositoryService(wsdlURL, serviceName).getDocumentRepositoryPortSoap12();
	if (StringUtils.hasText(this.endpointAddress)) {
		final BindingProvider bp = port;
		bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endpointAddress);
		
		SOAPBinding binding = (SOAPBinding) bp.getBinding();
		binding.setMTOMEnabled(true);
	}
	
	return port;
}
 
開發者ID:bhits,項目名稱:common-libraries,代碼行數:13,代碼來源:XDSRepositorybClientTest.java


注:本文中的javax.xml.ws.BindingProvider.getBinding方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。