如何打印SOAP请求消息?
答
你刚才NEDD添加LoggingInterceptor:看cxf documentation
Object implementor = new GreeterImpl();
EndpointImpl ep = (EndpointImpl) Endpoint.publish("http://localhost/service", implementor);
ep.getServer().getEndpoint().getInInterceptors().add(new LoggingInInterceptor());
ep.getServer().getEndpoint().getOutInterceptors().add(new LoggingOutInterceptor())
或者,如果您使用Springframework
<bean id="quickFactory" class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
<property name="serviceClass" value="com.misc.PortType"/>
<property name="address" value="${service.url}"/>
<property name="inInterceptors">
<bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
</property>
<property name="outInterceptors">
<bean class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
</property>
</bean>
是在SOAPMessage对象的消息? – Kishore 2013-04-23 11:37:27