本文整理匯總了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();
}
示例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;
}
示例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;
}
示例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();
}
示例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();
}
示例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();
}
示例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;
}