On 2009-12-10, at 下午11:35, Philip wrote:

Hello everyone,

we got a CXF-BC Consumer, which receives a SOAP message and forwards it to a
WebService. We like to add an interceptor, which saves the header
information into a variable, property or somewhere else to use them later in the smx. Freeman Fang suggested the JbiInWsdl1Interceptor [1]. We tried this Interceptor but we don't really understand how it works and how to get the
Header information this way.


Hi,

IIRC you want to extract the username/password from security header UsernameToken which you can use later, right?

I suggest you take a look at JbiJAASInterceptor[1], this interceptor is which you should follow to get username/password from WSUsernameTokenPrincipal

I just realize I give wrong link for JbiJAASInterceptor, which point you to JbiInWsdl1Interceptor, I'm sorry for misleading

[1]https://svn.apache.org/repos/asf/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiJAASInterceptor.java

Freeman

Our second question:
Is it possible to add an own interceptor in the CXF-BC consumer?
For example:

<cxfbc:inInterceptors>

  <bean class=*"com.sample.OwnInterceptor"*/>

</cxfbc:inInterceptors>

Do better approaches exist to get the header information?

Thanks in advance!

Best Regards,
Nicolas and Philip



[1]
https://svn.apache.org/repos/asf/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiInWsdl1Interceptor.java


--
Freeman Fang
------------------------
Open Source SOA: http://fusesource.com

Reply via email to