Examples of LoggingInInterceptor


Examples of org.apache.cxf.interceptor.LoggingInInterceptor

        JaxWsServerFactoryBean factory = new JaxWsServerFactoryBean();
        factory.setServiceClass(CXF2766.class);
        factory.setServiceBean(new CXF2766Impl());
        factory.setAddress("local://localhost/testcxf2766");
        Server server = factory.create();
        server.getEndpoint().getInInterceptors().add(new LoggingInInterceptor());
        server.getEndpoint().getOutInterceptors().add(new LoggingOutInterceptor());
        Document doc = getWSDLDocument(server);
        //org.apache.cxf.helpers.XMLUtils.printDOM(doc);
        assertValid("//wsdl:message[@name='doReturnResponse']/wsdl:part[@name='returnResponse']", doc);
       
View Full Code Here

Examples of org.apache.cxf.interceptor.LoggingInInterceptor

                                                    (Object)"true"));
        WebClient client = bean.createWebClient();
        HTTPConduit conduit = WebClient.getConfig(client).getHttpConduit();
        conduit.getClient().setReceiveTimeout(1000000);
        conduit.getClient().setConnectionTimeout(1000000);
        WebClient.getConfig(client).getInInterceptors().add(new LoggingInInterceptor());
        WebClient.getConfig(client).getOutInterceptors().add(new LoggingOutInterceptor());
        client.type("multipart/related").accept("multipart/related");
       
        XopType xop = new XopType();
        xop.setName("xopName");
View Full Code Here

Examples of org.apache.cxf.interceptor.LoggingInInterceptor

    }
   
    private Map<String, String> doTestAddBookJaxbJsonImageWebClient(String multipartType) throws Exception {
        String address = "http://localhost:" + PORT + "/bookstore/books/jaxbjsonimage";
        WebClient client = WebClient.create(address);
        WebClient.getConfig(client).getInInterceptors().add(new LoggingInInterceptor());
        client.type(multipartType).accept(multipartType);
      
        Book jaxb = new Book("jaxb", 1L);
        Book json = new Book("json", 2L);
        InputStream is1 =
View Full Code Here

Examples of org.apache.cxf.interceptor.LoggingInInterceptor

   
    public void testUsingAddressing() throws Exception {
      SpringBusFactory bf = new SpringBusFactory();
      bus = bf
          .createBus("/org/apache/servicemix/camel/ws/policy/addr.xml");
        LoggingInInterceptor in = new LoggingInInterceptor();
        bus.getInInterceptors().add(in);
        bus.getInFaultInterceptors().add(in);
        LoggingOutInterceptor out = new LoggingOutInterceptor();
        bus.getOutInterceptors().add(out);
        bus.getOutFaultInterceptors().add(out);
View Full Code Here

Examples of org.apache.cxf.interceptor.LoggingInInterceptor

    public void testDecoupled() throws Exception {
      SpringBusFactory bf = new SpringBusFactory();
        bus = bf.createBus("/org/apache/servicemix/camel/ws/rm/decoupled.xml");
      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);
View Full Code Here

Examples of org.apache.cxf.interceptor.LoggingInInterceptor

        URL wsdl = getClass().getResource("/HelloWorld-DOC.wsdl");
        assertNotNull(wsdl);
        HelloService helloService = new HelloService(wsdl, serviceName);
        HelloPortType port = helloService.getHelloPort();
        Client client = ClientProxy.getClient(port);
        client.getInInterceptors().add(new LoggingInInterceptor());
        HelloRequest req = new HelloRequest();
        req.setText("hello");
        HelloHeader header = new HelloHeader();
        header.setId("ffang");
        HelloResponse rep = port.hello(req, header);
View Full Code Here

Examples of org.apache.cxf.interceptor.LoggingInInterceptor

        factory.setServiceBean(new CalculatorImpl());
        String address = "http://localhost:9001/providertest";
        factory.setAddress(address);
        Server server = factory.create();
        Endpoint endpoint = server.getEndpoint();
        endpoint.getInInterceptors().add(new LoggingInInterceptor());
        endpoint.getOutInterceptors().add(new LoggingOutInterceptor());
        ServiceInfo service = endpoint.getEndpointInfo().getService();
        assertNotNull(service);
        client = new DefaultServiceMixClient(jbi);
        io = client.createInOutExchange();
        io.setService(new QName("http://apache.org/hello_world_soap_http", "SOAPServiceProvider"));
        io.setInterfaceName(new QName("http://apache.org/hello_world_soap_http", "Greeter"));
        io.setOperation(new QName("http://apache.org/hello_world_soap_http", "greetMe"));
        //send message to proxy
        io.getInMessage().setContent(new StringSource(
                "<message xmlns='http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper'>"
              + "<part> "
              + "<greetMe xmlns='http://apache.org/hello_world_soap_http/types'><requestType>"
              + "ffang"
              + "</requestType></greetMe>"
              + "</part> "
              + "</message>"));
        client.sendSync(io);
        assertTrue(new SourceTransformer().contentToString(
                io.getOutMessage()).indexOf("Hello ffang 3") >= 0);

        //test exception handle
        io = client.createInOutExchange();
        io.setService(new QName("http://apache.org/hello_world_soap_http", "SOAPServiceProvider"));
        io.setInterfaceName(new QName("http://apache.org/hello_world_soap_http", "Greeter"));
        io.setOperation(new QName("http://apache.org/hello_world_soap_http", "greetMe"));
        io.getInMessage().setContent(new StringSource(
                "<message xmlns='http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper'>"
              + "<part> "
              + "<greetMe xmlns='http://apache.org/hello_world_soap_http/types'><requestType>"
              + "exception test"
              + "</requestType></greetMe>"
              + "</part> "
              + "</message>"));
        client.sendSync(io);
        assertTrue(new SourceTransformer().contentToString(
                io.getOutMessage()).indexOf("Hello exception test Negative number cant be added!") >= 0);
       
        //test onway
        factory = new JaxWsServerFactoryBean();
        factory.setServiceClass(Greeter.class);
        factory.setServiceBean(new GreeterImpl());
        address = "http://localhost:9002/providertest_oneway";
        factory.setAddress(address);
        server = factory.create();
        endpoint = server.getEndpoint();
        endpoint.getInInterceptors().add(new LoggingInInterceptor());
        endpoint.getOutInterceptors().add(new LoggingOutInterceptor());
        service = endpoint.getEndpointInfo().getService();
        assertNotNull(service);
        io = client.createInOutExchange();
        io.setService(new QName("http://apache.org/hello_world_soap_http", "SOAPServiceProvider"));
View Full Code Here

Examples of org.apache.cxf.interceptor.LoggingInInterceptor

    public void testTimestampSignEncrypt() {
        LOG.info("test security");
        Bus bus = new SpringBusFactory().createBus(
                "org/apache/servicemix/camel/ws/security/client.xml");
        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);
View Full Code Here

Examples of org.apache.cxf.interceptor.LoggingInInterceptor

                "http://apache.org/hello_world_soap_http", "SOAPService"));
        QName endpoint = new QName("http://apache.org/hello_world_soap_http", "SoapPort");
        service1.addPort(endpoint,
                SOAPBinding.SOAP12HTTP_BINDING, "http://localhost:19000/SoapContext/SoapPort");
        Greeter greeter = service1.getPort(endpoint, Greeter.class);
        ClientProxy.getClient(greeter).getInInterceptors().add(new LoggingInInterceptor());
        ClientProxy.getClient(greeter).getOutInterceptors().add(new LoggingOutInterceptor());
        String ret = greeter.sayHi();
        assertEquals(ret, "Bonjour");
        String noSuchCodeFault = "NoSuchCodeLitFault";
        String badRecordFault = "BadRecordLitFault";
View Full Code Here

Examples of org.apache.cxf.interceptor.LoggingInInterceptor

                "http://apache.org/hello_world_soap_http", "SOAPService"));
        QName endpoint = new QName("http://apache.org/hello_world_soap_http", "SoapPort");
        service1.addPort(endpoint,
                SOAPBinding.SOAP12HTTP_BINDING, "http://localhost:19000/SoapContext/SoapPort");
        Greeter greeter = service1.getPort(endpoint, Greeter.class);
        ClientProxy.getClient(greeter).getInInterceptors().add(new LoggingInInterceptor());
        ClientProxy.getClient(greeter).getOutInterceptors().add(new LoggingOutInterceptor());
        greeter.greetMeOneWay("test oneway");
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.