Try adding a custom-processor on your flow before the proxy-service
<flow name="WS_In">
<http:inbound-endpoint address="http://localhost:8080/HelloService"
exchange-pattern="request-response">
<custom-processor class="your.package.SoapHeaderObserver" />
<cxf:proxy-service wsdlLocation="classpath:helloservice.wsdl"
namespace="http://example.org/HelloService" service="ProxyService" >
<cxf:inInterceptors>
<spring:bean id="inLogger"
class="org.apache.cxf.interceptor.LoggingInInterceptor" />
<spring:bean id="msgInt" class="com.example.components.MessageInterceptor"/>
</cxf:inInterceptors>
</cxf:proxy-service>
</http:inbound-endpoint>
<component>
<spring-object bean="proxyService"></spring-object>
</component>
<echo-component></echo-component>
public class SoapHeaderObserver {
doSomething(SoapMessage message) {
//try to get header here
}
}
Also, your custom-processor can implement MessageProcessor or Callable. Take a look here on How to implement a Mule Message Observer?
And also, the framework have a lot of processors that you might use, instead of building your own.