You can configure it on the bus as well. Via Spring:
<cxf:bus>
<cxf:features>
<cxf:logging/>
</cxf:features>
</cxf:bus>
or you can get the Bus object and do the bus.getInInterceptors().add(...)
calls to add the interceptors manually.
Those interceptors would apply to all the clients and services that the
bus hosts.
Dan
On Friday 24 August 2007, Jacob Marcus wrote:
> Hi,
>
> I have a related question.
>
> Suppose, you have a lot of end points and you want to perform a common
> logging/auditing across all of them. Is there a way you can intercept
> at a higher level than for each service? Something like at the
> ServletDestination level?
>
> This would be useful and a bit more easier than having to set up
> interceptors for each end point?
>
> Thanks,
> Jacob
>
> On 8/24/07, Freeman Fang <[EMAIL PROTECTED]> wrote:
> > Hi Holger,
> >
> > Actually we have LoggingInInterceptor and LoggingOutInterceptor for
> > that purpose.
> > You can add it two your endpoint on server side
> > EndpointImpl e = (EndpointImpl)Endpoint.publish(address,
> > implementor);
> > e.getServer().getEndpoint().getInInterceptors().add(new
> > LoggingInInterceptor());
> > e.getServer().getEndpoint().getOutInterceptors().add(new
> > LoggingOutInterceptor());
> >
> > For client side, you can do it like
> > HelloPortType port = helloService.getHelloPort();
> > Client client = ClientProxy.getClient(port);
> > client.getInInterceptors().add(new LoggingInInterceptor());
> > client.getInOutterceptors().add(new LoggingOutInterceptor());
> >
> > Also you can configure log features in spring file, you can refer to
> >
> > https://svn.apache.org/repos/asf/incubator/cxf/trunk/distribution/sr
> >c/main/release/samples/wsdl_first/wsdl/cxf-servlet.xml
> >
> > Best Regards
> >
> > Freeman
> >
> > Holger Stolzenberg wrote:
> > > What is the easiest way to log the received and generated SOAP
> > > messages.
> >
> > Currently I have an incoming/outgoing interceptor with phases
> > receive/send that simply log some properties of the SoapMessage
> > interceptor method param. What I want to log is the raw message data
> > (<soap:envelope> ... </soap:envelope>).
> >
> > > Mit lieben Grüßen aus dem eWerk
> > >
> > > | Holger Stolzenberg
> > > | Softwareentwickler
> > > |
> > > | Geschäftsführer:
> > > | Frank Richter, Erik Wende, Hendrik Schubert
> > > |
> > > | eWerk IT GmbH
> > > | Markt 16
> > > | Leipzig 04109
> > > | http://www.ewerk.com
> > > | HRB 9065, AG Leipzig
> > > | Hauptniederlassung Leipzig
> > > |
> > > | fon +49.341.4 26 49-0
> > > | fax +49.341.4 26 49-88
> > > | mailto:[EMAIL PROTECTED]
> > > |
> > > | Support:
> > > | fon 0700 CALLME24 (0700 22556324)
> > > | fax 0700 CALLME24 (0700 22556324)
> > > |
> > > | Auskünfte und Angebote per Mail
> > > | sind freibleibend und unverbindlich.
--
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727 C: 508-380-7194
[EMAIL PROTECTED]
http://www.dankulp.com/blog