Re: Configuring CXF FaultListener in TomEE

2017-03-20 Thread Romain Manni-Bucau
you just need to set your faultlistener in the cxf Message, this is easily
done through an interceptor.


Romain Manni-Bucau
@rmannibucau  |  Blog
 | Old Blog
 | Github  |
LinkedIn  | JavaEE Factory


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

> Is that not for an interceptor? This is a FaultListener
>
> On 20 March 2017 at 20:28, Romain Manni-Bucau 
> wrote:
>
> > cxf.jaxws.out-fault-interceptors = xx
> >
> >
> > Romain Manni-Bucau
> > @rmannibucau  |  Blog
> >  | Old Blog
> >  | Github  > rmannibucau> |
> > LinkedIn  | JavaEE Factory
> > 
> >
> > 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 
> > > 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  |  Blog
> > > >  | Old Blog
> > > >  | Github  > > > rmannibucau> |
> > > > LinkedIn  | JavaEE Factory
> > > > 
> > > >
> > > > 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 

Re: Configuring CXF FaultListener in TomEE

2017-03-20 Thread Paul Carter-Brown
Is that not for an interceptor? This is a FaultListener

On 20 March 2017 at 20:28, Romain Manni-Bucau  wrote:

> cxf.jaxws.out-fault-interceptors = xx
>
>
> Romain Manni-Bucau
> @rmannibucau  |  Blog
>  | Old Blog
>  | Github  rmannibucau> |
> LinkedIn  | JavaEE Factory
> 
>
> 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 
> > 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  |  Blog
> > >  | Old Blog
> > >  | Github  > > rmannibucau> |
> > > LinkedIn  | JavaEE Factory
> > > 
> > >
> > > 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>
> >
> >
>



-- 

*Paul Carter-Brown*

*Group Chief Information Officer*

*Smile Communications Pty (Ltd)   *
Smile +234 (0) 702 000 1234

Re: Configuring CXF FaultListener in TomEE

2017-03-20 Thread Romain Manni-Bucau
cxf.jaxws.out-fault-interceptors = xx


Romain Manni-Bucau
@rmannibucau  |  Blog
 | Old Blog
 | Github  |
LinkedIn  | JavaEE Factory


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 
> 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  |  Blog
> >  | Old Blog
> >  | Github  > rmannibucau> |
> > LinkedIn  | JavaEE Factory
> > 
> >
> > 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/  disclaimer>
>
>


Re: Configuring CXF FaultListener in TomEE

2017-03-20 Thread Romain Manni-Bucau
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  |  Blog
 | Old Blog
 | Github  |
LinkedIn  | JavaEE Factory


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/  disclaimer>
>
>


Tomee plume maven coordinate

2017-03-20 Thread Lazar Kirchev
Hello,

What are the maven coordinates of Tomee plume zip? Is there such thing as


 org.apache.tomee
 apache-tomee
 7.0.3
 zip
 plume


Or they are different?

Regards,
Lazar


Configuring CXF FaultListener in TomEE

2017-03-20 Thread Paul Carter-Brown
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/ 




Re: Camel-CXF in tomee

2017-03-20 Thread Romain Manni-Bucau
You use a JTA datasource and therefore you need to deifne a jta-datasource
in your persistence.xml. If you want to do it in the app you can using
either vendor specific config file like resources.xml for tomee (you can
put it in WEB-INF) or just use @DataSourceDefinition which is the EE way to
define a datasource in the application.


Romain Manni-Bucau
@rmannibucau  |  Blog
 | Old Blog
 | Github  |
LinkedIn  | JavaEE Factory


2017-03-20 14:51 GMT+01:00 syadav :

> I did not understand. Please could you explain in detail. I only understood
> that I need to use @DataSourceDefinition annotation.
>
> Please explain me in detail if possible with example.
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.
> n4.nabble.com/Camel-CXF-in-tomee-tp4681184p4681340.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>


Re: Camel-CXF in tomee

2017-03-20 Thread syadav
I did not understand. Please could you explain in detail. I only understood
that I need to use @DataSourceDefinition annotation.

Please explain me in detail if possible with example.



--
View this message in context: 
http://tomee-openejb.979440.n4.nabble.com/Camel-CXF-in-tomee-tp4681184p4681340.html
Sent from the TomEE Users mailing list archive at Nabble.com.


Re: Failure using javax.mail services with TomEE

2017-03-20 Thread jyerrami
I use the sun version of javax.mail.jar file, modified catalina.properties
file to use this jar file vs the apache one and it worked.

I want to thank you all for such prompt support. You are all amazing. 



--
View this message in context: 
http://tomee-openejb.979440.n4.nabble.com/Failure-using-javax-mail-services-with-TomEE-tp4681322p4681339.html
Sent from the TomEE Users mailing list archive at Nabble.com.


Re: Camel-CXF in tomee

2017-03-20 Thread syadav
is there any other way, as using jta datasource involves changes in tomee
server for adding resource and I do not want to do this changes. This
increases the deployment task more. I do not want to do any changes in the
server. Any change should be in the application itself. 



--
View this message in context: 
http://tomee-openejb.979440.n4.nabble.com/Camel-CXF-in-tomee-tp4681184p4681337.html
Sent from the TomEE Users mailing list archive at Nabble.com.