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


Java Endpoint.put方法代码示例

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


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

示例1: setupEndpoint

import org.apache.cxf.endpoint.Endpoint; //导入方法依赖的package包/类
protected void setupEndpoint(Endpoint ep) {
    resetPartTypes(ep.getBinding());

    Class<?> fmt = Source.class;
    if (ep.getBinding() instanceof SoapBinding) {
        ep.getInInterceptors().add(new SAAJInInterceptor());          
        SAAJOutInterceptor out = new SAAJOutInterceptor();
        ep.getOutInterceptors().add(out);
        ep.getOutInterceptors().add(new CxfMessageSoapHeaderOutInterceptor());
        ep.getOutInterceptors().add(new MessageModeOutInterceptor(out, ep.getBinding().getBindingInfo().getName()));
        fmt = SOAPMessage.class;
    } else {
        ep.getOutInterceptors().add(new MessageModeOutInterceptor(Source.class, ep.getBinding().getBindingInfo().getName()));
    }
    ep.getInInterceptors().add(new MessageModeInInterceptor(fmt, ep.getBinding().getBindingInfo().getName()));            
    ep.put(AbstractInDatabindingInterceptor.NO_VALIDATE_PARTS, Boolean.TRUE);
    // need to remove the wrapper class and holder interceptor
    removeInterceptors(ep.getInInterceptors(), REMOVING_IN_INTERCEPTORS);
    removeInterceptors(ep.getOutInterceptors(), REMOVING_OUT_INTERCEPTORS);
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:21,代码来源:CXFMessageDataFormatFeature.java

示例2: newFactory

import org.apache.cxf.endpoint.Endpoint; //导入方法依赖的package包/类
private JAXRSServerFactoryBean newFactory(final String prefix, final String service, final String endpoint) {
    final JAXRSServerFactoryBean factory = new JAXRSServerFactoryBean() {
        @Override
        protected Endpoint createEndpoint() throws BusException, EndpointException {
            final Endpoint created = super.createEndpoint();
            created.put(ManagedEndpoint.SERVICE_NAME, service);
            created.put(ManagedEndpoint.ENDPOINT_NAME, endpoint);
            return created;
        }
    };
    factory.setDestinationFactory(transportFactory);
    factory.setBus(CxfUtil.getBus());
    factory.setAddress(prefix);
    return factory;
}
 
开发者ID:apache,项目名称:tomee,代码行数:16,代码来源:CxfRsHttpListener.java

示例3: configureWSSecurity

import org.apache.cxf.endpoint.Endpoint; //导入方法依赖的package包/类
private <T> void configureWSSecurity(Dispatch<T> dispatch) {
    if (this.mcf.getAsSecurityType() == WSManagedConnectionFactory.SecurityType.WSSecurity) {
        Bus bus = BusFactory.getThreadDefaultBus();
        BusFactory.setThreadDefaultBus(this.mcf.getBus());
        try {
        	Client client = ((DispatchImpl)dispatch).getClient();
        	Endpoint ep = client.getEndpoint();

        	// spring configuration file
        	if (this.mcf.getOutInterceptors() != null) {
        		for (Interceptor i : this.mcf.getOutInterceptors()) {
        			ep.getOutInterceptors().add(i);
        		}
        	}

        	// ws-security pass-thru from custom jaas domain
        	Subject subject = ConnectionContext.getSubject();
        	if (subject != null) {
        		WSSecurityCredential credential = ConnectionContext.getSecurityCredential(subject, WSSecurityCredential.class);
        		if (credential != null) {
        			if (credential.useSts()) {
        				dispatch.getRequestContext().put(SecurityConstants.STS_CLIENT, credential.buildStsClient(bus));
        			}
        			if(credential.getSecurityHandler() == WSSecurityCredential.SecurityHandler.WSS4J) {
        				ep.getOutInterceptors().add(new WSS4JOutInterceptor(credential.getRequestPropterties()));
        				ep.getInInterceptors().add(new WSS4JInInterceptor(credential.getResponsePropterties()));
        			}
        			else if (credential.getSecurityHandler() == WSSecurityCredential.SecurityHandler.WSPOLICY) {
        				dispatch.getRequestContext().putAll(credential.getRequestPropterties());
        				dispatch.getResponseContext().putAll(credential.getResponsePropterties());
        			}
        		}
        		
        		// When properties are set on subject treat them as they can configure WS-Security
        		HashMap<String, String> properties = ConnectionContext.getSecurityCredential(subject, HashMap.class);
        		for (String key:properties.keySet()) {
        		    if (key.startsWith("ws-security.")) { //$NON-NLS-1$
        		        ep.put(key, properties.get(key));
        		    }
        		}
        	}
        } finally {
            BusFactory.setThreadDefaultBus(bus);
        }
    }   
}
 
开发者ID:kenweezy,项目名称:teiid,代码行数:47,代码来源:WSConnectionImpl.java


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