Search in sources :

Example 16 with WSAddressingFeature

use of org.apache.cxf.ws.addressing.WSAddressingFeature in project cxf by apache.

the class WSAFeatureTest method testServerFactory.

@Test
public void testServerFactory() {
    JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean();
    sf.getFeatures().add(new WSAddressingFeature());
    sf.setServiceBean(new GreeterImpl());
    sf.setAddress("http://localhost:" + PORT + "/test");
    sf.setStart(false);
    sf.setBus(getBus());
    Server server = sf.create();
    Endpoint endpoint = server.getEndpoint();
    checkAddressInterceptors(endpoint.getInInterceptors());
}
Also used : WSAddressingFeature(org.apache.cxf.ws.addressing.WSAddressingFeature) Server(org.apache.cxf.endpoint.Server) Endpoint(org.apache.cxf.endpoint.Endpoint) GreeterImpl(org.apache.hello_world_soap_http.GreeterImpl) JaxWsServerFactoryBean(org.apache.cxf.jaxws.JaxWsServerFactoryBean) Test(org.junit.Test) AbstractCXFTest(org.apache.cxf.test.AbstractCXFTest)

Example 17 with WSAddressingFeature

use of org.apache.cxf.ws.addressing.WSAddressingFeature in project cxf by apache.

the class WSAFeatureTest method testClientProxyFactory.

@Test
public void testClientProxyFactory() {
    JaxWsProxyFactoryBean cf = new JaxWsProxyFactoryBean();
    cf.setAddress("http://localhost:" + PORT + "/test");
    cf.getFeatures().add(new WSAddressingFeature());
    cf.setServiceClass(Greeter.class);
    Greeter greeter = (Greeter) cf.create();
    Client client = ClientProxy.getClient(greeter);
    checkAddressInterceptors(client.getInInterceptors());
}
Also used : WSAddressingFeature(org.apache.cxf.ws.addressing.WSAddressingFeature) Greeter(org.apache.hello_world_soap_http.Greeter) JaxWsProxyFactoryBean(org.apache.cxf.jaxws.JaxWsProxyFactoryBean) Client(org.apache.cxf.endpoint.Client) Test(org.junit.Test) AbstractCXFTest(org.apache.cxf.test.AbstractCXFTest)

Aggregations

WSAddressingFeature (org.apache.cxf.ws.addressing.WSAddressingFeature)17 Test (org.junit.Test)8 EndpointImpl (org.apache.cxf.jaxws.EndpointImpl)3 IOException (java.io.IOException)2 QName (javax.xml.namespace.QName)2 BusException (org.apache.cxf.BusException)2 Client (org.apache.cxf.endpoint.Client)2 Endpoint (org.apache.cxf.endpoint.Endpoint)2 Server (org.apache.cxf.endpoint.Server)2 JaxWsProxyFactoryBean (org.apache.cxf.jaxws.JaxWsProxyFactoryBean)2 JaxWsServiceFactoryBean (org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean)2 BeanInvoker (org.apache.cxf.service.invoker.BeanInvoker)2 BindingOperationInfo (org.apache.cxf.service.model.BindingOperationInfo)2 AbstractCXFTest (org.apache.cxf.test.AbstractCXFTest)2 Conduit (org.apache.cxf.transport.Conduit)2 EndpointReferenceType (org.apache.cxf.ws.addressing.EndpointReferenceType)2 GreeterImpl (org.apache.hello_world_soap_http.GreeterImpl)2 ByteArrayInputStream (java.io.ByteArrayInputStream)1 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 HashMap (java.util.HashMap)1