cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <>
Subject Re: Apache CXF - Camel wiki page : clarification requested
Date Thu, 25 Feb 2010 22:00:47 GMT
On Thu February 25 2010 8:09:48 am cmoulliard wrote:
> Hi,
> The cxf camel wiki page introduces the following CXF concepts which are not
> well described / explained. Can someone provide more info in order to
> improve the documentation please ?
> Concepts to be clarified

For some reason that I don't understand, Camel removes everything in this 
phase.   I never really understood the complete details as to why.   
Unfortunately, that means the Logging interceptor gets removed.


Headers in a soap message are compared to stuff in the WSDL (and generated 
code) in one of three ways:

1) Header is defined as an element in the SAME wsdl message as the rest of the 
body.   In this case, by default, a wsdl2java generates a parameter on the 
method for it with header=true.

2) Header is defined as an element in a DIFFERENT message in the wsdl.  By 
default, jaxws does NOT generate a param for it.  However, we have an "-exsh 
true" flag to wsdl2java to make it generate a param for it.  

3) Header not defined in WSDL at all.   It's just on the soap message itself.  
Things like ws-addressing headers, security headers, etc... would technically 
fall into this.

I'm not really sure what camel is trying to describe and what it's donig with 
it.   Most likely, the flag is trying to deal with #2 where the wsdl DOES 
define the header, but the generated service may or may not have a parameter 
for it depending on how the code was generated.

Does that help at all?


> Coming from this part of the camel doc
> CXF's LoggingOutInterceptor outputs outbound message that goes on the wire
> to logging system (Java Util Logging). Since the LoggingOutInterceptor is
> in PRE_STREAM phase (but PRE_STREAM phase is removed in MESSAGE mode), you
> have to configure LoggingOutInterceptor to be run during the WRITE phase.
> The following is an example.
>    <bean id="loggingOutInterceptor"
> class="org.apache.cxf.interceptor.LoggingOutInterceptor">
>         <!--  it really should have been user-prestream but CXF does have
> such phase! -->
>         <constructor-arg value="write"/>
>    </bean>
> <cxf:cxfEndpoint id="serviceEndpoint"
> address="http://localhost:9002/helloworld"
> 	serviceClass="org.apache.camel.component.cxf.HelloService">
> 	<cxf:outInterceptors>
> 	    <ref bean="loggingOutInterceptor"/>
> 	</cxf:outInterceptors>
> 	<cxf:properties>
> 		<entry key="dataFormat" value="MESSAGE"/>
> 	</cxf:properties>
> </cxf:cxfEndpoint>
> Description of relayHeaders option
> There are in-band and out-of-band on-the-wire headers from the perspective
> of a JAXWS WSDL-first developer.
> The in-band headers are headers that are explicitly defined as part of the
> WSDL binding contract for an endpoint such as SOAP headers.
> Kind regards,
> Charles
> -----
> Charles Moulliard
> SOA Architect
> My Blog :

Daniel Kulp

View raw message