Package org.apache.cxf.interceptor

Examples of org.apache.cxf.interceptor.LoggingOutInterceptor


            Bus bus = bf.createBus("/org/apache/cxf/systest/ws/rm/persistent.xml");
            BusFactory.setDefaultBus(bus);
           
            LoggingInInterceptor logIn = new LoggingInInterceptor();
            bus.getInInterceptors().add(logIn);
            LoggingOutInterceptor logOut = new LoggingOutInterceptor();
            bus.getOutFaultInterceptors().add(logOut);
            bus.getOutFaultInterceptors().add(logOut);
           
            bus.getExtension(RMManager.class).getRMAssertion().getBaseRetransmissionInterval()
                .setMilliseconds(new BigInteger("60000"));
View Full Code Here


            SpringBusFactory bf = new SpringBusFactory();
            Bus bus = bf.createBus("org/apache/cxf/systest/ws/policy/rm.xml");
            BusFactory.setDefaultBus(bus);
            LoggingInInterceptor in = new LoggingInInterceptor();
            bus.getInInterceptors().add(in);
            LoggingOutInterceptor out = new LoggingOutInterceptor();
            bus.getOutInterceptors().add(out);
            bus.getOutFaultInterceptors().add(out);
           
            GreeterImpl implementor = new GreeterImpl();
            String address = "http://localhost:" + PORT + "/SoapContext/GreeterPort";
View Full Code Here

        Service service = server.getEndpoint().getService();
       
        service.getInInterceptors().add(new SAAJInInterceptor());
        service.getInInterceptors().add(new LoggingInInterceptor());
        service.getOutInterceptors().add(new SAAJOutInterceptor());
        service.getOutInterceptors().add(new LoggingOutInterceptor());

        wsIn = new SimpleSubjectCreatingInterceptor();
        wsIn.setSupportDigestPasswords(digest);
        wsIn.setProperty(WSHandlerConstants.SIG_PROP_FILE, "META-INF/cxf/insecurity.properties");
        wsIn.setProperty(WSHandlerConstants.DEC_PROP_FILE, "META-INF/cxf/insecurity.properties");
        wsIn.setProperty(WSHandlerConstants.PW_CALLBACK_CLASS, TestPwdCallback.class.getName());
       
        service.getInInterceptors().add(wsIn);
        
        SimpleAuthorizingInterceptor sai = new SimpleAuthorizingInterceptor();
        sai.setMethodRolesMap(Collections.singletonMap("echo", expectedRoles));
        service.getInInterceptors().add(sai);
       
       
        wsOut = new WSS4JOutInterceptor();
        wsOut.setProperty(WSHandlerConstants.SIG_PROP_FILE, "META-INF/cxf/outsecurity.properties");
        wsOut.setProperty(WSHandlerConstants.ENC_PROP_FILE, "META-INF/cxf/outsecurity.properties");
        wsOut.setProperty(WSHandlerConstants.USER, "myalias");
        if (digest) {
            wsOut.setProperty("password", "myAliasPassword");
        } else {
            wsOut.setProperty(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_TEXT);
        }
       
        if (encryptUsernameTokenOnly) {
            wsOut.setProperty(WSHandlerConstants.ENCRYPTION_USER, "myalias");
            wsOut.setProperty(
                WSHandlerConstants.ENCRYPTION_PARTS,
                "{Content}{" + WSConstants.WSSE_NS + "}UsernameToken"
            );
        }
        wsOut.setProperty(WSHandlerConstants.PW_CALLBACK_CLASS, TestPwdCallback.class.getName());
        service.getOutInterceptors().add(wsOut);

        // Create the client
        JaxWsProxyFactoryBean proxyFac = new JaxWsProxyFactoryBean();
        proxyFac.setServiceClass(Echo.class);
        proxyFac.setAddress("local://Echo");
        proxyFac.getClientFactoryBean().setTransportId(LocalTransportFactory.TRANSPORT_ID);
       
        echo = (Echo)proxyFac.create();

        ((BindingProvider)echo).getRequestContext().put(LocalConduit.DIRECT_DISPATCH, Boolean.TRUE);

       
        client = ClientProxy.getClient(echo);
       
        client.getInInterceptors().add(new LoggingInInterceptor());
        client.getInInterceptors().add(wsIn);
        client.getInInterceptors().add(new SAAJInInterceptor());
        client.getOutInterceptors().add(new LoggingOutInterceptor());
        client.getOutInterceptors().add(wsOut);
        client.getOutInterceptors().add(new SAAJOutInterceptor());
    }
View Full Code Here

       
        SOAPService ss = new SOAPService(wsdl, SERVICE_NAME);
        Greeter port = ss.getSoapPort();
        String resp;
        ClientProxy.getClient(port).getInInterceptors().add(new LoggingInInterceptor());
        ClientProxy.getClient(port).getOutInterceptors().add(new LoggingOutInterceptor());
        resp = port.sayHi();
        assertEquals("We should get the right response", "Bonjour", resp);       
       
        resp = port.greetMe("Willem");
        assertEquals("We should get the right response", "Hello Willem", resp);
View Full Code Here

        QName soapPort = new QName("http://apache.org/hello_world_soap_http/xmlbeans", "SoapPort");
        ss.addPort(soapPort, SOAPBinding.SOAP11HTTP_BINDING, "http://localhost:9010/SoapContext/SoapPort");
        Greeter port = ss.getPort(soapPort, Greeter.class);
        String resp;
        ClientProxy.getClient(port).getInInterceptors().add(new LoggingInInterceptor());
        ClientProxy.getClient(port).getOutInterceptors().add(new LoggingOutInterceptor());
        resp = port.sayHi();
        assertEquals("We should get the right response", resp, "Bonjour");       
       
        resp = port.greetMe("Willem");
        assertEquals("We should get the right response", resp, "Hello Willem");
View Full Code Here

            //jaxwsEndpoint.getBinding().getInInterceptors().add(new TestMultipartMessageInterceptor());
            jaxwsEndpoint.getBinding().getOutInterceptors().add(new TestAttachmentOutInterceptor());
        }
       
        jaxwsEndpoint.getBinding().getInInterceptors().add(new LoggingInInterceptor());
        jaxwsEndpoint.getBinding().getOutInterceptors().add(new LoggingOutInterceptor());

        Client client = new ClientImpl(bus, jaxwsEndpoint);
        InvocationHandler ih = new JaxWsClientProxy(client, jaxwsEndpoint.getJaxwsBinding());
        Object obj = Proxy
            .newProxyInstance(serviceEndpointInterface.getClassLoader(),
View Full Code Here

        assertTrue("server did not launch correctly", launchServer(Server.class));
    }
   
    @org.junit.Before
    public void setUp() {
        BusFactory.getDefaultBus().getOutInterceptors().add(new LoggingOutInterceptor());
        BusFactory.getDefaultBus().getInInterceptors().add(new LoggingInInterceptor());
    }
View Full Code Here

        assertTrue("server did not launch correctly", launchServer(Server.class));
    }
   
    @org.junit.Before
    public void setUp() {
        BusFactory.getDefaultBus().getOutInterceptors().add(new LoggingOutInterceptor());
        BusFactory.getDefaultBus().getInInterceptors().add(new LoggingInInterceptor());
    }
View Full Code Here

        BusFactory.setDefaultBus(bus);
       
        LoggingInInterceptor in = new LoggingInInterceptor();
        bus.getInInterceptors().add(in);
        bus.getInFaultInterceptors().add(in);
        LoggingOutInterceptor out = new LoggingOutInterceptor();
        bus.getOutInterceptors().add(out);
        bus.getOutFaultInterceptors().add(out);
     
        // use a client wsdl with policies attached to endpoint, operation and message subjects
       
View Full Code Here

            SpringBusFactory bf = new SpringBusFactory();
            Bus bus = bf.createBus();
           
            BusFactory.setDefaultBus(bus);
            LoggingInInterceptor in = new LoggingInInterceptor();
            LoggingOutInterceptor out = new LoggingOutInterceptor();          
            bus.getInInterceptors().add(in);
            bus.getOutInterceptors().add(out);                   
            bus.getOutFaultInterceptors().add(out);
           
            HttpGreeterImpl implementor = new HttpGreeterImpl();
View Full Code Here

TOP

Related Classes of org.apache.cxf.interceptor.LoggingOutInterceptor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.