Examples of LoggingInInterceptor


Examples of org.apache.cxf.interceptor.LoggingInInterceptor

   * @return an instance of the bean
   * @throws Throwable in case of errors
   */
  public Object getBean(Class clazz) throws Throwable {
    try {
      LoggingInInterceptor loggingIn = new LoggingInInterceptor();
      if (loggingInterceptorLevel!=null)
        loggingIn.setLimit(Integer.parseInt(loggingInterceptorLevel));
      LoggingOutInterceptor loggingOut = new LoggingOutInterceptor();
      if (loggingInterceptorLevel!=null)
        loggingOut.setLimit(Integer.parseInt(loggingInterceptorLevel));
      //loggingIn.setPrintWriter(null);
     
View Full Code Here

Examples of org.apache.cxf.interceptor.LoggingInInterceptor

    }

    protected ByteArrayOutputStream setupInLogging() {
        ByteArrayOutputStream bos = new ByteArrayOutputStream();
        PrintWriter writer = new PrintWriter(bos, true);
        LoggingInInterceptor in = new LoggingInInterceptor(writer);
        this.bus.getInInterceptors().add(in);
        return bos;
    }
View Full Code Here

Examples of org.apache.cxf.interceptor.LoggingInInterceptor

        try {
            // writer to grab the content of soap fault.
            // robust is not yet used at client's side, but I think it should
            StringWriter writer = new StringWriter();
            Client client = ClientProxy.getClient(greeter);
            client.getInInterceptors().add(new LoggingInInterceptor());
            ((LoggingInInterceptor)greeterBus.getInInterceptors().get(0)).setPrintWriter(new PrintWriter(writer));
            // it should tell CXF to convert one-way robust out faults into real SoapFaultException
            client.getEndpoint().put(Message.ROBUST_ONEWAY, true);
            greeter.greetMeOneWay("oneway");
            fail("Oneway operation unexpectedly succeded for phase " + location.getPhase());
View Full Code Here

Examples of org.apache.cxf.interceptor.LoggingInInterceptor

    public void setUp() throws Exception {
        StaxUtils.setInnerElementCountThreshold(12);
        StaxUtils.setInnerElementLevelThreshold(12);
        createBus();
        getBus().getOutInterceptors().add(new LoggingOutInterceptor());
        getBus().getInInterceptors().add(new LoggingInInterceptor());
    }
View Full Code Here

Examples of org.apache.cxf.interceptor.LoggingInInterceptor

            Greeter greeter = service.getPort(portName, Greeter.class);
           
            Client client = ClientProxy.getClient(greeter);
            client.getEndpoint().getOutInterceptors().add(new TibcoSoapActionInterceptor());
            client.getOutInterceptors().add(new LoggingOutInterceptor());
            client.getInInterceptors().add(new LoggingInInterceptor());
            EndpointInfo ei = client.getEndpoint().getEndpointInfo();
            AddressType address = ei.getTraversedExtensor(new AddressType(), AddressType.class);
            JMSNamingPropertyType name = new JMSNamingPropertyType();
            JMSNamingPropertyType password = new JMSNamingPropertyType();
            name.setName("java.naming.security.principal");
View Full Code Here

Examples of org.apache.cxf.interceptor.LoggingInInterceptor

public class AbstractWSATestBase extends AbstractBusClientServerTestBase {

    protected ByteArrayOutputStream setupInLogging() {
        ByteArrayOutputStream bos = new ByteArrayOutputStream();
        PrintWriter writer = new PrintWriter(bos, true);
        LoggingInInterceptor in = new LoggingInInterceptor(writer);
        this.bus.getInInterceptors().add(in);
        return bos;
    }
View Full Code Here

Examples of org.apache.cxf.interceptor.LoggingInInterceptor

   
    @Test
    public void testGetBookDescriptionHttpResponse() throws Exception {
        String address = "http://localhost:" + PORT + "/bookstore/httpresponse";
        WebClient wc = WebClient.create(address);
        WebClient.getConfig(wc).getInInterceptors().add(new LoggingInInterceptor());
        Response r = wc.get();
        assertEquals("text/plain", r.getMediaType().toString());
        assertEquals("Good Book", r.readEntity(String.class));
    }
View Full Code Here

Examples of org.apache.cxf.interceptor.LoggingInInterceptor

    @Before
    public void setUp() throws Exception {
        URL wsdl = getClass().getResource("/wsdl/hello_world.wsdl");
        greeter = new SOAPService(wsdl, SERVICE_NAME).getPort(Greeter.class);
        BindingProvider bp = (BindingProvider)greeter;
        ClientProxy.getClient(greeter).getInInterceptors().add(new LoggingInInterceptor());
        ClientProxy.getClient(greeter).getOutInterceptors().add(new LoggingOutInterceptor());
        bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                                   ADDRESS);
        bp.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, "ffang");
        bp.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, "pswd");
View Full Code Here

Examples of org.apache.cxf.interceptor.LoggingInInterceptor

        protected void run()  {
            String configurationFile = "jettyDigestServer.xml";
            URL configure =
                JettyBasicAuthServer.class.getResource(configurationFile);
            Bus bus = new SpringBusFactory().createBus(configure, true);
            bus.getInInterceptors().add(new LoggingInInterceptor());
            bus.getOutInterceptors().add(new LoggingOutInterceptor());
            SpringBusFactory.setDefaultBus(bus);
            setBus(bus);

            GreeterImpl implementor = new GreeterImpl();
View Full Code Here

Examples of org.apache.cxf.interceptor.LoggingInInterceptor

    private EmployeeService service = null;

    public EmployeeServiceClient(String serviceAddress)
    {
        JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
        factory.getInInterceptors().add(new LoggingInInterceptor());
        factory.getOutInterceptors().add(new LoggingOutInterceptor());
        factory.setServiceClass(EmployeeService.class);
        factory.setAddress(serviceAddress);
        this.service = (EmployeeService) factory.create();
    }
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.