Hi Freeman,
I use java code to publish the cxf endpoint. In spring configuration, I only
put the following in.
<httpj:engine-factory bus="cxf">
<httpj:engine port="8080">
<httpj:sessionSupport>true</httpj:sessionSupport>
</httpj:engine>
</httpj:engine-factory>
In java code, I publish the endpoint like this.
MyServiceImpl implementor = new MyServiceImpl();
endpt = Endpoint.create(implementor);
endpt.publish("http://localhost:8080/axis/services/MyService");
Thanks,
Hao
-----Original Message-----
From: Freeman Fang [mailto:[email protected]]
Sent: Wednesday, June 08, 2011 8:42 PM
To: [email protected]
Subject: Re: Soap messages in SMX log
Hi,
Could you elaborate how you publish cxf endpoint with spring
configuration logging way?
You use java code or also use spring to publish the cxf endpoint?
Freeman
On 2011-6-9, at 上午3:01, Hao Ding wrote:
> 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
>
---------------------------------------------
Freeman Fang
FuseSource
Email:[email protected]
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com