Search in sources :

Example 16 with JaxWsProxyFactoryBean

use of org.apache.cxf.jaxws.JaxWsProxyFactoryBean in project survey by markoniemi.

the class ServiceTestConfig method getUserService.

@Bean(name = "userService")
public Object getUserService() {
    JaxWsProxyFactoryBean proxyFactory = new JaxWsProxyFactoryBean();
    proxyFactory.setServiceClass(UserService.class);
    proxyFactory.setAddress(baseAddress + "userService");
    return proxyFactory.create();
}
Also used : JaxWsProxyFactoryBean(org.apache.cxf.jaxws.JaxWsProxyFactoryBean) JaxWsProxyFactoryBean(org.apache.cxf.jaxws.JaxWsProxyFactoryBean) Bean(org.springframework.context.annotation.Bean)

Example 17 with JaxWsProxyFactoryBean

use of org.apache.cxf.jaxws.JaxWsProxyFactoryBean in project qi4j-sdk by Qi4j.

the class HelloClient method main.

public static void main(String[] args) {
    JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
    factory.getInInterceptors().add(new LoggingInInterceptor());
    factory.getOutInterceptors().add(new LoggingOutInterceptor());
    factory.setServiceClass(HelloWorld.class);
    factory.setAddress("http://localhost:9001/helloWorld");
    HelloWorld client = (HelloWorld) factory.create();
    String reply = client.sayHi("World");
    System.out.println("Server said: " + reply);
}
Also used : LoggingOutInterceptor(org.apache.cxf.interceptor.LoggingOutInterceptor) JaxWsProxyFactoryBean(org.apache.cxf.jaxws.JaxWsProxyFactoryBean) LoggingInInterceptor(org.apache.cxf.interceptor.LoggingInInterceptor)

Example 18 with JaxWsProxyFactoryBean

use of org.apache.cxf.jaxws.JaxWsProxyFactoryBean in project cxf by apache.

the class HttpServiceTest method greeterHttpProxy.

private Greeter greeterHttpProxy(String port) {
    JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
    factory.setServiceClass(Greeter.class);
    factory.setAddress("http://localhost:" + port + "/cxf/greeter");
    return factory.create(Greeter.class);
}
Also used : JaxWsProxyFactoryBean(org.apache.cxf.jaxws.JaxWsProxyFactoryBean)

Example 19 with JaxWsProxyFactoryBean

use of org.apache.cxf.jaxws.JaxWsProxyFactoryBean in project cxf by apache.

the class JmsServiceTest method greeterJms.

private static Greeter greeterJms() {
    JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
    factory.setServiceClass(Greeter.class);
    factory.setAddress("jms:queue:greeter");
    ConnectionFactory connectionFactory = createConnectionFactory();
    factory.setFeatures(Collections.singletonList(new ConnectionFactoryFeature(connectionFactory)));
    return factory.create(Greeter.class);
}
Also used : ActiveMQConnectionFactory(org.apache.activemq.ActiveMQConnectionFactory) ConnectionFactory(javax.jms.ConnectionFactory) ConnectionFactoryFeature(org.apache.cxf.transport.jms.ConnectionFactoryFeature) JaxWsProxyFactoryBean(org.apache.cxf.jaxws.JaxWsProxyFactoryBean)

Example 20 with JaxWsProxyFactoryBean

use of org.apache.cxf.jaxws.JaxWsProxyFactoryBean in project cxf by apache.

the class ClientJMS method createClientCxf.

private static HelloWorld createClientCxf() {
    JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
    factory.setTransportId(JMSSpecConstants.SOAP_JMS_SPECIFICATION_TRANSPORTID);
    factory.setAddress(JMS_ENDPOINT_URI);
    return factory.create(HelloWorld.class);
}
Also used : JaxWsProxyFactoryBean(org.apache.cxf.jaxws.JaxWsProxyFactoryBean)

Aggregations

JaxWsProxyFactoryBean (org.apache.cxf.jaxws.JaxWsProxyFactoryBean)152 Test (org.junit.Test)71 LoggingOutInterceptor (org.apache.cxf.ext.logging.LoggingOutInterceptor)21 LoggingInInterceptor (org.apache.cxf.ext.logging.LoggingInInterceptor)19 AegisDatabinding (org.apache.cxf.aegis.databinding.AegisDatabinding)14 Greeter (org.apache.hello_world_soap_http.Greeter)14 Client (org.apache.cxf.endpoint.Client)13 HashMap (java.util.HashMap)10 JaxWsServerFactoryBean (org.apache.cxf.jaxws.JaxWsServerFactoryBean)9 QName (javax.xml.namespace.QName)8 WrappedGreeter (org.apache.hello_world_soap_action.WrappedGreeter)8 BookStoreService (org.apache.cxf.systest.jaxws.tracing.BookStoreService)7 ArrayList (java.util.ArrayList)6 ClientFactoryBean (org.apache.cxf.frontend.ClientFactoryBean)6 Holder (javax.xml.ws.Holder)5 Server (org.apache.cxf.endpoint.Server)5 Greeter (org.apache.cxf.greeter_control.Greeter)5 Service (org.apache.cxf.service.Service)5 HTTPConduit (org.apache.cxf.transport.http.HTTPConduit)5 Metadata (org.apache.cxf.ws.mex.model._2004_09.Metadata)5