本文整理汇总了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();
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
示例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);
}
示例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);
}
示例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();
}