use of org.apache.cxf.jaxws.JaxWsProxyFactoryBean in project cxf by apache.
the class JAXWSAsyncClientTest method testAsyncClient.
@Test
public void testAsyncClient() throws Exception {
// setup the feature by using JAXWS front-end API
JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
factory.setAddress("http://localhost:" + PORT + "/SoapContext/GreeterPort");
factory.setServiceClass(Greeter.class);
Greeter proxy = factory.create(Greeter.class);
Response<GreetMeResponse> response = proxy.greetMeAsync("cxf");
int waitCount = 0;
while (!response.isDone() && waitCount < 15) {
Thread.sleep(1000);
waitCount++;
}
assertTrue("Response still not received.", response.isDone());
}
use of org.apache.cxf.jaxws.JaxWsProxyFactoryBean in project nutzboot by nutzam.
the class CxfClientLauncher method init.
public void init() {
JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
factory.setServiceClass(TimeService.class);
factory.setAddress("http://127.0.0.1:8081/webservice/TimeService");
timeService = (TimeService) factory.create();
}
use of org.apache.cxf.jaxws.JaxWsProxyFactoryBean in project camel by apache.
the class ReportIncidentRoutesTest method createCXFClient.
protected static ReportIncidentEndpoint createCXFClient() {
// we use CXF to create a client for us as its easier than JAXWS and works
JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
factory.setServiceClass(ReportIncidentEndpoint.class);
factory.setAddress(url);
return (ReportIncidentEndpoint) factory.create();
}
use of org.apache.cxf.jaxws.JaxWsProxyFactoryBean in project camel by apache.
the class CreditScoreProcessor method getProxy.
private CreditAgencyWS getProxy() {
// Here we use JaxWs front end to create the proxy
JaxWsProxyFactoryBean proxyFactory = new JaxWsProxyFactoryBean();
ClientFactoryBean clientBean = proxyFactory.getClientFactoryBean();
clientBean.setAddress(creditAgencyAddress);
clientBean.setServiceClass(CreditAgencyWS.class);
clientBean.setBus(BusFactory.getDefaultBus());
return (CreditAgencyWS) proxyFactory.create();
}
use of org.apache.cxf.jaxws.JaxWsProxyFactoryBean in project camel by apache.
the class ReportIncidentRoutesClientTest method createCXFClient.
protected static ReportIncidentEndpoint createCXFClient(String url) {
// we use CXF to create a client for us as its easier than JAXWS and works
JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
factory.setServiceClass(ReportIncidentEndpoint.class);
factory.setAddress(url);
return (ReportIncidentEndpoint) factory.create();
}
Aggregations