當前位置: 首頁>>代碼示例>>Java>>正文


Java LoggingOutInterceptor.setPrettyLogging方法代碼示例

本文整理匯總了Java中org.apache.cxf.interceptor.LoggingOutInterceptor.setPrettyLogging方法的典型用法代碼示例。如果您正苦於以下問題:Java LoggingOutInterceptor.setPrettyLogging方法的具體用法?Java LoggingOutInterceptor.setPrettyLogging怎麽用?Java LoggingOutInterceptor.setPrettyLogging使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.apache.cxf.interceptor.LoggingOutInterceptor的用法示例。


在下文中一共展示了LoggingOutInterceptor.setPrettyLogging方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createClientProxy

import org.apache.cxf.interceptor.LoggingOutInterceptor; //導入方法依賴的package包/類
private static HelloWorldPortType createClientProxy() {
    JaxWsProxyFactoryBean jaxWsProxyFactoryBean = new JaxWsProxyFactoryBean();

    // create the loggingInInterceptor and loggingOutInterceptor
    LoggingInInterceptor loggingInInterceptor = new LoggingInInterceptor();
    loggingInInterceptor.setPrettyLogging(true);
    LoggingOutInterceptor loggingOutInterceptor = new LoggingOutInterceptor();
    loggingOutInterceptor.setPrettyLogging(true);

    // add loggingInterceptor to print the received/sent messages
    jaxWsProxyFactoryBean.getInInterceptors().add(loggingInInterceptor);
    jaxWsProxyFactoryBean.getInFaultInterceptors()
            .add(loggingInInterceptor);
    jaxWsProxyFactoryBean.getOutInterceptors().add(loggingOutInterceptor);
    jaxWsProxyFactoryBean.getOutFaultInterceptors()
            .add(loggingOutInterceptor);

    jaxWsProxyFactoryBean.setServiceClass(HelloWorldPortType.class);
    jaxWsProxyFactoryBean.setAddress(ENDPOINT_ADDRESS);

    return (HelloWorldPortType) jaxWsProxyFactoryBean.create();
}
 
開發者ID:code-not-found,項目名稱:jaxws-cxf,代碼行數:23,代碼來源:HelloWorldImplTest.java

示例2: userServiceEndpoint

import org.apache.cxf.interceptor.LoggingOutInterceptor; //導入方法依賴的package包/類
@Bean(name = "helloEndpoint")
public CxfEndpoint userServiceEndpoint() {
    CxfEndpoint cxfEndpoint = new CxfEndpoint();
    cxfEndpoint.setAddress("http://localhost:8888/services/hello");
    cxfEndpoint.setServiceClass(HelloWorld.class);
    LoggingInInterceptor loggingInInterceptor = new LoggingInInterceptor();
    loggingInInterceptor.setPrettyLogging(true);
    LoggingOutInterceptor loggingOutInterceptor = new LoggingOutInterceptor();
    loggingOutInterceptor.setPrettyLogging(true);
    cxfEndpoint.getOutInterceptors().add(loggingOutInterceptor);
    cxfEndpoint.getInInterceptors().add(loggingInInterceptor);
    cxfEndpoint.setDataFormat(DataFormat.POJO);
    final Map<String, Object> properties = new HashMap<>();
    properties.put("schema-validation-enabled", "true");
    properties.put("bus.jmx.enabled", "true");

    //properties.setProperty("faultStackTraceEnabled", "true");
    //properties.setProperty("exceptionMessageCauseEnabled", "true");
    //properties.setProperty("schema-validation-enabled", "false");

    //properties.put("allowStreaming", true);
    cxfEndpoint.configureProperties(properties);
    return cxfEndpoint;
}
 
開發者ID:przodownikR1,項目名稱:cxf_over_jms_kata,代碼行數:25,代碼來源:CamelConfig.java

示例3: getSoapClient

import org.apache.cxf.interceptor.LoggingOutInterceptor; //導入方法依賴的package包/類
private Client getSoapClient(ETP etp) {
		Client cxfClient = ClientProxy.getClient(etp);
		LoggingOutInterceptor loggingOutInterceptor = new LoggingOutInterceptor();
		loggingOutInterceptor.setPrettyLogging(true);
//      Uncomment to log the SOAP message (including the basic authentication headers) - not for production!
//		cxfClient.getOutInterceptors().add(loggingOutInterceptor);
		return cxfClient;
	}
 
開發者ID:mpay24,項目名稱:mpay24-java,代碼行數:9,代碼來源:SoapCommunication.java

示例4: createClientProxy

import org.apache.cxf.interceptor.LoggingOutInterceptor; //導入方法依賴的package包/類
private static HelloWorldPortType createClientProxy() {
  JaxWsProxyFactoryBean jaxWsProxyFactoryBean =
      new JaxWsProxyFactoryBean();

  // create the loggingInInterceptor and loggingOutInterceptor
  LoggingInInterceptor loggingInInterceptor =
      new LoggingInInterceptor();
  loggingInInterceptor.setPrettyLogging(true);
  LoggingOutInterceptor loggingOutInterceptor =
      new LoggingOutInterceptor();
  loggingOutInterceptor.setPrettyLogging(true);

  // add loggingInterceptor to print the received/sent messages
  jaxWsProxyFactoryBean.getInInterceptors()
      .add(loggingInInterceptor);
  jaxWsProxyFactoryBean.getInFaultInterceptors()
      .add(loggingInInterceptor);
  jaxWsProxyFactoryBean.getOutInterceptors()
      .add(loggingOutInterceptor);
  jaxWsProxyFactoryBean.getOutFaultInterceptors()
      .add(loggingOutInterceptor);

  jaxWsProxyFactoryBean.setServiceClass(HelloWorldPortType.class);
  jaxWsProxyFactoryBean.setAddress(ENDPOINT_ADDRESS);

  return (HelloWorldPortType) jaxWsProxyFactoryBean.create();
}
 
開發者ID:code-not-found,項目名稱:cxf-jaxws,代碼行數:28,代碼來源:HelloWorldImplTest.java

示例5: setUpBeforeClass

import org.apache.cxf.interceptor.LoggingOutInterceptor; //導入方法依賴的package包/類
@BeforeClass
public static void setUpBeforeClass() throws Exception {

    // start the HelloWorld service using jaxWsServerFactoryBean
    JaxWsServerFactoryBean jaxWsServerFactoryBean = new JaxWsServerFactoryBean();

    // add logging interceptors to print the received/sent messages
    LoggingOutInterceptor loggingOutInterceptor = new LoggingOutInterceptor();
    loggingOutInterceptor.setPrettyLogging(true);
    LoggingInInterceptor loggingInInterceptor = new LoggingInInterceptor();
    loggingInInterceptor.setPrettyLogging(true);

    jaxWsServerFactoryBean.getOutInterceptors().add(
            loggingOutInterceptor);
    jaxWsServerFactoryBean.getInInterceptors().add(
            loggingInInterceptor);

    // add JAASLoginInterceptor to enable authentication
    GZIPOutInterceptor gZIPOutInterceptor = new GZIPOutInterceptor();
    GZIPInInterceptor gZIPInInterceptor = new GZIPInInterceptor();

    jaxWsServerFactoryBean.getOutInterceptors().add(
            gZIPOutInterceptor);
    jaxWsServerFactoryBean.getInInterceptors().add(
            gZIPInInterceptor);

    // set the implementation
    HelloWorldImpl implementor = new HelloWorldImpl();
    jaxWsServerFactoryBean.setServiceBean(implementor);

    // set the endpoint
    jaxWsServerFactoryBean.setAddress(ENDPOINT_ADDRESS);
    jaxWsServerFactoryBean.create();
}
 
開發者ID:source4code,項目名稱:repo,代碼行數:35,代碼來源:HelloWorldImplTest.java

示例6: setUpBeforeClass

import org.apache.cxf.interceptor.LoggingOutInterceptor; //導入方法依賴的package包/類
@BeforeClass
public static void setUpBeforeClass() throws Exception {

    // set the location of the jaas-login.conf
    Properties properties = System.getProperties();
    properties.setProperty("java.security.auth.login.config",
            "./src/test/resources/jaas-login.conf");

    // start the HelloWorld service using jaxWsServerFactoryBean
    JaxWsServerFactoryBean jaxWsServerFactoryBean = new JaxWsServerFactoryBean();

    // add logging interceptors to print the received/sent messages
    LoggingInInterceptor loggingInInterceptor = new LoggingInInterceptor();
    loggingInInterceptor.setPrettyLogging(true);
    LoggingOutInterceptor loggingOutInterceptor = new LoggingOutInterceptor();
    loggingOutInterceptor.setPrettyLogging(true);

    jaxWsServerFactoryBean.getInInterceptors().add(loggingInInterceptor);
    jaxWsServerFactoryBean.getOutInterceptors().add(loggingOutInterceptor);

    // add JAASLoginInterceptor to enable authentication
    JAASLoginInterceptor jaasLoginInterceptor = new JAASLoginInterceptor();
    jaasLoginInterceptor.setContextName("jaasContext");
    jaxWsServerFactoryBean.getInInterceptors().add(jaasLoginInterceptor);

    // set the implementation
    HelloWorldImpl implementor = new HelloWorldImpl();
    jaxWsServerFactoryBean.setServiceBean(implementor);

    // set the endpoint
    jaxWsServerFactoryBean.setAddress(ENDPOINT_ADDRESS);
    jaxWsServerFactoryBean.create();
}
 
開發者ID:source4code,項目名稱:repo,代碼行數:34,代碼來源:HelloWorldImplTest.java

示例7: getLogOutInterceptors

import org.apache.cxf.interceptor.LoggingOutInterceptor; //導入方法依賴的package包/類
public List<Interceptor<? extends Message>> getLogOutInterceptors() {
    List<Interceptor<? extends Message>> outInterceptors = new ArrayList<Interceptor<? extends Message>>();
    if (config.isCxfDebug()) {
        LoggingOutInterceptor loggingOutInterceptor = new LoggingOutInterceptor();
        loggingOutInterceptor.setPrettyLogging(true);

        outInterceptors.add(loggingOutInterceptor);
    }

    return outInterceptors;
}
 
開發者ID:garethahealy,項目名稱:jboss-fuse-examples,代碼行數:12,代碼來源:LoggingWsEndpointDecorator.java


注:本文中的org.apache.cxf.interceptor.LoggingOutInterceptor.setPrettyLogging方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。