You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Sebastien JACHYM <sj...@navista.fr> on 2013/10/22 18:31:42 UTC

How to get the raw (or XML) Payload Inbound Message ?

Hi, using a CXF WS client  with Interceptors
LoggingInInterceptor, and a custom InInterceptor like http://www.mastertheboss.com/jboss-web-services/apache-cxf-interceptors?showall=1
Is finaly setting message : message.setContent(...)
But, how to read the Payload Inbound Message outside from  Interceptors (in my case, in the javax.xml.ws.WebServiceException catch) ?...


------------------------------------
Sebastien JACHYM
Service R&D - Développeur
------------------------------------
Navista
567 rue Félix Trombe
66100 Perpignan FR

Tél : +33 (0)4 68 68 69 75
Fax : +33 (0)4 68 68 69 76
------------------------------------
www.navista.fr
------------------------------------
Ce message et les pièces jointes sont confidentiels et établis à l’intention exclusive de ses destinataires. Si vous recevez ce message par erreur merci de le détruire. La société NAVISTA décline toute responsabilité au titre de ce message s’il a été modifié, altéré, déformé ou falsifié. Nous vous recommandons de prendre les mesures permettant d'assurer la non-introduction de virus dans votre système informatique.

This email message and attachments are confidential and intended only for the recipient(s) indicated. If you are not an intended recipient, please delete it. We recommend that you take your own measures to prevent viruses from entering your computer system.

Re: How to get the raw (or XML) Payload Inbound Message ?

Posted by Daniel Kulp <dk...@apache.org>.
On Oct 22, 2013, at 12:31 PM, Sebastien JACHYM <sj...@navista.fr> wrote:

> Hi, using a CXF WS client  with Interceptors
> LoggingInInterceptor, and a custom InInterceptor like http://www.mastertheboss.com/jboss-web-services/apache-cxf-interceptors?showall=1
> Is finaly setting message : message.setContent(...)
> But, how to read the Payload Inbound Message outside from  Interceptors (in my case, in the javax.xml.ws.WebServiceException catch) ?…

By default, CXF discards everything as it's consumed.  If you need to save the entire payload, you will likely need to write an interceptor that would specifically do just that. 

One option is to configure in the SAAJInInterceptor which would automatically save the read in message to an SAAJ model.   Then you can get that from the contents of the message.

Dan


> 
> 
> ------------------------------------
> Sebastien JACHYM
> Service R&D - Développeur
> ------------------------------------
> Navista
> 567 rue Félix Trombe
> 66100 Perpignan FR
> 
> Tél : +33 (0)4 68 68 69 75
> Fax : +33 (0)4 68 68 69 76
> ------------------------------------
> www.navista.fr
> ------------------------------------
> Ce message et les pièces jointes sont confidentiels et établis à l’intention exclusive de ses destinataires. Si vous recevez ce message par erreur merci de le détruire. La société NAVISTA décline toute responsabilité au titre de ce message s’il a été modifié, altéré, déformé ou falsifié. Nous vous recommandons de prendre les mesures permettant d'assurer la non-introduction de virus dans votre système informatique.
> 
> This email message and attachments are confidential and intended only for the recipient(s) indicated. If you are not an intended recipient, please delete it. We recommend that you take your own measures to prevent viruses from entering your computer system.

-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com