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


Java JaxWsProxyFactoryBean.setBus方法代码示例

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


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

示例1: helloWorldjaxWsProxyFactoryBean

import org.apache.cxf.jaxws.JaxWsProxyFactoryBean; //导入方法依赖的package包/类
@Bean(name = "helloWorldJaxWsProxyBean")
public HelloWorldPortType helloWorldjaxWsProxyFactoryBean() {
    JaxWsProxyFactoryBean jaxWsProxyFactoryBean = new JaxWsProxyFactoryBean();
    jaxWsProxyFactoryBean.setServiceClass(HelloWorldPortType.class);
    jaxWsProxyFactoryBean.setAddress(environment
            .getProperty("helloworld.address"));
    jaxWsProxyFactoryBean.setBus(bus());

    // set the user name for basic authentication
    jaxWsProxyFactoryBean.setUsername(environment
            .getProperty("client.username"));
    // set the password for basic authentication
    jaxWsProxyFactoryBean.setPassword(environment
            .getProperty("client.password"));

    return (HelloWorldPortType) jaxWsProxyFactoryBean.create();
}
 
开发者ID:code-not-found,项目名称:jaxws-cxf,代码行数:18,代码来源:CxfClient.java

示例2: testWSAddressing

import org.apache.cxf.jaxws.JaxWsProxyFactoryBean; //导入方法依赖的package包/类
@Test
public void testWSAddressing() throws Exception {
    JaxWsProxyFactoryBean proxyFactory = new  JaxWsProxyFactoryBean();
    ClientFactoryBean clientBean = proxyFactory.getClientFactoryBean();
    clientBean.setAddress(getClientAddress());
    clientBean.setServiceClass(Greeter.class);
    SpringBusFactory bf = new SpringBusFactory();
    URL cxfConfig = null;

    if (getCxfClientConfig() != null) {
        cxfConfig = ClassLoaderUtils.getResource(getCxfClientConfig(), this.getClass());
    }
    proxyFactory.setBus(bf.createBus(cxfConfig));
    Greeter client = (Greeter) proxyFactory.create();
    String result = client.greetMe("world!");
    assertEquals("Get a wrong response", "Hello world!", result);
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:18,代码来源:WSAddressingTest.java

示例3: testWSAddressing

import org.apache.cxf.jaxws.JaxWsProxyFactoryBean; //导入方法依赖的package包/类
@Test
public void testWSAddressing() throws Exception {
    JaxWsProxyFactoryBean proxyFactory = new  JaxWsProxyFactoryBean();
    ClientFactoryBean clientBean = proxyFactory.getClientFactoryBean();
    clientBean.setAddress(getClientAddress());
    clientBean.setServiceClass(HelloWorld.class);
    clientBean.setWsdlURL(WSRMTest.class.getResource("/HelloWorld.wsdl").toString());
    SpringBusFactory bf = new SpringBusFactory();
    URL cxfConfig = null;

    if (getCxfClientConfig() != null) {
        cxfConfig = ClassLoaderUtils.getResource(getCxfClientConfig(), this.getClass());
    }
    proxyFactory.setBus(bf.createBus(cxfConfig));
    proxyFactory.getOutInterceptors().add(new MessageLossSimulator());
    HelloWorld client = (HelloWorld) proxyFactory.create();
    String result = client.sayHi("world!");
    assertEquals("Get a wrong response", "Hello world!", result);
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:20,代码来源:WSRMTest.java

示例4: setup

import org.apache.cxf.jaxws.JaxWsProxyFactoryBean; //导入方法依赖的package包/类
@Before
public void setup() {
	final Bus bus = CXFBusFactory.getThreadDefaultBus();

	JaxWsServerFactoryBean jaxWsServer = createJaxWsServer();
	jaxWsServer.getFeatures().add(new LoggingFeature());
	jaxWsServer.getFeatures().add(new TraceeCxfFeature(serverBackend, Profile.DEFAULT));
	server = jaxWsServer.create();

	JaxWsProxyFactoryBean factoryBean = new JaxWsProxyFactoryBean();

	factoryBean.setServiceClass(HelloWorldTestService.class);
	factoryBean.setAddress(endpointAddress);
	factoryBean.getHandlers().add(new TraceeClientHandler(clientBackend));
	factoryBean.setBus(bus);

	helloWorldPort = factoryBean.create(HelloWorldTestService.class);
}
 
开发者ID:tracee,项目名称:tracee,代码行数:19,代码来源:JaxwsClientToCxfServerIT.java

示例5: setup

import org.apache.cxf.jaxws.JaxWsProxyFactoryBean; //导入方法依赖的package包/类
@Before
public void setup() {

	JaxWsServerFactoryBean jaxWsServer = createJaxWsServer();
	jaxWsServer.getHandlers().add(new TraceeServerHandler(serverBackend, new SoapHeaderTransport()));
	server = jaxWsServer.create();

	JaxWsProxyFactoryBean factoryBean = new JaxWsProxyFactoryBean();

	factoryBean.setServiceClass(HelloWorldTestService.class);
	factoryBean.setAddress(endpointAddress);
	factoryBean.getHandlers().add(new TraceeClientHandler(clientBackend));
	factoryBean.setBus(CXFBusFactory.getDefaultBus());

	helloWorldPort = factoryBean.create(HelloWorldTestService.class);
}
 
开发者ID:tracee,项目名称:tracee,代码行数:17,代码来源:JaxwsClientToJaxwsServerIT.java

示例6: createSoapClient

import org.apache.cxf.jaxws.JaxWsProxyFactoryBean; //导入方法依赖的package包/类
public static DelegatedCredentialPortType createSoapClient(
        String url, KeyStoreType truststore, KeyManagersType keyManager)
        throws GeneralSecurityException, IOException {

    SpringBusFactory bf = new SpringBusFactory();
    Bus bus = bf.createBus();
    Configurer baseConf = bus.getExtension(Configurer.class);
    SSLConfigurer sslConf = new SSLConfigurer(baseConf);
    sslConf.setTruststore(truststore);
    sslConf.setKeystore(keyManager);
    bus.setExtension(sslConf, Configurer.class);

    JaxWsProxyFactoryBean cf = new JaxWsProxyFactoryBean();
    cf.setAddress(url);
    cf.setServiceClass(DelegatedCredentialService.class);
    cf.setBus(bus);
    DelegatedCredentialPortType cdsPort = cf.create(DelegatedCredentialPortType.class);
    return cdsPort;

}
 
开发者ID:NCIP,项目名称:cagrid2,代码行数:21,代码来源:DCSSoapClientFactory.java

示例7: createSoapClient

import org.apache.cxf.jaxws.JaxWsProxyFactoryBean; //导入方法依赖的package包/类
public static CredentialDelegationServicePortType createSoapClient(
        String url, KeyStoreType truststore, KeyManagersType keyManager)
        throws GeneralSecurityException, IOException {
    SpringBusFactory bf = new SpringBusFactory();
    Bus bus = bf.createBus();
    Configurer baseConf = bus.getExtension(Configurer.class);
    SSLConfigurer sslConf = new SSLConfigurer(baseConf);
    sslConf.setTruststore(truststore);
    sslConf.setKeystore(keyManager);
    bus.setExtension(sslConf, Configurer.class);

    JaxWsProxyFactoryBean cf = new JaxWsProxyFactoryBean();
    cf.setAddress(url);
    cf.setServiceClass(CredentialDelegationService.class);
    cf.setBus(bus);
    CredentialDelegationServicePortType cdsPort = cf.create(CredentialDelegationServicePortType.class);
    return cdsPort;
}
 
开发者ID:NCIP,项目名称:cagrid2,代码行数:19,代码来源:CDSSoapClientFactory.java

示例8: createSoapClient

import org.apache.cxf.jaxws.JaxWsProxyFactoryBean; //导入方法依赖的package包/类
public static GlobalModelExchangePortType createSoapClient(String url, KeyStoreType truststore, KeyManagersType keyManager) throws GeneralSecurityException, IOException {
    SpringBusFactory bf = new SpringBusFactory();
    Bus bus = bf.createBus();
    Configurer baseConf = bus.getExtension(Configurer.class);
    org.cagrid.core.common.security.SSLConfigurer sslConf = new org.cagrid.core.common.security.SSLConfigurer(baseConf);
    sslConf.setTruststore(truststore);
    sslConf.setKeystore(keyManager);
    bus.setExtension(sslConf, Configurer.class);

    JaxWsProxyFactoryBean cf = new JaxWsProxyFactoryBean();
    cf.setAddress(url);
    cf.setServiceClass(GlobalModelExchangeService.class);
    cf.setBus(bus);
    GlobalModelExchangePortType gmePort = cf.create(GlobalModelExchangePortType.class);
    return gmePort;
}
 
开发者ID:NCIP,项目名称:cagrid2,代码行数:17,代码来源:GMESoapClientFactory.java

示例9: createSoapClient

import org.apache.cxf.jaxws.JaxWsProxyFactoryBean; //导入方法依赖的package包/类
public static DorianPortType createSoapClient(String url,
                                              KeyStoreType truststore, KeyManagersType keyManager)
        throws GeneralSecurityException, IOException {
    SpringBusFactory bf = new SpringBusFactory();
    Bus bus = bf.createBus();
    Configurer baseConf = bus.getExtension(Configurer.class);
    SSLConfigurer sslConf = new SSLConfigurer(baseConf);
    sslConf.setTruststore(truststore);
    sslConf.setKeystore(keyManager);
    bus.setExtension(sslConf, Configurer.class);

    JaxWsProxyFactoryBean cf = new JaxWsProxyFactoryBean();
    cf.setAddress(url);
    cf.setServiceClass(DorianService.class);
    cf.setBus(bus);
    DorianPortType dorianPort = cf.create(DorianPortType.class);
    return dorianPort;
}
 
开发者ID:NCIP,项目名称:cagrid2,代码行数:19,代码来源:DorianSoapClientFactory.java

示例10: createSoapClient

import org.apache.cxf.jaxws.JaxWsProxyFactoryBean; //导入方法依赖的package包/类
public static GridGrouperPortType createSoapClient(String url,
                                                   KeyStoreType truststore, KeyManagersType keyManager)
        throws GeneralSecurityException, IOException {
    SpringBusFactory bf = new SpringBusFactory();
    Bus bus = bf.createBus();
    Configurer baseConf = bus.getExtension(Configurer.class);
    org.cagrid.core.common.security.SSLConfigurer sslConf = new org.cagrid.core.common.security.SSLConfigurer(baseConf);
    sslConf.setTruststore(truststore);
    sslConf.setKeystore(keyManager);
    bus.setExtension(sslConf, Configurer.class);

    JaxWsProxyFactoryBean cf = new JaxWsProxyFactoryBean();
    cf.setAddress(url);
    cf.setServiceClass(GridGrouperService.class);
    cf.setBus(bus);
    GridGrouperPortType gridGrouperPort = cf.create(GridGrouperPortType.class);
    return gridGrouperPort;
}
 
开发者ID:NCIP,项目名称:cagrid2,代码行数:19,代码来源:GridGrouperSoapClientFactory.java

示例11: createSoapClient

import org.apache.cxf.jaxws.JaxWsProxyFactoryBean; //导入方法依赖的package包/类
public static GTSPortType createSoapClient(String url,
                                           KeyStoreType truststore, KeyManagersType keyManager)
        throws GeneralSecurityException, IOException {

    SpringBusFactory bf = new SpringBusFactory();
    Bus bus = bf.createBus();
    Configurer baseConf = bus.getExtension(Configurer.class);
    SSLConfigurer sslConf = new SSLConfigurer(baseConf);
    sslConf.setTruststore(truststore);
    sslConf.setKeystore(keyManager);
    bus.setExtension(sslConf, Configurer.class);

    JaxWsProxyFactoryBean cf = new JaxWsProxyFactoryBean();
    cf.setAddress(url);
    cf.setServiceClass(GTSService.class);
    cf.setBus(bus);
    GTSPortType gtsPort = cf.create(GTSPortType.class);
    return gtsPort;
}
 
开发者ID:NCIP,项目名称:cagrid2,代码行数:20,代码来源:GTSSoapClientFactory.java

示例12: getSampleWSWithCXFAPI

import org.apache.cxf.jaxws.JaxWsProxyFactoryBean; //导入方法依赖的package包/类
public SampleWS getSampleWSWithCXFAPI(String camelEndpoint) {
    JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
    factory.setAddress("camel://" + camelEndpoint);
    factory.setServiceClass(SampleWS.class);
    factory.setBus(bus);
    return factory.create(SampleWS.class);
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:8,代码来源:JaxWSCamelTestSupport.java

示例13: getSampleWSAsyncWithCXFAPI

import org.apache.cxf.jaxws.JaxWsProxyFactoryBean; //导入方法依赖的package包/类
public SampleWSAsync getSampleWSAsyncWithCXFAPI(String camelEndpoint) {
    JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
    factory.setAddress("camel://" + camelEndpoint);
    factory.setServiceClass(SampleWSAsync.class);
    factory.setBus(bus);
    return factory.create(SampleWSAsync.class);
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:8,代码来源:JaxWSCamelTestSupport.java

示例14: doCreateServiceWithBean

import org.apache.cxf.jaxws.JaxWsProxyFactoryBean; //导入方法依赖的package包/类
private static WinRm doCreateServiceWithBean(Bus bus) {
    JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
    factory.getClientFactoryBean().getServiceFactory().setWsdlURL(WinRmService.WSDL_LOCATION);
    factory.setServiceName(WinRmService.SERVICE);
    factory.setEndpointName(WinRmService.WinRmPort);
    factory.setBus(bus);
    return factory.create(WinRm.class);
}
 
开发者ID:cloudsoft,项目名称:winrm4j,代码行数:9,代码来源:WinRmFactory.java

示例15: helloWorldjaxWsProxyFactoryBean

import org.apache.cxf.jaxws.JaxWsProxyFactoryBean; //导入方法依赖的package包/类
@Bean(name = "helloWorldJaxWsProxyBean")
public HelloWorldPortType helloWorldjaxWsProxyFactoryBean() {
    JaxWsProxyFactoryBean jaxWsProxyFactoryBean = new JaxWsProxyFactoryBean();
    jaxWsProxyFactoryBean.setServiceClass(HelloWorldPortType.class);
    jaxWsProxyFactoryBean.setAddress(environment
            .getProperty("helloworld.address"));
    // set the CXF bus which has the loggingFeature added
    jaxWsProxyFactoryBean.setBus(bus());

    return (HelloWorldPortType) jaxWsProxyFactoryBean.create();
}
 
开发者ID:code-not-found,项目名称:jaxws-cxf,代码行数:12,代码来源:CxfClient.java


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