You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by dermoritz <ta...@hotmail.com> on 2014/07/22 16:46:22 UTC

Log out sent xml data for cxf producer

Is there an easy way to log the xml data sent to a web service? We need this
only for debugging. So if this could be switched with loglevel would be
great.



--
View this message in context: http://camel.465427.n5.nabble.com/Log-out-sent-xml-data-for-cxf-producer-tp5754245.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Log out sent xml data for cxf producer

Posted by Willem Jiang <wi...@gmail.com>.
The loggingFeature is mainly for debugging. 
If you want to change the log level you may need to setup your own logger interceptor to the cxf endpoint yourself.

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On July 23, 2014 at 12:03:20 AM, dermoritz (tanteanni@hotmail.com) wrote:
> found "loggingFeatureEnabled" if set to true all in- and outbound messages
> are logged. The only problem with it is: it is logging as "info" what is not
> appropriate.
>  
>  
>  
> --
> View this message in context: http://camel.465427.n5.nabble.com/Log-out-sent-xml-data-for-cxf-producer-tp5754245p5754251.html  
> Sent from the Camel - Users mailing list archive at Nabble.com.
>  


Re: Log out sent xml data for cxf producer

Posted by dermoritz <ta...@hotmail.com>.
 found "loggingFeatureEnabled" if set to true all in- and outbound messages
are logged. The only problem with it is: it is logging as "info" what is not
appropriate.



--
View this message in context: http://camel.465427.n5.nabble.com/Log-out-sent-xml-data-for-cxf-producer-tp5754245p5754251.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Log out sent xml data for cxf producer

Posted by dermoritz <ta...@hotmail.com>.
Thanks this was fast,

in meanwhile i found this from
(http://stackoverflow.com/questions/23339650/capturing-apache-camel-route-cxf-web-response)

    <from uri="file:src/data?noop=true" />
    <log loggingLevel="INFO" message="${body}"/>
    <to
uri="cxf://http://localhost:8181/cxf/webservice?wsdlURL=src/main/resources/META-INF/webservice.wsdl&amp;serviceName={http://carose.com/}EchoServiceImplService&amp;portName={http://carose.com/}EchoServiceImplPort&amp;dataFormat=MESSAGE"/>
    <log loggingLevel="INFO" message="${body}"/>
    <to uri="file:src/data/responses" />

But i do this in java with
".log(LoggingLevel.TRACE, "Sending to rtdm: ${body}").to(cxf)"
(stream caching is enabled for this route)
but in the log i see "Sending to rtdm: ${body}" - so "${body}" is not
replaced by actual data. is this my failure or is it supposed to not work
this way?



--
View this message in context: http://camel.465427.n5.nabble.com/Log-out-sent-xml-data-for-cxf-producer-tp5754245p5754249.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Log out sent xml data for cxf producer

Posted by Claus Ibsen <cl...@gmail.com>.
Apache CXF has some logging information here. I think you need to add
some cxf logging intercepts. But you can then turn their logging level
accordingly what you want
http://cxf.apache.org/docs/debugging-and-logging.html

And there is also something about logging here
http://camel.apache.org/cxf.html


On Tue, Jul 22, 2014 at 4:46 PM, dermoritz <ta...@hotmail.com> wrote:
> Is there an easy way to log the xml data sent to a web service? We need this
> only for debugging. So if this could be switched with loglevel would be
> great.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Log-out-sent-xml-data-for-cxf-producer-tp5754245.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/