问题描述
我在网上查看如何查看我客户端和服务端往来的soap消息?不用工具,我想查看具体消息soap.我在网上零星看到有用拦截器的,但是我也加上了,还是不能在控制台看到soap.看看我哪里错了,说明一下webservice从客户端已经成功调用了服务端的接口。贴代码客户端的配置文件<importresource="classpath:META-INF/cxf/cxf.xml"/><importresource="classpath:META-INF/cxf/cxf-servlet.xml"/><importresource="classpath:META-INF/cxf/cxf-extension-soap.xml"/><beanid="iMI"class="org.apache.cxf.interceptor.LoggingInInterceptor"/><beanid="oMI"class="org.apache.cxf.interceptor.LoggingOutInterceptor"/><jaxws:clientid="clienttest"serviceClass="org.qin.ying.lian.ws.service.HelloWorld"address="http://localhost:8080/LearnCXF/services/helloWorld"><jaxws:inInterceptors><refbean="iMI"/></jaxws:inInterceptors><jaxws:outInterceptors><refbean="oMI"/></jaxws:outInterceptors></jaxws:client>------------------------------------------测试用例ApplicationContextcontext=newClassPathXmlApplicationContext("applicationContext-cxf-client.xml");HelloWorldclient=(HelloWorld)context.getBean("clienttest",HelloWorld.class);System.out.println(client.sayHi("test"));//JaxWsProxyFactoryBeanfactory=newJaxWsProxyFactoryBean();////factory.setServiceClass(HelloWorld.class);//factory.setAddress("http://localhost:8080/LearnCXF/services/helloWorld");////factory.getInInterceptors().add(newLoggingInInterceptor());////HelloWorldhw=(HelloWorld)factory.create();//System.out.println(hw.sayHi("test"));////factory.getOutInterceptors().add(newLoggingOutInterceptor());//已经成功调用了,但是控制台为什么看不到soap??知道请回答,是不是跟Log4j有关??
解决方案
解决方案二:
请说的详细些,谢谢