By the way, I have the followings in the spring config file as well. Maybe
they have the effect on soap logging?
<import resource="classpath:META-INF/cxf/cxf.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-http-jetty.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-http-binding.xml" />

-----Original Message-----
From: Hao Ding [mailto:[email protected]] 
Sent: Wednesday, June 08, 2011 2:49 PM
To: [email protected]
Subject: Soap messages in SMX log

Hi SMX users,

I'd like to see the soap messages in SMX logs. Based on the Apache CXF docs,
I put the following in the spring config files.

xmlns:cxf="http://cxf.apache.org/core";
      xsi:schemaLocation="
http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd";>

    <bean id="logInbound"
class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
  <bean id="logOutbound"
class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
  
  <cxf:bus>
        <cxf:inInterceptors>
            <ref bean="logInbound"/>
        </cxf:inInterceptors>
        <cxf:outInterceptors>
            <ref bean="logOutbound"/>
        </cxf:outInterceptors>        
    </cxf:bus>

Then I compiled and run SMX, do the curl test, I did not see the soap
messages in the logs.

If using java code to do the configuration, like

import javax.xml.ws.Endpoint;
import org.apache.cxf.interceptor.LoggingInInterceptor;
import org.apache.cxf.interceptor.LoggingOutInterceptor;
import org.apache.cxf.jaxws.EndpointImpl;

Object implementor = new GreeterImpl();
EndpointImpl ep = (EndpointImpl)
Endpoint.publish("http://localhost/service";, implementor);

ep.getServiceFactory().getBus().getInInterceptors().add(new
LoggingInInterceptor());
ep.getServiceFactory().getBus().getOutInterceptors().add(new
LoggingOutInterceptor());

Then I can see the soap messages in the logs.

I'd like to know what can cause the spring configuration not taking effect.


Thanks,
Hao

Reply via email to