cxf.jaxws.out-fault-interceptors = xxxxxx

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2017-03-20 19:00 GMT+01:00 Paul Carter-Brown <
paul.carter-br...@smilecoms.com>:

> Hi Romain,
>
> I had also tried on an ejb-deployment but again I think I got the property
> name wrong. What name would one use for the property to set the
> FaultListener?
>
> Thanks
>
> On 20 March 2017 at 19:30, Romain Manni-Bucau <rmannibu...@gmail.com>
> wrote:
>
> > Hi
> >
> > don't know if that's gmail formatting but the sample you shared doesnt
> > follow the doc page format.
> >
> > Also if your class is in a webapp and not tomee/lib you cant set it on
> the
> > bus and you need to use openejb-jar.xml to set it either on a
> > pojo-deployment or ejb-deployment (depending if it is an EJB or Pojo
> > webservice).
> >
> >
> >
> >
> > Romain Manni-Bucau
> > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > <https://blog-rmannibucau.rhcloud.com> | Old Blog
> > <http://rmannibucau.wordpress.com> | Github <https://github.com/
> > rmannibucau> |
> > LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
> > <https://javaeefactory-rmannibucau.rhcloud.com>
> >
> > 2017-03-20 17:14 GMT+01:00 Paul Carter-Brown <
> > paul.carter-br...@smilecoms.com>:
> >
> > > Hi,
> > >
> > > Currently, my log files are full of warnings from org.apache.cxf.phase.
> > > PhaseInterceptorChain.doDefaultLogging whenever my JAX-WS services
> > return
> > > with a SOAP Fault (even though its an application level fault defined
> in
> > > the WSDL). This means I get stack traces and dirty logs whenever a SOAP
> > > service is called and maybe response with a fault such as "Account does
> > not
> > > exist" etc.
> > >
> > > To get rid of this I am trying to register my own FaultListener (
> > > https://cxf.apache.org/javadoc/latest/org/apache/cxf/
> > > logging/FaultListener.html)
> > >
> > > I followed this : http://tomee.apache.org/developer/configuration/cxf.
> > html
> > > by
> > > adding a line like this to system.properties:
> > >
> > > org.apache.openejb.cxf.bus.org.apache.cxf.logging.
> > > FaultListener=com.smilecoms.commons.base.FaultListener
> > >
> > > Unfortunately, my listener is not being used. It has been packaged in a
> > jar
> > > and placed in tomee/lib
> > >
> > >
> > > Here is the basic listener that should suppress CXF from doing any
> fault
> > > logging itself. I never see the constructor for my FaultListener being
> > > called in my logs and CXF continues to log the stack traces for my
> > faults.
> > >
> > >
> > > package com.smilecoms.commons.base;
> > >
> > > import org.apache.cxf.message.Message;
> > > import org.slf4j.Logger;
> > > import org.slf4j.LoggerFactory;
> > >
> > > public class FaultListener implements org.apache.cxf.logging.
> > FaultListener
> > > {
> > >
> > >     private static final Logger log = LoggerFactory.getLogger(
> > > FaultListener.class);
> > >
> > >     public FaultListener() {
> > >         log.error("Constructor called");
> > >     }
> > >
> > >     @Override
> > >     public boolean faultOccurred(Exception e, String string, Message
> > msg) {
> > >         log.warn("FaultListener for exception: [{}] [{}] [{}]", new
> > > Object[]{e.toString(), string, msg});
> > >         return false;
> > >     }
> > > }
> > >
> > >
> > > What am I doing wrong? What is the correct way to configure the
> > > FaultListener property in TomEE.
> > >
> > > P.S. Running TomEE 7.0.3 Plume
> > >
> > >
> > > Thanks
> > > Paul
> > >
> > > --
> > >
> > >
> > > This email is subject to the disclaimer of Smile Communications at
> > > http://www.smilecoms.com/home/email-disclaimer/ <
> > http://www.smilecoms.com/
> > > disclaimer>
> > >
> > >
> >
>
>
>
> --
>
> *Paul Carter-Brown*
>
> *Group Chief Information Officer*
>
> *Smile Communications Pty (Ltd)       *
> Smile +234 (0) 702 000 1234
> Mobile +27 (0) 83 4427 179
> Skype PaulC-B
> paul.carter-br...@smilecoms.com
> www.smilecoms.com
>
> --
>
>
> This email is subject to the disclaimer of Smile Communications at
> http://www.smilecoms.com/home/email-disclaimer/ <http://www.smilecoms.com/
> disclaimer>
>
>

Reply via email to