当前位置: 首页>>代码示例>>Java>>正文


Java Binding.getHandlerChain方法代码示例

本文整理汇总了Java中javax.xml.ws.Binding.getHandlerChain方法的典型用法代码示例。如果您正苦于以下问题:Java Binding.getHandlerChain方法的具体用法?Java Binding.getHandlerChain怎么用?Java Binding.getHandlerChain使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.xml.ws.Binding的用法示例。


在下文中一共展示了Binding.getHandlerChain方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: CertRAClient

import javax.xml.ws.Binding; //导入方法依赖的package包/类
public CertRAClient(String location) {
	CertRaService certRaService = CertRaServiceFactory.newInstance();
	this.port = certRaService.getCertRaPort();

	BindingProvider bindingProvider = (BindingProvider) this.port;
	bindingProvider.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, location);

	Binding binding = bindingProvider.getBinding();
	List<Handler> handlerChain = binding.getHandlerChain();
	handlerChain.add(new LoggingHandler());
	// LoggingHandler makes CXF fail on the attachments.
	// https://issues.apache.org/jira/browse/CXF-5496
	binding.setHandlerChain(handlerChain);

	this.protocolObjectFactory = new be.e_contract.mycarenet.certra.jaxb.protocol.ObjectFactory();
}
 
开发者ID:e-Contract,项目名称:mycarenet,代码行数:17,代码来源:CertRAClient.java

示例2: EHealthSTSClient

import javax.xml.ws.Binding; //导入方法依赖的package包/类
/**
 * Main constructor.
 * 
 * @param location
 *            the URL of the eHealth STS web service.
 */
public EHealthSTSClient(String location) {
	EHealthSamlStsService service = EHealthSamlStsServiceFactory
			.newInstance();

	QName portQName = new QName("urn:be:ehealth:saml:sts:1.0",
			"EHealthSamlStsPort");
	this.dispatch = service.createDispatch(portQName, Source.class,
			Service.Mode.PAYLOAD);

	this.dispatch.getRequestContext().put(
			Dispatch.ENDPOINT_ADDRESS_PROPERTY, location);

	Binding binding = dispatch.getBinding();
	@SuppressWarnings("rawtypes")
	List<Handler> handlerChain = binding.getHandlerChain();
	this.wsSecuritySOAPHandler = new WSSecuritySOAPHandler();
	handlerChain.add(this.wsSecuritySOAPHandler);
	handlerChain.add(new LoggingHandler());
	binding.setHandlerChain(handlerChain);
}
 
开发者ID:e-Contract,项目名称:mycarenet,代码行数:27,代码来源:EHealthSTSClient.java

示例3: XKMSClient

import javax.xml.ws.Binding; //导入方法依赖的package包/类
/**
 * Main constructor.
 * 
 * @param location
 *            the URL of the MyCareNet XKMS web service.
 */
public XKMSClient(String location) {
	XMLKeyManagementService service = XKMSServiceFactory.newInstance();
	this.port = service.getKeyServiceSoapPort();
	BindingProvider bindingProvider = (BindingProvider) this.port;
	bindingProvider.getRequestContext().put(
			BindingProvider.ENDPOINT_ADDRESS_PROPERTY, location);

	Binding binding = bindingProvider.getBinding();
	@SuppressWarnings("rawtypes")
	List<Handler> handlerChain = binding.getHandlerChain();
	handlerChain.add(new LoggingHandler());
	this.proofOfPossessionSignatureSOAPHandler = new ProofOfPossessionSignatureSOAPHandler();
	handlerChain.add(this.proofOfPossessionSignatureSOAPHandler);
	handlerChain.add(new LoggingHandler());
	binding.setHandlerChain(handlerChain);

	this.objectFactory = new ObjectFactory();
	this.xmldsigObjectFactory = new be.e_contract.mycarenet.jaxb.xmldsig.ObjectFactory();
}
 
开发者ID:e-Contract,项目名称:mycarenet,代码行数:26,代码来源:XKMSClient.java

示例4: configureBindingProvider

import javax.xml.ws.Binding; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
private void configureBindingProvider(BindingProvider bindingProvider,
		String location) {
	bindingProvider.getRequestContext().put(
			BindingProvider.ENDPOINT_ADDRESS_PROPERTY, location);

	Binding binding = bindingProvider.getBinding();
	@SuppressWarnings("rawtypes")
	List handlerChain = binding.getHandlerChain();
	handlerChain.add(this.wsSecuritySOAPHandler);
	handlerChain.add(this.inboundAttachmentsSOAPHandler);
	// handlerChain.add(new LoggingHandler());
	// LoggingHandler makes CXF fail on the attachments.
	// https://issues.apache.org/jira/browse/CXF-5496
	binding.setHandlerChain(handlerChain);
}
 
开发者ID:e-Contract,项目名称:mycarenet,代码行数:17,代码来源:EHealthBoxConsultationClient.java

示例5: decorate

import javax.xml.ws.Binding; //导入方法依赖的package包/类
/**
 * Decorates a given JAX-WS port with the required security handlers.
 * 
 * @param bindingProvider
 *            the JAX-WS port to decorate.
 * @return the added payload logical JAX-WS handler.
 */
public PayloadLogicalHandler decorate(BindingProvider bindingProvider) {
	bindingProvider.getRequestContext().put(
			BindingProvider.ENDPOINT_ADDRESS_PROPERTY, this.location);

	Binding binding = bindingProvider.getBinding();
	@SuppressWarnings("rawtypes")
	List<Handler> handlerChain = binding.getHandlerChain();
	SecuritySOAPHandler sessionKeySignatureSOAPHandler = new SecuritySOAPHandler(
			this.sessionKey, this.packageLicenseKey);
	handlerChain.add(sessionKeySignatureSOAPHandler);
	handlerChain.add(new LoggingHandler());
	PayloadLogicalHandler payloadLogicalHandler = new PayloadLogicalHandler();
	handlerChain.add(payloadLogicalHandler);
	binding.setHandlerChain(handlerChain);
	return payloadLogicalHandler;
}
 
开发者ID:e-Contract,项目名称:mycarenet,代码行数:24,代码来源:SecurityDecorator.java

示例6: setBinding

import javax.xml.ws.Binding; //导入方法依赖的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

示例7: getPort

import javax.xml.ws.Binding; //导入方法依赖的package包/类
/**
 * this is for Client Stub Programming
 * 
 * @param t
 * @param s
 * @param args
 * @return
 */
@SuppressWarnings({ "unchecked", "rawtypes" })
public <T> T getPort(T t, Service s, Object[] args) {

    Class<T> clz = null;
    if (Class.class.isAssignableFrom(args[0].getClass())) {
        clz = (Class<T>) args[0];
    }
    else if (Class.class.isAssignableFrom(args[1].getClass())) {
        clz = (Class<T>) args[1];
    }

    if (clz == null) {
        return t;
    }

    Binding binding = ((BindingProvider) t).getBinding();
    List<Handler> handlerChain = binding.getHandlerChain();
    handlerChain.add(this.handler);
    binding.setHandlerChain(handlerChain);

    final String wsdlLocation = getServiceURL(s);

    T tProxy = JDKProxyInvokeUtil.newProxyInstance(clz.getClassLoader(), new Class[] { clz },
            new JDKProxyInvokeHandler<T>(t, new ClientStubProcessor(wsdlLocation.toString(), this.handler)));
    return tProxy;
}
 
开发者ID:uavorg,项目名称:uavstack,代码行数:35,代码来源:JaxWSHookIT.java

示例8: createDispatch

import javax.xml.ws.Binding; //导入方法依赖的package包/类
@SuppressWarnings("rawtypes")
public Dispatch createDispatch(Dispatch d, Service s, Object[] args) {

    Binding binding = ((BindingProvider) d).getBinding();
    List<Handler> handlerChain = binding.getHandlerChain();
    handlerChain.add(this.handler);
    binding.setHandlerChain(handlerChain);

    final String wsdlLocation = getServiceURL(s);

    Dispatch tProxy = JDKProxyInvokeUtil.newProxyInstance(this.getClass().getClassLoader(),
            new Class[] { Dispatch.class },
            new JDKProxyInvokeHandler<Dispatch>(d, new DispatchProcessor(wsdlLocation.toString(), this.handler)));
    return tProxy;
}
 
开发者ID:uavorg,项目名称:uavstack,代码行数:16,代码来源:JaxWSHookIT.java

示例9: addMessageHandler

import javax.xml.ws.Binding; //导入方法依赖的package包/类
/**
 * Add a message handler to a SOAP binding
 * @param binding binding to which we'll add the handler
 * @param handler the handler to be added
 */
@SuppressWarnings({ "unchecked", "rawtypes" })
public static void addMessageHandler(Object binding, SOAPHandler<SOAPMessageContext> handler) {
	final Binding b = ((BindingProvider) binding).getBinding();
	List handlerList = b.getHandlerChain();
	if (handlerList == null)
		handlerList = new ArrayList();
	handlerList.add(handler);
	b.setHandlerChain(handlerList);
}
 
开发者ID:ddRPB,项目名称:rpb,代码行数:15,代码来源:Util.java

示例10: configureBindingProvider

import javax.xml.ws.Binding; //导入方法依赖的package包/类
private void configureBindingProvider(BindingProvider bindingProvider,
		String location) {
	bindingProvider.getRequestContext().put(
			BindingProvider.ENDPOINT_ADDRESS_PROPERTY, location);

	Binding binding = bindingProvider.getBinding();
	List handlerChain = binding.getHandlerChain();
	handlerChain.add(this.wsSecuritySOAPHandler);
	handlerChain.add(new LoggingHandler());
	binding.setHandlerChain(handlerChain);
}
 
开发者ID:e-Contract,项目名称:mycarenet,代码行数:12,代码来源:GenericInsurabilityClient.java

示例11: configureBindingProvider

import javax.xml.ws.Binding; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
private void configureBindingProvider(BindingProvider bindingProvider, String location) {
	bindingProvider.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, location);

	Binding binding = bindingProvider.getBinding();
	@SuppressWarnings("rawtypes")
	List handlerChain = binding.getHandlerChain();
	handlerChain.add(this.wsSecuritySOAPHandler);
	binding.setHandlerChain(handlerChain);
}
 
开发者ID:e-Contract,项目名称:mycarenet,代码行数:11,代码来源:TarificationClient.java

示例12: configureBindingProvider

import javax.xml.ws.Binding; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
private void configureBindingProvider(BindingProvider bindingProvider,
		String location) {
	bindingProvider.getRequestContext().put(
			BindingProvider.ENDPOINT_ADDRESS_PROPERTY, location);

	Binding binding = bindingProvider.getBinding();
	@SuppressWarnings("rawtypes")
	List handlerChain = binding.getHandlerChain();
	handlerChain.add(this.wsSecuritySOAPHandler);
	handlerChain.add(new LoggingHandler());
	handlerChain.add(this.payloadLogicalHandler);
	binding.setHandlerChain(handlerChain);
}
 
开发者ID:e-Contract,项目名称:mycarenet,代码行数:15,代码来源:EHealthBoxPublicationClient.java

示例13: configureBindingProvider

import javax.xml.ws.Binding; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
private void configureBindingProvider(BindingProvider bindingProvider,
		String location) {
	bindingProvider.getRequestContext().put(
			BindingProvider.ENDPOINT_ADDRESS_PROPERTY, location);

	Binding binding = bindingProvider.getBinding();
	@SuppressWarnings("rawtypes")
	List handlerChain = binding.getHandlerChain();
	handlerChain.add(new LoggingHandler());
	handlerChain.add(this.payloadLogicalHandler);
	binding.setHandlerChain(handlerChain);
}
 
开发者ID:e-Contract,项目名称:mycarenet,代码行数:14,代码来源:EtkDepotClient.java

示例14: XKMS2Client

import javax.xml.ws.Binding; //导入方法依赖的package包/类
/**
 * Main constructor.
 * 
 * @param location
 *            the URL of the MyCareNet XKMS 2.0 web service.
 */
public XKMS2Client(String location) {
	XMLKeyManagementService service = XKMS2ServiceFactory.newInstance();
	this.keyServicePort = service.getKeyServiceSoapPort();
	BindingProvider bindingProvider = (BindingProvider) this.keyServicePort;
	bindingProvider.getRequestContext().put(
			BindingProvider.ENDPOINT_ADDRESS_PROPERTY, location);

	Binding binding = bindingProvider.getBinding();
	@SuppressWarnings("rawtypes")
	List<Handler> handlerChain = binding.getHandlerChain();
	this.proofOfPossessionSignatureSOAPHandler = new ProofOfPossessionSignatureSOAPHandler();
	handlerChain.add(new LoggingHandler());
	handlerChain.add(this.proofOfPossessionSignatureSOAPHandler);
	this.keyBindingAuthenticationSignatureSOAPHandler = new KeyBindingAuthenticationSignatureSOAPHandler();
	handlerChain.add(this.keyBindingAuthenticationSignatureSOAPHandler);
	handlerChain.add(new LoggingHandler());
	binding.setHandlerChain(handlerChain);

	this.objectFactory = new ObjectFactory();
	this.xmldsigObjectFactory = new be.e_contract.mycarenet.jaxb.xmldsig.ObjectFactory();
	try {
		this.datatypeFactory = DatatypeFactory.newInstance();
	} catch (DatatypeConfigurationException e) {
		throw new RuntimeException("DatatypeFactory error: "
				+ e.getMessage(), e);
	}

}
 
开发者ID:e-Contract,项目名称:mycarenet,代码行数:35,代码来源:XKMS2Client.java

示例15: registerService

import javax.xml.ws.Binding; //导入方法依赖的package包/类
protected void registerService(BindingProvider bindingProvider)
{
    Binding binding = bindingProvider.getBinding();
    List<Handler> handlerChain = binding.getHandlerChain();

    handlerChain.add(new LoggingHandler());

    // set the handler chain again for the changes to take effect
    binding.setHandlerChain(handlerChain);
}
 
开发者ID:apache,项目名称:juddi,代码行数:11,代码来源:AbstractUDDIClientTestCase.java


注:本文中的javax.xml.ws.Binding.getHandlerChain方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。